| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IG.Neural.MappingApproximationFileManager Class Reference

File manager for mapping file client and server. More...

Inheritance diagram for IG.Neural.MappingApproximationFileManager:
[legend]
Collaboration diagram for IG.Neural.MappingApproximationFileManager:
[legend]

## Public Member Functions
| MappingApproximationFileManager (string directoryPath)
| Constructs a new file manager for mapping approximation file client/server that operates in the specified directory. More...
| MappingApproximationFileManager (string directoryPath, DataMapperSimple mapper)
void | SetFunctionInputReady ()
| Sets the falg that indicates that the reduced approximation input data is ready. More...
void | ClearFunctionInputReady ()
| Clears the falg that indicates that the reduced approximation input data is ready. More...
bool | IsFunctionInputReady ()
| Returns value of the falg that indicates whether the reduced approximation input data is ready. More...
void | SetFunctionOutputReady ()
| Sets the falg that indicates that the reduced approximation output data is ready. More...
void | ClearFunctionOutputReady ()
| Clears the falg that indicates that the reduced approximation output data is ready. More...
bool | IsFunctionOutputReady ()
| Returns value of the falg that indicates whether the reduced approximation output data is ready. More...
void | ClearMessages ()
| Clears all messages for neural approximation client and server. More...
virtual void | ReadFunctionInput (ref IVector inputParameters)
| Reads function reduced input parameters form the file at standard location. More...
virtual void | WriteFunctionInput (IVector inputParameters)
| Writes function reduced input parameters to standard location. More...
virtual void | ReadFunctionOutput (ref IVector outputValues)
| Reads Function reduced output values from the file at standard location. More...
virtual void | WriteFunctionOutput (IVector outputValues)
| Writes function reduced outut values to the file at standard location. More...
virtual void | LoadDataDefinition (ref InputOutputDataDefiniton definitionData)
| Loads the definition data from the file at standard location. More...
virtual void | LoadMappingDefinition (ref MappingDefinition mappingDefinition)
| Loads the mapping definition data from the file at standard location. More...
virtual void | ClientTestCalculateMappingApproximation (string functionInputFilePath, string functionOutputFilePath)
| Performs client-side test calculation of neural network based approximation where input parameters are read from a specified function JSON file with reduced input parameters, copies to specified JSON file with total inputs and calculated output values are written to the specified file. More...
virtual void | ServerCalculateMappingApproximation ()
| Performs neural network-based approximation at prescribed reduced input parameters and saves results. Messages are set and cleared appropriately. This method read reduced input parameters from standard location, mapps input parameters, loads trained neural network, calculates approximated outpur values, mapps output values, and stores them to the standard location. More...
Public Member Functions inherited from IG.Neural.NeuraApproximationFileManager
| NeuraApproximationFileManager (string directoryPath)
| Nonstruct a new file manager for neural approximation file client/server that operates in the specified directory. More...
string | GetPath (string fileOrDirectoryName)
| Returns full path of the file or directory with the specified relative path within the data directory of the current file server/client. More...
void | SetNeuralBusy ()
| Sets the falg that indicates that the approximation server is busy. More...
void | ClearNeuralBusy ()
| Clears the falg that indicates that the approximation server is busy. More...
bool | IsNeuralBusy ()
| Returns value of the falg that indicates whether the approximation server is busy. More...
void | SetNeuralInputReady ()
| Sets the falg that indicates that the approximation input data is ready. More...
void | ClearNeuralInputReady ()
| Clears the falg that indicates that the approximation input data is ready. More...
bool | IsNeuralInputReady ()
| Returns value of the falg that indicates whether the approximation input data is ready. More...
void | SetNeuralOutputReady ()
| Sets the falg that indicates that the approximation output data is ready. More...
void | ClearNeuralOutputReady ()
| Clears the falg that indicates that the approximation output data is ready. More...
bool | IsNeuralOutputReady ()
| Returns value of the falg that indicates whether the approximation output data is ready. More...
void | ClearMessages ()
| Clears all messages for neural approximation client and server. More...
virtual void | ReadNeuralInput (ref IVector inputParameters)
| Reads neural approximator input parameters form the file at standard location. More...
virtual void | WriteNeuralInput (IVector inputParameters)
| Writes neural approximator input parameters to standard location. More...
virtual void | ReadNeuralOutput (ref IVector outputValues)
| Reads neural approximator output values from the file at standard location. More...
virtual void | WriteNeuralOutput (IVector outputValues)
| Writes neural approximator outut values to the file at standard location. More...
virtual void | LoadNeuralNetwork (ref INeuralApproximator trainedNetwork)
| Loads the trained neural network approximator from the file at standard location. More...
virtual void | ClientWriteNeuralInput (IVector inputParameters)
| Client writes input parameters for calculation of neural network based approximated values. Messages are set nad clears appropriately. More...
virtual void | ClientReadNeuralOutput (ref IVector outputValues)
| Client reads the results of neural network-based approximation (output values). Messages are set and clears appropriately. More...
virtual void | ClientSendRequestCalculateApproximation ()
| Performs request to the server for calculation of neural network based approximated values. More...
virtual void | ClientCalculateApproximation (IVector inputParameters, ref IVector outputValues)
| Calculates approximation by using the neural network approximation server. More...
virtual void | ClientTestCalculateApproximation (string inputFilePath, string outputFilePath)
| Performs client-side test calculation of neural network based approximation where input parameters are read from a specified JSON file, and calculated output values are written to the specified file. More...
virtual void | ServerCalculateApproximation ()
| Performs neural network-based approximation at prescribed input parameters and saves results. Messages are set and cleared appropriately. This method read input parameters from standard location, loads trained neural network, calculates approximated outpur values and stores them to the standard location. More...

## Properties
static DataMapperIdentity | Aux`[get]`
| Initialize DataMapperIdentity object for identity copying. More...
IDataMapper | MapperDefinition`[get, set]`
| Initialize DataMapperIdentity object for identity copying if mapper is null. Setter takes DataMapperSimple object. More...
string | MappingDefinitionPath`[get, protected set]`
| File path of the input and output mapping definition file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | FunctionInputPath`[get, protected set]`
| File path of the file with reduced input parameters. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | FunctionOutputPath`[get, protected set]`
| File path of the file for storing reduced approximated output values. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | MsgFunctionInputReadyPath`[get, protected set]`
| File path of the message file indicating that reduced input data is ready to be processed. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | MsgFunctionOutputReadyPath`[get, protected set]`
| File path of the message file indicating that the reduced approximated output is ready to be read. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
Properties inherited from IG.Neural.NeuraApproximationFileManager
object | Lock`[get]`
| This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
object | InternalLock`[get]`
| Used internally for locking access to internal fields. More...
string | DataDirectory`[get, protected set]`
| Directory for data and messages exchange through files. More...
string | NeuralNetworkPath`[get, protected set]`
| File path of the file where complete (usually trained) neural network is stored. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralDataDefinitionPath`[get, protected set]`
| File path of the input and output data definition file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | SimulationDataDefinitionPath`[get, protected set]`
| File path of the input and output data definition file for simulator. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralVerificationDataPath`[get, protected set]`
| File path of the verification data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralTrainingDataPath`[get, protected set]`
| File path of the training data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralInputPath`[get, protected set]`
| File path of the file with input parameters. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralInputXmlPath`[get, protected set]`
| File path of the input parameters file in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralOutputPath`[get, protected set]`
| File path of the file for storing approximated output values. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | NeuralOutputeXmlPath`[get, protected set]`
| File path of the file for storing approximated output values in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | MsgNeuralBusyPath`[get, protected set]`
| File path of the message file indicating that approximator is busy by performing a job. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | MsgNeuralInputReadyPath`[get, protected set]`
| File path of the message file indicating taht input data is ready to be processed. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
string | MsgNeuralOutputReadyPath`[get, protected set]`
| File path of the message file indicating that the approximated output is ready to be read. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More...
Properties inherited from IG.Lib.ILockable
object | Lock`[get]`

## Private Member Functions
| MappingApproximationFileManager ()

## Private Attributes
string | _mappingDefinitionFilename = NeuralFileConst.MappingDefinitionFilename
string | _mappingDefinitionPath = null
string | _functionInputFilename = NeuralFileConst.FunctionInputFilename
string | _functionInputPath = null
string | _functionOutputFilename = NeuralFileConst.FunctiOutputFilename
string | _functionOutputPath = null
string | _msgFunctionInputReadyFilename = NeuralFileConst.MsgFunctionInputReadyFilename
string | _msgFunctionInputReadyPath = null
string | _msgFunctionOutputReadyFilename = NeuralFileConst.MsgFunctionOutputReadyFilename
string | _msgFunctionOutputReadyPath = null
IDataMapper | _mapperDefinition = null

## Static Private Attributes
static DataMapperIdentity | _aux = null

## Additional Inherited Members
Protected Attributes inherited from IG.Neural.NeuraApproximationFileManager
string | _dataDirectory = null

## Detailed Description

File manager for mapping file client and server.

$A tako78 Jul11; Igor Jul11;

## Constructor & Destructor Documentation

IG.Neural.MappingApproximationFileManager.MappingApproximationFileManager | ( |  | ) |
| inline private

IG.Neural.MappingApproximationFileManager.MappingApproximationFileManager | ( | string | directoryPath | ) |
| inline

Constructs a new file manager for mapping approximation file client/server that operates in the specified directory.

Parameters

  directoryPath | Operation directory for data & message exchange through files.

$A Igor Jul, tako78 Jul

IG.Neural.MappingApproximationFileManager.MappingApproximationFileManager | ( | string | directoryPath,
|  | DataMapperSimple | mapper
| ) |  |
| inline

Parameters

  directoryPath |
  mapper |

$A Igor Jul, tako78 Jul

## Member Function Documentation

void IG.Neural.MappingApproximationFileManager.SetFunctionInputReady | ( |  | ) |
| inline

Sets the falg that indicates that the reduced approximation input data is ready.

$A tako78 Jul.21

Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().

void IG.Neural.MappingApproximationFileManager.ClearFunctionInputReady | ( |  | ) |
| inline

Clears the falg that indicates that the reduced approximation input data is ready.

$A tako78 Jul.21

bool IG.Neural.MappingApproximationFileManager.IsFunctionInputReady | ( |  | ) |
| inline

Returns value of the falg that indicates whether the reduced approximation input data is ready.

$A tako78 Jul.21

void IG.Neural.MappingApproximationFileManager.SetFunctionOutputReady | ( |  | ) |
| inline

Sets the falg that indicates that the reduced approximation output data is ready.

$A tako78 Jul.21

void IG.Neural.MappingApproximationFileManager.ClearFunctionOutputReady | ( |  | ) |
| inline

Clears the falg that indicates that the reduced approximation output data is ready.

$A tako78 Jul.21

Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().

bool IG.Neural.MappingApproximationFileManager.IsFunctionOutputReady | ( |  | ) |
| inline

Returns value of the falg that indicates whether the reduced approximation output data is ready.

$A tako78 Jul.21

void IG.Neural.MappingApproximationFileManager.ClearMessages | ( |  | ) |
| inline

Clears all messages for neural approximation client and server.

$A tako78 Jul.21

virtual void IG.Neural.MappingApproximationFileManager.ReadFunctionInput | ( | ref IVector | inputParameters | ) |
| inline virtual

Reads function reduced input parameters form the file at standard location.

Parameters

  inputParameters | Object where parameters are stored.

$A tako78 Jul.21

References IG.Num.VectorBase.LoadJson().

virtual void IG.Neural.MappingApproximationFileManager.WriteFunctionInput | ( | IVector | inputParameters | ) |
| inline virtual

Writes function reduced input parameters to standard location.

Parameters

  inputParameters | Parameters to be written.

$A tako78 Jul.21

References IG.Num.VectorBase.SaveJson().

virtual void IG.Neural.MappingApproximationFileManager.ReadFunctionOutput | ( | ref IVector | outputValues | ) |
| inline virtual

Reads Function reduced output values from the file at standard location.

Parameters

  outputValues | Object where the read outut values are stored.

$A tako78 Jul.21

References IG.Num.VectorBase.LoadJson().

virtual void IG.Neural.MappingApproximationFileManager.WriteFunctionOutput | ( | IVector | outputValues | ) |
| inline virtual

Writes function reduced outut values to the file at standard location.

Parameters

  outputValues | Output values that are written.

$A tako78 Jul.21

References IG.Num.VectorBase.SaveJson().

virtual void IG.Neural.MappingApproximationFileManager.LoadDataDefinition | ( | ref InputOutputDataDefiniton | definitionData | ) |
| inline virtual

Loads the definition data from the file at standard location.

Parameters

  trainedNetwork | Object where the loaded neural network approximator is stored.

$A tako78 Jul.21

References IG.Num.InputOutputDataDefiniton.LoadJson().

