The FldExporter class is an Exporter that evaluates an Engine and exports its input values and output values to the FuzzyLite Dataset (FLD) format, see http://www.fuzzylite.com/fll-fld for more information. More...
#include <FldExporter.h>
Public Types | |
enum | ScopeOfValues { EachVariable, AllVariables } |
The ScopeOfValues refers to the scope of the equally-distributed values to generate. More... | |
Public Member Functions | |
FldExporter (const std::string &separator=" ") | |
virtual | ~FldExporter () FL_IOVERRIDE |
virtual std::string | name () const FL_IOVERRIDE |
Returns the name of the exporter. More... | |
virtual void | setSeparator (const std::string &separator) |
Sets the separator of the dataset columns. More... | |
virtual std::string | getSeparator () const |
Gets the separator of the dataset columns. More... | |
virtual void | setExportHeader (bool exportHeaders) |
Sets whether the header of the dataset is to be exported. More... | |
virtual bool | exportsHeader () const |
Gets whether the header of the dataset is to be exported. More... | |
virtual void | setExportInputValues (bool exportInputValues) |
Sets whether the values of the input variables are to be exported. More... | |
virtual bool | exportsInputValues () const |
Gets whether the values of the input variables are to be exported. More... | |
virtual void | setExportOutputValues (bool exportOutputValues) |
Sets whether the values of the output variables are to be exported. More... | |
virtual bool | exportsOutputValues () const |
Gets whether the values of the output variables are to be exported. More... | |
virtual std::string | header (const Engine *engine) const |
Gets the header of the dataset for the given engine. More... | |
virtual std::string | toString (const Engine *engine) const FL_IOVERRIDE |
Returns a FuzzyLite Dataset from the engine. More... | |
virtual std::string | toString (Engine *engine, int values, ScopeOfValues scope=AllVariables) const |
Returns a FuzzyLite Dataset from the engine. More... | |
virtual std::string | toString (Engine *engine, int values, ScopeOfValues scope, const std::vector< InputVariable *> &activeVariables) const |
Returns a FuzzyLite Dataset from the engine. More... | |
virtual std::string | toString (Engine *engine, std::istream &reader) const |
Returns a FuzzyLite Dataset from the engine. More... | |
virtual void | toFile (const std::string &path, Engine *engine, int values, ScopeOfValues scope=AllVariables) const |
Saves the engine as a FuzzyLite Dataset into the specified file. More... | |
virtual void | toFile (const std::string &path, Engine *engine, int values, ScopeOfValues scope, const std::vector< InputVariable *> &activeVariables) const |
Saves the engine as a FuzzyLite Dataset into the specified file. More... | |
virtual void | toFile (const std::string &path, Engine *engine, std::istream &reader) const |
Saves the engine as a FuzzyLite Dataset into the specified file. More... | |
virtual std::vector< scalar > | parse (const std::string &values) const |
Parses the string into a vector of values unless the string starts with # More... | |
virtual void | write (Engine *engine, std::ostream &writer, int values, ScopeOfValues scope=AllVariables) const |
Writes the engine into the given writer. More... | |
virtual void | write (Engine *engine, std::ostream &writer, int values, ScopeOfValues scope, const std::vector< InputVariable *> &activeVariables) const |
Writes the engine into the given writer. More... | |
virtual void | write (Engine *engine, std::ostream &writer, std::istream &reader) const |
Writes the engine into the given writer. More... | |
virtual void | write (Engine *engine, std::ostream &writer, const std::vector< scalar > &inputValues) const |
Writes the engine into the given writer. More... | |
virtual void | write (Engine *engine, std::ostream &writer, const std::vector< scalar > &inputValues, const std::vector< InputVariable *> &activeVariables) const |
Writes the engine into the given writer. More... | |
virtual FldExporter * | clone () const FL_IOVERRIDE |
Creates a clone of the exporter. More... | |
Public Member Functions inherited from fl::Exporter | |
Exporter () | |
virtual | ~Exporter () |
virtual void | toFile (const std::string &path, const Engine *engine) const |
Stores the string representation of the engine into the specified file. More... | |
The FldExporter class is an Exporter that evaluates an Engine and exports its input values and output values to the FuzzyLite Dataset (FLD) format, see http://www.fuzzylite.com/fll-fld for more information.
Definition at line 40 of file FldExporter.h.
The ScopeOfValues refers to the scope of the equally-distributed values to generate.
Enumerator | |
---|---|
EachVariable | Generates \(n\) values for each variable. |
AllVariables | Generates \(n\) values for all variables. |
Definition at line 52 of file FldExporter.h.
|
explicit |
|
virtual |
|
virtual |
|
virtual |
Gets whether the header of the dataset is to be exported.
|
virtual |
Gets whether the values of the input variables are to be exported.
|
virtual |
Gets whether the values of the output variables are to be exported.
|
virtual |
Gets the separator of the dataset columns.
|
virtual |
Gets the header of the dataset for the given engine.
engine | is the engine to be exported |
|
virtual |
|
virtual |
Parses the string into a vector of values unless the string starts with #
values | is a space-separated set of values |
|
virtual |
Sets whether the header of the dataset is to be exported.
exportHeaders | indicates whether the header of the dataset is to be exported |
|
virtual |
Sets whether the values of the input variables are to be exported.
exportInputValues | indicates whether the values of the input variables are to be exported |
|
virtual |
Sets whether the values of the output variables are to be exported.
exportOutputValues | indicates whether the values of the output variables are to be exported |
|
virtual |
Sets the separator of the dataset columns.
separator | is the separator of the dataset columns |
|
virtual |
Saves the engine as a FuzzyLite Dataset into the specified file.
path | is the full path of the file |
engine | is the engine to export |
values | is the number of values to export |
scope | indicates the scope of the values |
|
virtual |
Saves the engine as a FuzzyLite Dataset into the specified file.
path | is the full path of the file |
engine | is the engine to export |
values | is the number of values to export |
scope | indicates the scope of the values |
activeVariables | contains the input variables to generate values for. The input variables must be in the same order as in the engine. A value of fl::null indicates the variable is not active. |
|
virtual |
Saves the engine as a FuzzyLite Dataset into the specified file.
path | is the full path of the file |
engine | is the engine to export |
reader | is the reader of a set of lines containing space-separated input values |
|
virtual |
Returns a FuzzyLite Dataset from the engine.
Please consider that the engine will be const_cast
ed to achieve so; that is, despite being marked as const
, the engine will be modified in order to compute the output values based on the input values.
engine | is the engine to export |
Implements fl::Exporter.
|
virtual |
Returns a FuzzyLite Dataset from the engine.
engine | is the engine to export |
values | is the number of values to export |
scope | indicates the scope of the values |
|
virtual |
Returns a FuzzyLite Dataset from the engine.
engine | is the engine to export |
values | is the number of values to export |
scope | indicates the scope of the values |
activeVariables | contains the input variables to generate values for. The input variables must be in the same order as in the engine. A value of fl::null indicates the variable is not active. |
|
virtual |
Returns a FuzzyLite Dataset from the engine.
engine | is the engine to export |
reader | is the reader of a set of lines containing space-separated input values |
|
virtual |
Writes the engine into the given writer.
engine | is the engine to export |
writer | is the output where the engine will be written to |
values | is the number of values to export |
scope | indicates the scope of the values |
|
virtual |
Writes the engine into the given writer.
engine | is the engine to export |
writer | is the output where the engine will be written to |
values | is the number of values to export |
scope | indicates the scope of the values |
activeVariables | contains the input variables to generate values for. The input variables must be in the same order as in the engine. A value of fl::null indicates the variable is not active. |
|
virtual |
Writes the engine into the given writer.
engine | is the engine to export |
writer | is the output where the engine will be written to |
reader | is the reader of a set of lines containing space-separated input values |
|
virtual |
Writes the engine into the given writer.
engine | is the engine to export |
writer | is the output where the engine will be written to |
inputValues | is the vector of input values |
|
virtual |
Writes the engine into the given writer.
engine | is the engine to export |
writer | is the output where the engine will be written to |
inputValues | is the vector of input values |
activeVariables | contains the input variables to generate values for. The input variables must be in the same order as in the engine. A value of fl::null indicates the variable is not active. |