MeLOn
melon::AnnParser Class Referenceabstract

This class implements an abstract parent class for ANN file parser. More...

#include <AnnParser.h>

Inheritance diagram for melon::AnnParser:
melon::ModelParser melon::AnnParserCsv melon::AnnParserXml

Public Member Functions

virtual std::shared_ptr< ModelDataparse_model (const std::string modelPath, const std::string modelName)=0
 Abstract function for defining the structure of the parsing function which is used to get the ANN data from a file. More...
 
- Public Member Functions inherited from melon::ModelParser
virtual ~ModelParser ()=default
 Virtual desctructor to enable inheritance. More...
 

Protected Member Functions

ACTIVATION_FUNCTION _string_to_activation_function (const std::string &activationFunctionName)
 Turns a string containing the name of an activation function in the correct enum representation. More...
 
- Protected Member Functions inherited from melon::ModelParser
std::string _format_file_path (const std::string modelPath, const std::string modelName, const MODEL_FILE_TYPE fileType)
 Applies the correct format to the path given by the user. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from melon::ModelParser
static SCALER_TYPE _string_to_scaler_type (const std::string scalerTypeName)
 Turns a string containing the name of an scaler type in the correct enum representation. More...
 
static SCALER_PARAMETER _string_to_scaler_parameter (const std::string scalerParameterName)
 Turns a string containing the name of an scaler type in the correct enum representation. More...
 
- Protected Attributes inherited from melon::ModelParser
std::string _modelPath
 
std::string _modelName
 

Detailed Description

This class implements an abstract parent class for ANN file parser.

This abstarct class is used to define a general interface for ANN fileparsers. Child classes can implement the defined interface functions according to their filetype.

Member Function Documentation

◆ _string_to_activation_function()

ACTIVATION_FUNCTION AnnParser::_string_to_activation_function ( const std::string &  activationFunctionName)
protected

Turns a string containing the name of an activation function in the correct enum representation.

Parameters
[in]activationFunctionNameis a string containing the name of an activation function
Returns
returns the enum representation of the input

◆ parse_model()

virtual std::shared_ptr<ModelData> melon::AnnParser::parse_model ( const std::string  modelPath,
const std::string  modelName 
)
pure virtual

Abstract function for defining the structure of the parsing function which is used to get the ANN data from a file.

Parameters
[in]modelPathPath to the location of the ANN file
[in]modelNamename of the network (either foldername in which csv files are stored or name of an xml file, depending on the filetype)
Returns
returns ModelData struct containing the information defining the ANN

Implements melon::ModelParser.

Implemented in melon::AnnParserXml, and melon::AnnParserCsv.


The documentation for this class was generated from the following files: