summaryrefslogtreecommitdiff
path: root/fuzzylite/src/fuzzylite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fuzzylite/src/fuzzylite.cpp')
-rw-r--r--fuzzylite/src/fuzzylite.cpp101
1 files changed, 13 insertions, 88 deletions
diff --git a/fuzzylite/src/fuzzylite.cpp b/fuzzylite/src/fuzzylite.cpp
index 06b635a..db17fec 100644
--- a/fuzzylite/src/fuzzylite.cpp
+++ b/fuzzylite/src/fuzzylite.cpp
@@ -1,73 +1,31 @@
/*
- Author: Juan Rada-Vilela, Ph.D.
- Copyright (C) 2010-2014 FuzzyLite Limited
- All rights reserved
+ fuzzylite (R), a fuzzy logic control library in C++.
+ Copyright (C) 2010-2017 FuzzyLite Limited. All rights reserved.
+ Author: Juan Rada-Vilela, Ph.D. <jcrada@fuzzylite.com>
This file is part of fuzzylite.
fuzzylite is free software: you can redistribute it and/or modify it under
- the terms of the GNU Lesser General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ the terms of the FuzzyLite License included with the software.
- fuzzylite is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with fuzzylite. If not, see <http://www.gnu.org/licenses/>.
-
- fuzzyliteâ„¢ is a trademark of FuzzyLite Limited.
+ You should have received a copy of the FuzzyLite License along with
+ fuzzylite. If not, see <http://www.fuzzylite.com/license/>.
+ fuzzylite is a registered trademark of FuzzyLite Limited.
*/
#include "fl/fuzzylite.h"
namespace fl {
+
int fuzzylite::_decimals = 3;
+ std::ios_base::fmtflags fuzzylite::_scalarFormat = std::ios_base::fixed;
scalar fuzzylite::_macheps = 1e-6;
- bool fuzzylite::_debug = false;
+ bool fuzzylite::_debugging = false;
bool fuzzylite::_logging = true;
- std::string fuzzylite::name() {
- return "fuzzylite";
- }
-
- std::string fuzzylite::fullname() {
- return name() + "-" + longVersion();
- }
-
- std::string fuzzylite::version() {
- return FL_VERSION;
- }
-
- std::string fuzzylite::longVersion() {
- return FL_VERSION "b" FL_DATE;
- }
-
- std::string fuzzylite::license() {
- return "GNU Lesser General Public License v3.0";
- }
-
- std::string fuzzylite::author() {
- return "Juan Rada-Vilela, Ph.D.";
- }
-
- std::string fuzzylite::company() {
- return "FuzzyLite Limited";
- }
-
- std::string fuzzylite::website() {
- return "http://www.fuzzylite.com/";
- }
-
- std::string fuzzylite::date() {
- return FL_DATE;
- }
-
- std::string fuzzylite::platform() {
+ std::string platform() {
#ifdef FL_UNIX
return "Unix";
#elif defined FL_WINDOWS
@@ -77,9 +35,9 @@ namespace fl {
#endif
}
- std::string fuzzylite::floatingPoint() {
+ std::string floatingPoint() {
scalar someScalar = 0;
- (void) someScalar;
+ FL_IUNUSED(someScalar);
std::string type;
std::ostringstream ss;
@@ -92,37 +50,4 @@ namespace fl {
sizeof (someScalar) << " bytes";
return ss.str();
}
-
- void fuzzylite::setDebug(bool debug) {
- _debug = debug;
- }
-
- bool fuzzylite::debug() {
- return _debug;
- }
-
- void fuzzylite::setDecimals(int decimals) {
- _decimals = decimals;
- }
-
- int fuzzylite::decimals() {
- return _decimals;
- }
-
- void fuzzylite::setMachEps(scalar macheps) {
- _macheps = macheps;
- }
-
- scalar fuzzylite::macheps() {
- return _macheps;
- }
-
- void fuzzylite::setLogging(bool logging) {
- _logging = logging;
- }
-
- bool fuzzylite::logging() {
- return _logging;
- }
-
}