IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.InputOutputDataDefiniton Class Reference

Definition of input and output data for vector functions, approximations, etc. Contains descriptiove information about individual eleemnts of input and output, default values and eventual bounds of input parameters, etc. More...

Public Member Functions

 InputOutputDataDefiniton ()
 
virtual InputElementDefinition GetInputElement (int which)
 Returns the specified input element definition. More...
 
virtual void SetInputElement (int which, InputElementDefinition element)
 Sets the input element definition with the specified index to the specified object. More...
 
virtual void AddInputElement (InputElementDefinition element, bool assignIndex=false)
 Adds the specified input element definition to the list of input element definitions. More...
 
virtual int GetInputIndex (string inputName)
 Gets index of the input element that has the specified name, or -1 if there is no such input element. More...
 
virtual int GetInputIndexByNameAlt (string inputNameAlt)
 Gets index of the input element that has the specified alternative name, or -1 if there is no such input element. More...
 
virtual int GetInputIndexByNameOrNameAlt (string inputNameOrNameAlt)
 Gets index of the input element that has the specified name or alternative name, or -1 if there is no such input element. More...
 
virtual OutputElementDefinition GetOutputElement (int which)
 
virtual void SetOutputElement (int which, OutputElementDefinition element)
 Sets the output element definition with the specified index to the specified object. More...
 
virtual void AddOutputElement (OutputElementDefinition element, bool assignIndex=false)
 Adds the specified output element definition to the list of output element definitionss. More...
 
virtual int GetOutputIndex (string outputName)
 Gets index of the output element that has the specified name, or -1 if there is no such output element. More...
 
virtual int GetOutputIndexByNameAlt (string outputNameAlt)
 Gets index of the output element that has the specified alternative name, or -1 if there is no such output element. More...
 
virtual int GetOutputIndexByNameOrNameAlt (string outputNameOrNameAlt)
 Gets index of the output element that has the specified name or alternative name, or -1 if there is no such output element. More...
 
virtual void CopyDefaultInputFrom (IVector inputParameters)
 Copies input parameters from the specified vector to the current data definition's default input values. More...
 
virtual void CopyDefaultInputTo (ref IVector inputParameters)
 Stores default values of input parameters from the current data definition in the specified vector. More...
 
virtual void GetInputBounds (ref IBoundingBox bounds)
 Extracts input bounds as defined on the current data definition object, and stores them in the specified bounding box. More...
 
virtual void GetOutputBounds (ref IBoundingBox bounds)
 Extracts output bounds as defined on the current data definition object, and stores them in the specified bounding box. More...
 
virtual bool IsAnyInputNameDefined ()
 Returns a value indicating whether any input element has Name property defined. More...
 
virtual bool IsAnyOutputNameDefined ()
 Returns a value indicating whether any output element has Name property defined. More...
 
virtual bool IsAnyNameDefined ()
 Returns a value indicating whether any element (either input or output) has Name property defined. More...
 
virtual bool IsAnyInputTitleDefined ()
 Returns a value indicating whether any input element has Title property defined. More...
 
virtual bool IsAnyOutputTitleDefined ()
 Returns a value indicating whether any output element has Title property defined. More...
 
virtual bool IsAnyTitleDefined ()
 Returns a value indicating whether any element (either input or output) has Title property defined. More...
 
virtual bool IsAnyInputDescriptionDefined ()
 Returns a value indicating whether any input element has Description property defined. More...
 
virtual bool IsAnyOutputDescriptionDefined ()
 Returns a value indicating whether any output element has Description property defined. More...
 
virtual bool IsAnyDescriptionDefined ()
 Returns a value indicating whether any element (either input or output) has Description property defined. More...
 
virtual bool IsAnyInputDiscretizationStepDefined ()
 Returns a value indicating whether any input element has DiscretizationStep property defined. More...
 
virtual bool IsAnyOutputDiscretizationStepDefined ()
 Returns a value indicating whether any output element has DiscretizationStep property defined. More...
 
virtual bool IsAnyDiscretizationStepDefined ()
 Returns a value indicating whether any element (either input or output) has DiscretizationStep property defined. More...
 
virtual bool IsAnyInputNumSamplingPointsDefined ()
 Returns a value indicating whether any input element has NumSamplingPoints property defined. More...
 
virtual bool IsAnyOutputNumSamplingPointsDefined ()
 Returns a value indicating whether any output element has NumSamplingPoints property defined. More...
 
virtual bool IsAnyNumSamplingPointsDefined ()
 Returns a value indicating whether any element (either input or output) has NumSamplingPoints property defined. More...
 
virtual bool IsAnyInputBoundDefined ()
 Returns a value indicating whether any input element has bounds defined. More...
 
virtual bool IsAnyOutputBoundDefined ()
 Returns a value indicating whether any output element has bounds defined. More...
 
virtual bool IsAnyBoundDefined ()
 Returns a value indicating whether any element (either input or output) has bounds defined. More...
 
virtual bool IsAnyInputScalingLengthDefined ()
 Returns a value indicating whether any input element has scaling length defined. More...
 
virtual bool IsAnyOutputScalingLengthDefined ()
 Returns a value indicating whether any output element has scaling length defined. More...
 
virtual bool IsAnyScalingLengthDefined ()
 Returns a value indicating whether any element (either input or output) has scaling length defined. More...
 
virtual bool IsAnyInputTargetValueDefined ()
 Returns a value indicating whether any input element has target value defined. More...
 
virtual bool IsAnyOutputTargetValueDefined ()
 Returns a value indicating whether any output element has target value defined. More...
 
virtual bool IsAnyTargetValueDefined ()
 Returns a value indicating whether any element (either input or output) has target value defined. More...
 
virtual bool IsAnyInputDefaultValueDefined ()
 Returns a value indicating whether any input element has default value defined. More...
 
virtual bool IsAnyOutputDefaultValueDefined ()
 Returns a value indicating whether any output element has default value defined. More...
 
virtual bool IsAnyDefaultValueDefined ()
 Returns a value indicating whether any element (either input or output) has default value defined. More...
 
virtual bool IsAnyInputElementIndexSpecified ()
 Returns a value indicating whether any input element has element index specified. More...
 
virtual bool IsAnyOutputElementIndexSpecified ()
 Returns a value indicating whether any output element has element index specified. More...
 
virtual bool IsAnyElementIndexSpecified ()
 Returns a value indicating whether any element (either input or output) has element index specified. More...
 
virtual bool IsAnyInputOptimizationIndexSpecified ()
 Returns a value indicating whether any input element has element index specified. More...
 
virtual bool IsAnyOutputOptimizationIndexSpecified ()
 Returns a value indicating whether any output element has element index specified. More...
 
virtual bool IsAnyOptimizationIndexSpecified ()
 Returns a value indicating whether any element (either input or output) has element index specified. More...
 
override string ToString ()
 Returns string representation of the current object. More...
 

Static Public Member Functions

static void GetInputElementNameParameters (out string nameBase, out int numDigits, out int startingIndex, InputOutputDataDefiniton def=null, bool checkLegalVAriableName=true)
 Retuns a base string, number of digits and number starting index for generation of data definition input element names, which it tries to infer from the specified definition data. More...
 
static void GetOutputElementNameParameters (out string nameBase, out int numDigits, out int startingIndex, InputOutputDataDefiniton def=null, bool checkLegalVAriableName=true)
 Retuns a base string, number of digits and number starting index for generation of data definition input element names, which it tries to infer from the specified definition data. More...
 
static string CreateInputElementName (int elementIndex, InputOutputDataDefiniton def=null, bool checkLegalVAriableName=true)
 Generates and returns name of the input data element with the specified index. More...
 
static string CreateOutputElementName (int elementIndex, InputOutputDataDefiniton def=null, bool checkLegalVAriableName=true)
 Generates and returns name of the output data element with the specified index. More...
 
static InputOutputDataDefiniton CreateDefault (int inputLength, int outputLength)
 Creates and returns a data definition with fields set to default values. More...
 
static InputOutputDataDefiniton Create (int inputLength, int outputLength, bool assignNames=false, bool assignDescriptions=false, string inputNameBase=null, string outputNameBase=null, int numNameDigits=-1, int startIndex=-1, string digitSeparator="_", string inputDescriptionBase="Input parameter No. ", string outputDescriptionBase="Output value No. ", string digitSeparatorDescriptions="", string descriptionsEnd=".")
 Creates and returns definition a new definition data with specified dimensions of input and otput spaces (domains and codomains in case of functions) and eventually assigns names and descriptions to input and output elements. More...
 
static void SaveJson (InputOutputDataDefiniton dataDef, string filePath)
 Saves input/output data definition to the specified JSON file. File is owerwritten if it exists. More...
 
static void LoadJson (string filePath, ref InputOutputDataDefiniton dataDefRestored)
 Restores input/output data definition from the specified file in JSON format. More...
 
static void SupplementDataDefinition (InputOutputDataDefiniton data, SampledDataSet trainingData)
 Suplements the specified data definition object with information that is extracted from the training data set. Some data is updated independently of the training data set, and this data is updated even if the training data set is not specified. If bounds on input parameters and output values are not defined then bounds are set to bounds within which training data fits. If default values and target values are not specified then these values are set to centers of intervals. If names, titles and descriptions are not specified (null or empty string) then default strings are provided. If optimization parameter indices are not specified for input parameters then these indices are taken the same as elementindices. For fields that have the corresponding "...Defined" flag, data is recalculated only if that flag is set to false. In order to ensure recalculation of such fields, set the corresponding flags to false (for example, BoundsDefined for MinimalValue and MaximalValue, ScalingLengthDefined for ScalingLength, TargetValueDefined for TargetValue, etc.). More...
 
static void SupplementDataDefinition (string dataDefinitionPath, string trainingDataPath)
 Suplements the specified data definition object with information that is extracted from the training data set and with automatically generated information. More...
 
static void SupplementDataDefinition (string dataDefinitionPath, string trainingDataPath, string updatedDataDefinitionPath)
 Suplements the specified data definition object with information that is extracted from the training data set and with automatically generated information. More...
 
static void CopyPlain (InputOutputDataDefiniton original, InputOutputDataDefiniton copy)
 Copies data from one data definition to another. More...
 
static void Copy (InputOutputDataDefiniton original, ref InputOutputDataDefiniton copy)
 Copies data from one data definition to another. More...
 
static InputOutputDataDefiniton CreateExample (int inputLength, int outputLength)
 Creates and returns an example data definition. More...
 

Static Public Attributes

static string DefaultName = null
 Default value of the Name property of the input and output data definitions. More...
 
static string DefaultDescription = null
 Default value of the Description property of the input and output data definitions. More...
 

Static Protected Member Functions

static void GetElementNameParameters (bool outputElements, out string nameBase, out int numDigits, out int startingIndex, InputOutputDataDefiniton def=null, bool checkLegalVAriableName=true)
 Retuns a base string, number of digits and number starting index for generation of data definition input or output element names, which it tries to infer from the specified definition data. More...
 

Protected Attributes

string _name = DefaultName
 
string _description = DefaultDescription
 
List< InputElementDefinition_input = new List<InputElementDefinition>()
 
List< OutputElementDefinition_output = new List<OutputElementDefinition>()
 

Properties

string Name [get, set]
 Name of the current definition of input parameters and output values of a model. More...
 
string Description [get, set]
 Description of the current definition of input parameters and output values of a model. More...
 
int InputLength [get]
 Gets number of input parameters. More...
 
int OutputLength [get]
 Gets number of output values. More...
 
virtual List
< InputElementDefinition
InputElementList [get]
 
virtual List
< OutputElementDefinition
OutputElementList [get]
 
static string DefaultInputElementNameBase [get, set]
 Default name base for input data elements. More...
 
static string DefaultOutputElementNameBase [get, set]
 Default name base for output data elements. More...
 
static int DefaultElementNameNumDigits [get, set]
 Default number of digits in generated input or output data element names (this refers to digits appended to name base). More...
 
static int DefaultElementNameStartingIndex [get, set]
 Default starting index in generated input or output data element names (this refers to digits appended to name base). More...
 

Static Private Attributes

static string _defaultInputElementNameBase = "InputParameter"
 
static string _defaultOutputElementNameBase = "OutputValue"
 
static int _defaultElementNameNumDigits = 2
 
static int _defaultElementNameStatingIndex = 0
 

Detailed Description

Definition of input and output data for vector functions, approximations, etc. Contains descriptiove information about individual eleemnts of input and output, default values and eventual bounds of input parameters, etc.

$A Igor Mar11;

Constructor & Destructor Documentation

IG.Num.InputOutputDataDefiniton.InputOutputDataDefiniton ( )
inline

Member Function Documentation

virtual void IG.Num.InputOutputDataDefiniton.SetInputElement ( int  which,
InputElementDefinition  element 
)
inlinevirtual

Sets the input element definition with the specified index to the specified object.

Parameters
whichIndex of input element definition.
elementImput element definition object to which the specified input element definition is set.
Exceptions
IndexOutOfRangeExceptionWhen index is out of range.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

virtual void IG.Num.InputOutputDataDefiniton.AddInputElement ( InputElementDefinition  element,
bool  assignIndex = false 
)
inlinevirtual
virtual int IG.Num.InputOutputDataDefiniton.GetInputIndex ( string  inputName)
inlinevirtual

Gets index of the input element that has the specified name, or -1 if there is no such input element.

Parameters
inputNameName of the input element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduce later in order to achieve improvement.

virtual int IG.Num.InputOutputDataDefiniton.GetInputIndexByNameAlt ( string  inputNameAlt)
inlinevirtual

Gets index of the input element that has the specified alternative name, or -1 if there is no such input element.

Parameters
inputNameAltSlternative name of the input element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduce later in order to achieve improvement.

virtual int IG.Num.InputOutputDataDefiniton.GetInputIndexByNameOrNameAlt ( string  inputNameOrNameAlt)
inlinevirtual

Gets index of the input element that has the specified name or alternative name, or -1 if there is no such input element.

Parameters
inputNameOrNameAltSlternative name of the input element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduced later in order to achieve improvement.

virtual void IG.Num.InputOutputDataDefiniton.SetOutputElement ( int  which,
OutputElementDefinition  element 
)
inlinevirtual

Sets the output element definition with the specified index to the specified object.

Parameters
whichIndex of output element definition.
elementOutput element definition object to which the specified output element definition is set.
Exceptions
IndexOutOfRangeExceptionWhen index is out of range.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

virtual void IG.Num.InputOutputDataDefiniton.AddOutputElement ( OutputElementDefinition  element,
bool  assignIndex = false 
)
inlinevirtual
virtual int IG.Num.InputOutputDataDefiniton.GetOutputIndex ( string  outputName)
inlinevirtual

Gets index of the output element that has the specified name, or -1 if there is no such output element.

Parameters
outputNameName of the output element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduce later in order to achieve improvement.

virtual int IG.Num.InputOutputDataDefiniton.GetOutputIndexByNameAlt ( string  outputNameAlt)
inlinevirtual

Gets index of the output element that has the specified alternative name, or -1 if there is no such output element.

Parameters
outputNameAltAlternative name of the output element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduce later in order to achieve improvement.

virtual int IG.Num.InputOutputDataDefiniton.GetOutputIndexByNameOrNameAlt ( string  outputNameOrNameAlt)
inlinevirtual

Gets index of the output element that has the specified name or alternative name, or -1 if there is no such output element.

Parameters
outputNameOrNameAltName or alternative name of the output element whose index is to be returned.

This method is slow when the number of elements is large, becase it iterates through all elements before the matching element is found. If necessary, indexing can be introduced later in order to achieve improvement.

virtual void IG.Num.InputOutputDataDefiniton.CopyDefaultInputFrom ( IVector  inputParameters)
inlinevirtual

Copies input parameters from the specified vector to the current data definition's default input values.

The default value flag is set on every element.

Parameters
inputParametersVector from which default input values are copied.
Exceptions
ArgumentExceptionIf inputParameters is null or of incorrect dimension.

References IG.Num.InputElementDefinition.DefaultValue, and IG.Num.InputElementDefinition.DefaultValueDefined.

virtual void IG.Num.InputOutputDataDefiniton.CopyDefaultInputTo ( ref IVector  inputParameters)
inlinevirtual

Stores default values of input parameters from the current data definition in the specified vector.

Vector is resized if necessary.

Parameters
inputParametersVector where default values of input parameters are stored.
Exceptions
InvalidOperationExceptionWhen default values are not defined for all input parameters.

References IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputElementDefinition.DefaultValueDefined, and IG.Num.VectorBase.Resize().

virtual void IG.Num.InputOutputDataDefiniton.GetInputBounds ( ref IBoundingBox  bounds)
inlinevirtual

Extracts input bounds as defined on the current data definition object, and stores them in the specified bounding box.

If some bounds are not defined then they are also not defined on the bounding box where bounds are stored.

After the call, bounding box will have bounds defined exacttly as they are set in the current input data definition.

Parameters
boundsBounding box on which the extracted bounds are set.

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputOutputElementDefinition.MaximalValue, and IG.Num.InputOutputElementDefinition.MinimalValue.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

virtual void IG.Num.InputOutputDataDefiniton.GetOutputBounds ( ref IBoundingBox  bounds)
inlinevirtual

Extracts output bounds as defined on the current data definition object, and stores them in the specified bounding box.

If some bounds are not defined then they are also not defined on the bounding box where bounds are stored.

After the call, bounding box will have bounds defined exacttly as they are set in the current output data definition.

Parameters
boundsBounding box on which the extracted bounds are set.

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputOutputElementDefinition.MaximalValue, and IG.Num.InputOutputElementDefinition.MinimalValue.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputNameDefined ( )
inlinevirtual

Returns a value indicating whether any input element has Name property defined.

References IG.Num.InputOutputElementDefinition.Name.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputNameDefined ( )
inlinevirtual

Returns a value indicating whether any output element has Name property defined.

References IG.Num.InputOutputElementDefinition.Name.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyNameDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has Name property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputTitleDefined ( )
inlinevirtual

Returns a value indicating whether any input element has Title property defined.

References IG.Num.InputOutputElementDefinition.Title.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputTitleDefined ( )
inlinevirtual

Returns a value indicating whether any output element has Title property defined.

References IG.Num.InputOutputElementDefinition.Title.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyTitleDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has Title property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputDescriptionDefined ( )
inlinevirtual

Returns a value indicating whether any input element has Description property defined.

References IG.Num.InputOutputElementDefinition.Description.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputDescriptionDefined ( )
inlinevirtual

Returns a value indicating whether any output element has Description property defined.

References IG.Num.InputOutputElementDefinition.Description.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyDescriptionDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has Description property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputDiscretizationStepDefined ( )
inlinevirtual

Returns a value indicating whether any input element has DiscretizationStep property defined.

References IG.Num.InputElementDefinition.DiscretizationStep.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputDiscretizationStepDefined ( )
inlinevirtual

Returns a value indicating whether any output element has DiscretizationStep property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyDiscretizationStepDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has DiscretizationStep property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputNumSamplingPointsDefined ( )
inlinevirtual

Returns a value indicating whether any input element has NumSamplingPoints property defined.

References IG.Num.InputElementDefinition.NumSamplingPoints.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputNumSamplingPointsDefined ( )
inlinevirtual

Returns a value indicating whether any output element has NumSamplingPoints property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyNumSamplingPointsDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has NumSamplingPoints property defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputBoundDefined ( )
inlinevirtual

Returns a value indicating whether any input element has bounds defined.

References IG.Num.InputOutputElementDefinition.BoundsDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputBoundDefined ( )
inlinevirtual

Returns a value indicating whether any output element has bounds defined.

References IG.Num.InputOutputElementDefinition.BoundsDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyBoundDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has bounds defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputScalingLengthDefined ( )
inlinevirtual

Returns a value indicating whether any input element has scaling length defined.

References IG.Num.InputOutputElementDefinition.ScalingLengthDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputScalingLengthDefined ( )
inlinevirtual

Returns a value indicating whether any output element has scaling length defined.

References IG.Num.InputOutputElementDefinition.ScalingLengthDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyScalingLengthDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has scaling length defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputTargetValueDefined ( )
inlinevirtual

Returns a value indicating whether any input element has target value defined.

References IG.Num.InputOutputElementDefinition.TargetValueDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputTargetValueDefined ( )
inlinevirtual

Returns a value indicating whether any output element has target value defined.

References IG.Num.InputOutputElementDefinition.TargetValueDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyTargetValueDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has target value defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputDefaultValueDefined ( )
inlinevirtual

Returns a value indicating whether any input element has default value defined.

References IG.Num.InputElementDefinition.DefaultValueDefined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputDefaultValueDefined ( )
inlinevirtual

Returns a value indicating whether any output element has default value defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyDefaultValueDefined ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has default value defined.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputElementIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any input element has element index specified.

References IG.Num.InputOutputElementDefinition.ElementIndexSpecified.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputElementIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any output element has element index specified.

References IG.Num.InputOutputElementDefinition.ElementIndexSpecified.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyElementIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has element index specified.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyInputOptimizationIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any input element has element index specified.

References IG.Num.InputElementDefinition.OptimizationIndexSpecified.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOutputOptimizationIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any output element has element index specified.

virtual bool IG.Num.InputOutputDataDefiniton.IsAnyOptimizationIndexSpecified ( )
inlinevirtual

Returns a value indicating whether any element (either input or output) has element index specified.

static void IG.Num.InputOutputDataDefiniton.GetInputElementNameParameters ( out string  nameBase,
out int  numDigits,
out int  startingIndex,
InputOutputDataDefiniton  def = null,
bool  checkLegalVAriableName = true 
)
inlinestatic

Retuns a base string, number of digits and number starting index for generation of data definition input element names, which it tries to infer from the specified definition data.

If inference was impossible then values are returned.

The returned data is helpful in generation of names for new data elements.

Parameters
nameBaseVariable where name base is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultInputElementNameBase).
numDigitsVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameNumDigits).
startingIndexVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameStartingIndex).
defDefinition data from which name is inferred.

Can be null (in which case inference is skipped and default values returned).

Parameters
checkLegalVAriableNameIndicates whether inferrence is only performed using legal variable names of existing elements, as defined by UtilStr.IsVariableName(string) method.
static void IG.Num.InputOutputDataDefiniton.GetOutputElementNameParameters ( out string  nameBase,
out int  numDigits,
out int  startingIndex,
InputOutputDataDefiniton  def = null,
bool  checkLegalVAriableName = true 
)
inlinestatic

Retuns a base string, number of digits and number starting index for generation of data definition input element names, which it tries to infer from the specified definition data.

If inference was impossible then values are returned.

The returned data is helpful in generation of names for new data elements.

Parameters
nameBaseVariable where name base is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultInputElementNameBase).
numDigitsVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameNumDigits).
startingIndexVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameStartingIndex).
defDefinition data from which name is inferred.

Can be null (in which case inference is skipped and default values returned).

Parameters
checkLegalVAriableNameIndicates whether inferrence is only performed using legal variable names of existing elements, as defined by UtilStr.IsVariableName(string) method.
static void IG.Num.InputOutputDataDefiniton.GetElementNameParameters ( bool  outputElements,
out string  nameBase,
out int  numDigits,
out int  startingIndex,
InputOutputDataDefiniton  def = null,
bool  checkLegalVAriableName = true 
)
inlinestaticprotected