virtual void IG.Neural.MappingApproximationFileManager.LoadMappingDefinition | ( | ref MappingDefinition | mappingDefinition | ) |
| inline virtual

Loads the mapping definition data from the file at standard location.

Parameters

  trainedNetwork | Object where the loaded neural network approximator is stored.

$A tako78 Jul.21

References IG.Neural.MappingDefinition.LoadJson().

virtual void IG.Neural.MappingApproximationFileManager.ClientTestCalculateMappingApproximation | ( | string | functionInputFilePath,
|  | string | functionOutputFilePath
| ) |  |
| inline virtual

Performs client-side test calculation of neural network based approximation where input parameters are read from a specified function JSON file with reduced input parameters, copies to specified JSON file with total inputs and calculated output values are written to the specified file.

Parameters

  inputFilePath | Path to the JSON file where input parameters are read from. The file pointed at must exist.
  outputFilePath | Path of a file where the calculated approximated values are written to. It can be null or empty string, in this case parameters are not written to a file (but they are still output on console).

$A tako78 Jul;

References IG.Num.VectorBase.LoadJson().

virtual void IG.Neural.MappingApproximationFileManager.ServerCalculateMappingApproximation | ( |  | ) |
| inline virtual

Performs neural network-based approximation at prescribed reduced input parameters and saves results. Messages are set and cleared appropriately. This method read reduced input parameters from standard location, mapps input parameters, loads trained neural network, calculates approximated outpur values, mapps output values, and stores them to the standard location.

$A tako78 Jul.21

## Member Data Documentation

string IG.Neural.MappingApproximationFileManager._mappingDefinitionFilename = NeuralFileConst.MappingDefinitionFilename
| private

string IG.Neural.MappingApproximationFileManager._mappingDefinitionPath = null
| private

string IG.Neural.MappingApproximationFileManager._functionInputFilename = NeuralFileConst.FunctionInputFilename
| private

string IG.Neural.MappingApproximationFileManager._functionInputPath = null
| private

string IG.Neural.MappingApproximationFileManager._functionOutputFilename = NeuralFileConst.FunctiOutputFilename
| private

string IG.Neural.MappingApproximationFileManager._functionOutputPath = null
| private

string IG.Neural.MappingApproximationFileManager._msgFunctionInputReadyFilename = NeuralFileConst.MsgFunctionInputReadyFilename
| private

string IG.Neural.MappingApproximationFileManager._msgFunctionInputReadyPath = null
| private

string IG.Neural.MappingApproximationFileManager._msgFunctionOutputReadyFilename = NeuralFileConst.MsgFunctionOutputReadyFilename
| private

string IG.Neural.MappingApproximationFileManager._msgFunctionOutputReadyPath = null
| private

DataMapperIdentity IG.Neural.MappingApproximationFileManager._aux = null
| static private

IDataMapper IG.Neural.MappingApproximationFileManager._mapperDefinition = null
| private

## Property Documentation

DataMapperIdentity IG.Neural.MappingApproximationFileManager.Aux
| static get private

Initialize DataMapperIdentity object for identity copying.

Initializing is performed only once.

$A Igor Jul, tako78 Jul

IDataMapper IG.Neural.MappingApproximationFileManager.MapperDefinition
| get set

Initialize DataMapperIdentity object for identity copying if mapper is null. Setter takes DataMapperSimple object.

$A Igor Jul, tako78 Jul

string IG.Neural.MappingApproximationFileManager.MappingDefinitionPath
| get protected set

File path of the input and output mapping definition file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.

$A tako78 Jul.21

string IG.Neural.MappingApproximationFileManager.FunctionInputPath
| get protected set

File path of the file with reduced input parameters. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.

$A tako78 Jul.21

string IG.Neural.MappingApproximationFileManager.FunctionOutputPath
| get protected set

File path of the file for storing reduced approximated output values. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.

$A tako78 Jul.21

string IG.Neural.MappingApproximationFileManager.MsgFunctionInputReadyPath
| get protected set

File path of the message file indicating that reduced input data is ready to be processed. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.

$A tako78 Jul.21

string IG.Neural.MappingApproximationFileManager.MsgFunctionOutputReadyPath
| get protected set

File path of the message file indicating that the reduced approximated output is ready to be read. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.

$A tako78 Jul.21

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

- igbase/numeric/approximation/neural/testneural/NeuralFileManager.cs