Retuns a base string, number of digits and number starting index for generation of data definition input or output element names, which it tries to infer from the specified definition data.

If inference was impossible then values are returned.

The returned data is helpful in generation of names for new data elements.

Parameters
outputElementsIndicates whether name generation parameters are obtained for output elements (if false then input elements are considered instead).
nameBaseVariable where name base is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultInputElementNameBase).
numDigitsVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameNumDigits).
startingIndexVariable where number of digits in element names is stored. If it can not be inferred from def then default is stored (property InputOutputDataDefiniton.DefaultElementNameStartingIndex).
defDefinition data from which name is inferred.

Can be null (in which case inference is skipped and default values returned).

Parameters
checkLegalVAriableNameIndicates whether inferrence is only performed using legal variable names of existing elements, as defined by UtilStr.IsVariableName(string) method.

References IG.Lib.UtilStr.IsVariableName(), and IG.Num.InputOutputElementDefinition.Name.

static string IG.Num.InputOutputDataDefiniton.CreateInputElementName ( int  elementIndex,
InputOutputDataDefiniton  def = null,
bool  checkLegalVAriableName = true 
)
inlinestatic

Generates and returns name of the input data element with the specified index.

Existing data definition may be eventually used to infer generation parameters (base name, number of digits appended to base name as index, and starting index).

Parameters
elementIndexIndex of the element wose name is generated.
defModel definition data used to infer parameters of name generation.

If specified then base name, number of appended digita and starting index are inferred from this data.

Otherwise, default values are taken (i.e. DefaultInputElementNameBase, DefaultElementNameNumDigits, DefaultElementNameStartingIndex).

Parameters
checkLegalVAriableNameIf true (which is default) then parameters are only infered from those names in the existing data definition (if specified) that satisfy variable name rules in programming languages such as C++, Java or C#.
Returns

Referenced by IG.Forms.InpuOrOutputtDataDefinitionControl.CreateInputElementName().

static string IG.Num.InputOutputDataDefiniton.CreateOutputElementName ( int  elementIndex,
InputOutputDataDefiniton  def = null,
bool  checkLegalVAriableName = true 
)
inlinestatic

Generates and returns name of the output data element with the specified index.

Existing data definition may be eventually used to infer generation parameters (base name, number of digits appended to base name as index, and starting index).

Parameters
elementIndexIndex of the element wose name is generated.
defModel definition data used to infer parameters of name generation.

If specified then base name, number of appended digita and starting index are inferred from this data.

Otherwise, default values are taken (i.e. DefaultOutputElementNameBase, DefaultElementNameNumDigits, DefaultElementNameStartingIndex).

Parameters
checkLegalVAriableNameIf true (which is default) then parameters are only infered from those names in the existing data definition (if specified) that satisfy variable name rules in programming languages such as C++, Java or C#.
Returns

Referenced by IG.Forms.InpuOrOutputtDataDefinitionControl.CreateOutputElementName().

static InputOutputDataDefiniton IG.Num.InputOutputDataDefiniton.CreateDefault ( int  inputLength,
int  outputLength 
)
inlinestatic

Creates and returns a data definition with fields set to default values.

Parameters
inputLengthNumber of input elements.
outputLengthNumber of output elements.

References IG.Num.InputOutputDataDefiniton.AddInputElement(), and IG.Num.InputOutputDataDefiniton.AddOutputElement().

Referenced by IG.Forms.InputOutputDataDefinitionControl.btnGenerateTestData_Click(), IG.Forms.VectorFunctionPlotter1d.btnTestFunction_Click(), and IG.Forms.VectorFunctionPlotter2d.btnTestFunction_Click().

static InputOutputDataDefiniton IG.Num.InputOutputDataDefiniton.Create ( int  inputLength,
int  outputLength,
bool  assignNames = false,
bool  assignDescriptions = false,
string  inputNameBase = null,
string  outputNameBase = null,
int  numNameDigits = -1,
int  startIndex = -1,
string  digitSeparator = "_",
string  inputDescriptionBase = "Input parameter No. ",
string  outputDescriptionBase = "Output value No. ",
string  digitSeparatorDescriptions = "",
string  descriptionsEnd = "." 
)
inlinestatic

Creates and returns definition a new definition data with specified dimensions of input and otput spaces (domains and codomains in case of functions) and eventually assigns names and descriptions to input and output elements.

Default values for parameters are such that meaningful data is generated by default (apart from assignNames and assignDescriptions ).

Parameters
inputLengthNumber of input parameters.
outputLengthNumber of outpput values.
assignNamesWhether names are assigned to elements. Default is false.
assignDescriptionsWhether descriptions are assigned (default is false).
inputNameBaseBase for input parameters names. If null (which is default) or empty string then DefaultInputElementNameBase is taken.
outputNameBaseBase for output values names. If null (which is default) or empty string then DefaultOutputElementNameBase is taken.
numNameDigitsNumber of digits incorporated into names. If less than 1 (default is -1) then DefaultElementNameNumDigits is taken.
startIndexNumber where digits appended to variable names start. If less than 0 (default is -1) then DefaultElementNameStartingIndex is taken.

If descriptions are also generated then this also applies to them.

Parameters
digitSeparatorSeparator that is printed between element's name base and digit (when specified).
inputDescriptionBaseBase for input element description, to which sequential number is added.
outputDescriptionBaseBase for output element description, to which sequential number is added.
digitSeparatorDescriptionsSeparator that separates (when specified) description base and number.
descriptionsEndFinal part that comes after the sequential number, with which description is ended (when specified)

References IG.Num.InputOutputDataDefiniton.AddInputElement(), IG.Num.InputOutputDataDefiniton.AddOutputElement(), IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputElementDefinition.Name, and IG.Num.InputOutputElementDefinition.Title.

static void IG.Num.InputOutputDataDefiniton.SaveJson ( InputOutputDataDefiniton  dataDef,
string  filePath 
)
inlinestatic

Saves input/output data definition to the specified JSON file. File is owerwritten if it exists.

Parameters
dataDefObject that is saved to a file.
filePathPath to the file where training data is saved.

Referenced by IG.Forms.InputOutputDataDefinitionControl.btnSave_Click(), and IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

static void IG.Num.InputOutputDataDefiniton.LoadJson ( string  filePath,
ref InputOutputDataDefiniton  dataDefRestored 
)
inlinestatic
static void IG.Num.InputOutputDataDefiniton.SupplementDataDefinition ( InputOutputDataDefiniton  data,
SampledDataSet  trainingData 
)
inlinestatic

Suplements the specified data definition object with information that is extracted from the training data set. Some data is updated independently of the training data set, and this data is updated even if the training data set is not specified. If bounds on input parameters and output values are not defined then bounds are set to bounds within which training data fits. If default values and target values are not specified then these values are set to centers of intervals. If names, titles and descriptions are not specified (null or empty string) then default strings are provided. If optimization parameter indices are not specified for input parameters then these indices are taken the same as elementindices. For fields that have the corresponding "...Defined" flag, data is recalculated only if that flag is set to false. In order to ensure recalculation of such fields, set the corresponding flags to false (for example, BoundsDefined for MinimalValue and MaximalValue, ScalingLengthDefined for ScalingLength, TargetValueDefined for TargetValue, etc.).

Parameters
dataDefinition data that is updated.
trainingDataTraining data that is used to calculate some values. If null then values which would be calculated form training data are not updated.

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputElementDefinition.DefaultValueDefined, IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputElementDefinition.ElementIndex, IG.Num.InputOutputElementDefinition.ElementIndexSpecified, IG.Num.InputOutputDataDefiniton.GetInputElement(), IG.Num.SampledDataSet.GetInputRange(), IG.Num.InputOutputDataDefiniton.GetOutputElement(), IG.Num.SampledDataSet.GetOutputRange(), IG.Num.InputOutputDataDefiniton.InputLength, IG.Num.InputOutputElementDefinition.IsInput, IG.Num.InputOutputElementDefinition.MaximalValue, IG.Num.InputOutputElementDefinition.MinimalValue, IG.Num.InputOutputElementDefinition.Name, IG.Num.InputElementDefinition.OptimizationIndex, IG.Num.InputElementDefinition.OptimizationIndexSpecified, IG.Num.InputOutputDataDefiniton.OutputLength, IG.Num.InputOutputElementDefinition.ScalingLength, IG.Num.InputOutputElementDefinition.ScalingLengthDefined, IG.Num.InputOutputElementDefinition.TargetValue, IG.Num.InputOutputElementDefinition.TargetValueDefined, and IG.Num.InputOutputElementDefinition.Title.

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

static void IG.Num.InputOutputDataDefiniton.SupplementDataDefinition ( string  dataDefinitionPath,
string  trainingDataPath 
)
inlinestatic

Suplements the specified data definition object with information that is extracted from the training data set and with automatically generated information.

Parameters
dataDefinitionPathPath to the original data definition file. It can be unspecified, in this case the initial data definition object is created and initialized with some default values.
trainingDataPathPath to the training data. It can be unspecified, in this case training data is not used, and only the data that can have some default values is updated.
static void IG.Num.InputOutputDataDefiniton.SupplementDataDefinition ( string  dataDefinitionPath,
string  trainingDataPath,
string  updatedDataDefinitionPath 
)
inlinestatic

Suplements the specified data definition object with information that is extracted from the training data set and with automatically generated information.

Parameters
dataDefinitionPathPath to the original data definition file. It can be unspecified, in this case the initial data definition object is created and initialized with some default values.
trainingDataPathPath to the training data. It can be unspecified, in this case training data is not used, and only the data that can have some default values is updated.
updatedDataDefinitionPathPath where the updated data defiition is saved. It can be the same path as for the original file.

References IG.Num.SampledDataSet.LoadJson(), and IG.Num.InputOutputDataDefiniton.LoadJson().

static void IG.Num.InputOutputDataDefiniton.Copy ( InputOutputDataDefiniton  original,
ref InputOutputDataDefiniton  copy 
)
inlinestatic

Copies data from one data definition to another.

Parameters
originalSource object that data is copied from.
copyObject to which data is copied.

If original object is null then destination object is also set to null. If destination object is nul then it is allocated anew.

References IG.Num.InputOutputDataDefiniton.CopyPlain().

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData().

static InputOutputDataDefiniton IG.Num.InputOutputDataDefiniton.CreateExample ( int  inputLength,
int  outputLength 
)
inlinestatic

Creates and returns an example data definition.

Parameters
inputLengthNumber of input elements.
outputLengthNumber of output elements.

References IG.Num.InputOutputDataDefiniton.AddInputElement(), and IG.Num.InputOutputDataDefiniton.AddOutputElement().

override string IG.Num.InputOutputDataDefiniton.ToString ( )
inline

Returns string representation of the current object.

Member Data Documentation

string IG.Num.InputOutputDataDefiniton.DefaultName = null
static

Default value of the Name property of the input and output data definitions.

string IG.Num.InputOutputDataDefiniton.DefaultDescription = null
static

Default value of the Description property of the input and output data definitions.

string IG.Num.InputOutputDataDefiniton._name = DefaultName
protected
string IG.Num.InputOutputDataDefiniton._description = DefaultDescription
protected
List<InputElementDefinition> IG.Num.InputOutputDataDefiniton._input = new List<InputElementDefinition>()
protected
List<OutputElementDefinition> IG.Num.InputOutputDataDefiniton._output = new List<OutputElementDefinition>()
protected
string IG.Num.InputOutputDataDefiniton._defaultInputElementNameBase = "InputParameter"
staticprivate
string IG.Num.InputOutputDataDefiniton._defaultOutputElementNameBase = "OutputValue"
staticprivate
int IG.Num.InputOutputDataDefiniton._defaultElementNameNumDigits = 2
staticprivate
int IG.Num.InputOutputDataDefiniton._defaultElementNameStatingIndex = 0
staticprivate

Property Documentation

string IG.Num.InputOutputDataDefiniton.Name
getset

Name of the current definition of input parameters and output values of a model.

Default value is specified by the static property InputOutputDataDefiniton.DefaultName.

Referenced by IG.Num.InputOutputDataDefinitonDto.CopyFromPlain(), and IG.Num.InputOutputDataDefiniton.CopyPlain().

string IG.Num.InputOutputDataDefiniton.Description
getset

Description of the current definition of input parameters and output values of a model.

Default value is specified by the static property InputOutputDataDefiniton.DefaultDescription.

Referenced by IG.Num.InputOutputDataDefinitonDto.CopyFromPlain(), and IG.Num.InputOutputDataDefiniton.CopyPlain().

virtual List<InputElementDefinition> IG.Num.InputOutputDataDefiniton.InputElementList
get
virtual List<OutputElementDefinition> IG.Num.InputOutputDataDefiniton.OutputElementList
get
string IG.Num.InputOutputDataDefiniton.DefaultInputElementNameBase
staticgetset

Default name base for input data elements.

When set, the value must be a legal variable name in languages like C#, which is checked by UtilStr.IsVariableName(string) function.

Initially set to "InputParameter" but can be changed programatically.

string IG.Num.InputOutputDataDefiniton.DefaultOutputElementNameBase
staticgetset

Default name base for output data elements.

When set, the value must be a legal variable name in languages like C#, which is checked by UtilStr.IsVariableName(string) function.

Initially set to "OutputValue" but can be changed programatically.

int IG.Num.InputOutputDataDefiniton.DefaultElementNameNumDigits
staticgetset

Default number of digits in generated input or output data element names (this refers to digits appended to name base).

When set, it must be greater than 0.

Initially set to 2 but can be changed programatically.

int IG.Num.InputOutputDataDefiniton.DefaultElementNameStartingIndex
staticgetset

Default starting index in generated input or output data element names (this refers to digits appended to name base).

When set, it must be greater or equal than 0.

Initially set to 0 but can be changed programatically.


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