IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Single objective optimization analysis results. Used to transfer parameters input (e.g. vector of parameters, request flags) to the analysis function and to store analysis output results (e.g. objective and constraint functions, their gradients, error codes, and flags indicating what has actually been calculated). REMARKS: Property CopyReferences specifies whether only references are copied when individial object fields are assigned & set (when the property is true), or values are actually copied (when false - deep copy). Each setter method also has the variant that always copies only the reference (function name appended by "Reference"). This makes possible to avoid duplication of allocated data and also to avoid having different data with the same references. AGREEMENTS: Optimization problem is defined as minimize f(x), subject to: c_i(x)<=0, i=0...NI-1 c_j(x)=0, j=NI...NI+NE-1. Here x is vector of parameters, f(x) is the objective function, and c_i(x) and c_j(c) are constraint functions. NI is number of inequality constraints and NE is number of equality constraints. If there are equality constraints then they are listed after inequality constraints. More...
Public Member Functions | |
AnalysisResults () | |
1 parameter, no constraints, 1 objective function. No gradients required | |
AnalysisResults (bool reqGradients) | |
1 parameter, no constraints, 1 objective function. | |
AnalysisResults (int numParameters) | |
Specified number of parameters, 1 objective, no constraints. No gradients required. | |
AnalysisResults (int numParameters, bool reqGradients) | |
Specified number of parameters, 1 objective, no constraints. No gradients required. | |
AnalysisResults (int numParameters, int numConstraints) | |
Specified number of parameters and constraints, 1 objective. No gradients required. | |
AnalysisResults (int numParameters, int numConstraints, bool reqGradients) | |
Specified number of parameters and constraints, 1 objective. No gradients required. | |
virtual bool | IsEqualityConstraint (int which) |
Returns true if the specified constraint is an equality constraint, and false otherwise. | |
virtual IVector | GetParameters () |
Returns vector of optimization parameters. | |
virtual void | SetParameters (IVector value) |
Sets the vector of optimization parameters. If CopyReferences=true (false by default) then only the reference is copied. | |
virtual void | SetParametersReference (IVector reference) |
Sets the vector of optimization parameters. Only the reference is copied. | |
virtual double | GetParameter (int index) |
Returns specific optimization parameter. Throws exception if not defined or index out of bounds. | |
virtual void | SetParameter (int index, double value) |
Sets the specified optimization parameter. | |
virtual double | GetObjective () |
Returns the value of the objective function./summary> | |
virtual void | SetObjective (double value) |
Sets the value of the objective function. | |
virtual IVector | GetObjectiveGradient () |
Returns the objective function gradient. | |
virtual void | SetObjectiveGradient (IVector value) |
Sets the objective function gradient. If CopyReferences=true (false by default) then only the reference is copied. | |
virtual void | SetObjectiveGradientReference (IVector reference) |
Sets the objective function gradient. Only the reference is copied. | |
virtual double | GetObjectiveGradient (int index) |
Returns the specified component of the objective function gradient. | |
virtual void | SetObjectiveGradient (int index, double value) |
Sets the specified component of the objective function gradient. | |
virtual List< double > | GetConstraints () |
Returns a list of constraint function values. | |
virtual void | SetConstraints (List< double > values) |
Sets the list of constraint function values. If CopyReferences=true (false by default) then only the list reference is copied. | |
virtual void | SetConstraintsReference (List< double > reference) |
Sets the list of constraint function values. Only the list reference is copied. | |
virtual double | GetConstraint (int which) |
Returns the specified constraint function value. | |
virtual void | SetConstraint (int which, double value) |
Sets the specified constraint function value. | |
virtual List< IVector > | GetConstraintGradients () |
Returns a list of constraint function gradients. | |
virtual void | SetConstraintGradients (List< IVector > values) |
Sets constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied. | |
virtual void | SetConstraintGradientsReference (List< IVector > reference) |
Sets constraint function gradients. Only the list reference is copied. | |
virtual IVector | GetConstraintGradient (int which) |
Returns the gradient of the specified constraint function. | |
virtual double | GetConstraintGradient (int which, int index) |
Returns the specific constraint function gradient component. | |
virtual void | SetConstraintGradient (int which, IVector value) |
Sets the specified constraint function gradient. If CopyReferences=true (false by default) then only the reference is copied. | |
virtual void | SetConstraintGradientReference (int which, IVector reference) |
Sets the specified constraint function gradient. Only the reference is copied. | |
virtual void | SetConstraintGradient (int which, int index, double value) |
Sets the specified constraint fuction gradient component. | |
virtual IMatrix | GetObjectiveHessian () |
Returns the objective function's Hessian. | |
virtual void | SetObjectiveHessian (IMatrix value) |
Sets the objective functions' Hessian. If CopyReferences=true (false by default) then only the reference is copied. | |
virtual void | SetObjectiveHessianReference (IMatrix reference) |
Sets the objective functions' Hessian. Only the reference is copied. | |
virtual double | GetObjectiveHessian (int rowIndex, int columnIndex) |
Returns the specified component of the objective function Hessian. | |
virtual void | SetObjectiveHessian (int rowIndex, int columnIndex, double value) |
Sets the specified component of the objective function's Hessian. | |
virtual List< IMatrix > | GetConstraintHessians () |
Returns the list of constraint functions' Hessians. | |
virtual void | SetConstraintHessians (List< IMatrix > values) |
Sets constraint functios' Hessians. If CopyReferences=true (false by default) then only the list reference is copied. | |
virtual void | SetConstraintHessiansReference (List< IMatrix > reference) |
Sets constraint functios' Hessians. Only the list reference is copied. | |
virtual IMatrix | GetConstraintHessian (int which) |
Returns Hessian of the specified constraint function. | |
virtual double | GetConstraintHessian (int which, int rowIndex, int columnIndex) |
Returns the specified component of Hessian of the specified constraint function. | |
virtual void | SetConstraintHessian (int which, IMatrix value) |
Sets the specified constraint function's Hessian. If CopyReferences=true (false by default) then only the reference is copied. | |
virtual void | SetConstraintHessianReference (int which, IMatrix reference) |
Sets the specified constraint function's Hessian. Only the reference is copied. | |
virtual void | SetConstraintHessian (int which, int rowIndex, int columnIndex, double value) |
Sets the specified component of the specified constraint's Hessian. | |
virtual void | NullifyAll () |
Sets all objects (parameters and result objects) to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection. | |
virtual void | NullifyResults () |
Sets all result objects to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection. | |
virtual void | AllocateParameters () |
Allocates space for parameters. | |
virtual void | AllocateRequested () |
Allocates space for all requested result objects. | |
virtual void | AllocateObjectiveGradient () |
Allocate space for objective function gradient. | |
virtual void | AllocateObjectiveHessian () |
Allocates space for objective function Hessian. | |
virtual void | AllocateConstraintsList () |
Allocates space for list of constraint functions. | |
virtual void | AllocateConstraintGradientsList () |
Allocates space for list of constraint function gradients. | |
virtual void | AllocateConstrainGradients () |
Allocates space for constraint function gradients (including for the list, if necessarty). | |
virtual void | AllocateConstraintGradient (int which) |
Allocates space for the specified constraint function gradient. | |
virtual void | AllocateConstraintHessiansList () |
Allocates space for the list of constraint functions' Hessians. | |
virtual void | AllocateConstraintHessians () |
Allocates space for constraint functions' Hessians (including space for the list, if necessary). | |
virtual void | AllocateConstraintHessian (int which) |
Allocates space for the specified constraint fucnction's Hessian. | |
virtual void | ResetResults () |
Sets all calculated flags to false, error code to 0 (no error) and error string to null. | |
virtual void | SetDimensions (int numParameters, int numConstraints) |
Sets the dimension of the analysis results object according to the specified values. Number of objective functions is set to 1. | |
virtual void | SetDimensions (int numParameters, int numObjectives, int numConstraints) |
Sets the dimension of the analysis results object according to the specified values. | |
virtual void | PrepareResultStorage () |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. Things whose calculation is not requested are not calculated. | |
virtual void | PrepareResultStorage (bool resetCalculatedFlags) |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. Things whose calculation is not requested are not calculated. | |
virtual void | PrepareResultStorage (int numParameters, int numConstraints) |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters and constraints while number of objective functions is set to 1).Things whose calculation is not requested are not calculated. | |
virtual void | PrepareResultStorage (int numParameters, int numObjectives, int numConstraints) |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated. | |
virtual void | PrepareResultStorage (int numParameters, int numObjectives, int numConstraints, bool resetCalculatedFlags) |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated. | |
virtual void | Copy (IAnalysisResults results) |
Copies data from another analysis results. | |
virtual IAnalysisResults | GetCopy () |
Returns an exact deep copy of the current object. | |
virtual bool | IsViolated (int which, double equalityTolerance) |
Returns true if the specified constraint is violated according to the current analysis results, false otherwise. | |
virtual bool | IsViolated (int which) |
Returns true if the specified constraint is violated according to the current analysis results, false otherwise. | |
virtual bool | IsFeasible (double equalityTolerance) |
Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true. | |
virtual bool | IsFeasible () |
Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true. | |
virtual int | GetNumViolatedConstraints (double equalityTolerance) |
Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual int | GetNumViolatedConstraints () |
Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual double | GetSumResiduals (double equalityTolerance) |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual double | GetSumResiduals () |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual double | GetMaximalResidual (double equalityTolerance) |
Returns the largest constraint function value corresponding to any violated constraint in the current analysis results, or 0 if there are no violated constraints. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual double | GetMaximalResidual () |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0. | |
virtual double | GetPenaltyTerm (int which, IPenaltyEvaluator evaluator) |
Returns value of the penalty term corresponding to the specified constraint, calculated by the specified penalty evaluator. | |
virtual double | GetSumPenaltyTerms (IPenaltyEvaluator evaluator) |
Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator. | |
virtual double | GetMaxPenaltyTerm (IPenaltyEvaluator evaluator) |
Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator. | |
override string | ToString () |
Returns a string representation of the current analysis results object in a standard IGLib form. | |
string | ToStringMath () |
Returns a string representation of the current analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers). | |
Static Public Member Functions | |
static string | ToString (IAnalysisResults anres) |
Returns a string representation of the specified analysis results object in a standard IGLib form. | |
static string | ToStringRequestMath (IAnalysisResults anres) |
Returns a string representation of the specified analysis request object in a standard IGLib form (Mathematica-like format but with C representation of numbers). | |
static string | ToStringMath (IAnalysisResults anres) |
Returns a string representation of the specified analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers). | |
static void | LoadStringRequestMath (string requestString, ref AnalysisResults anres) |
Reads analysis request data. | |
static void | LoadStringMath (string analysisOutputString, ref AnalysisResults anres) |
Reads analysis results data. | |
static void | SaveRequestMath (IAnalysisResults anres, string filePath) |
Saves the specified analysis request to a file. If the file already exists then it is overwritten. | |
static void | SaveRequestMath (IAnalysisResults anres, string filePath, bool append) |
Saves the specified analysis request to a file. | |
static void | SaveMath (IAnalysisResults anres, string filePath) |
Saves the specified analysis results to a file. If the file already exists then it is overwritten. | |
static void | SaveMath (IAnalysisResults anres, string filePath, bool append) |
Saves the specified analysis results to a file. | |
static void | LoadRequestMath (string filePath, ref AnalysisResults anResults) |
Loads analysis request data from a file in standard mathematical format and stores it in the specified analysis results object. | |
static void | LoadMath (string filePath, ref AnalysisResults anResults) |
Loads analysis results from a file in standard mathematical format and stores it in the specified analysis results object. | |
static void | SaveRequestJson (AnalysisResults anResulsts, string filePath) |
Saves (serializes) the specified analysis request to the specified JSON file. File is owerwritten if it exists. | |
static void | SaveRequestJson (AnalysisResults anResults, string filePath, bool append) |
Saves (serializes) the specified analysis request to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag. | |
static void | LoadRequestJson (string filePath, ref AnalysisResults anResultsRestored) |
Restores (deserializes) analysis request from the specified file in JSON format. | |
static void | SaveJson (AnalysisResults anResulsts, string filePath) |
Saves (serializes) the specified analysis results to the specified JSON file. File is owerwritten if it exists. | |
static void | SaveJson (AnalysisResults anResults, string filePath, bool append) |
Saves (serializes) the specified analysis results to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag. | |
static void | LoadJson (string filePath, ref AnalysisResults anResultsRestored) |
Restores (deserializes) analysis results from the specified file in JSON format. | |
static AnalysisResults | CreateExample (int numParameters, int numConstraints, bool reqObjective, bool reqConstraints, bool reqObjectiveGradient, bool reqConstraintGradients, bool reqObjectiveHessian, bool reqConstraintHessians) |
Creates an example analysis results object according to parameters, with some arbitrary result components. | |
Static Protected Member Functions | |
static void | AppendRequestFlagsMath (StringBuilder sb, IAnalysisResults anres) |
Protected Attributes | |
int | _numParameters = 0 |
int | _numObjectives = 1 |
int | _numConstraints = 0 |
int | _numEqualityConstraints = 0 |
IVector | _parameters |
double | _objective |
IVector | _objectiveGradient |
IMatrix | _objectiveHessian |
List< double > | _constraints |
List< IVector > | _constraintGradients |
List< IMatrix > | _constraintHessians |
bool | _copyReferences = false |
bool | _reqObjective = false |
bool | _reqConstraints = false |
bool | _reqObjectiveGradient = false |
bool | _reqConstraintGradients = false |
bool | _reqObjectiveHessian = false |
bool | _reqConstraintHessians = false |
int | _errorCode = 0 |
string | _errorString = null |
bool | _calcObjective = false |
bool | _calcConstraints = false |
bool | _calcObjectiveGradient = false |
bool | _calcConstraintGradients = false |
bool | _calcObjectiveHessian = false |
bool | _calcConstraintHessians = false |
Properties | |
virtual int | NumParameters [get, set] |
Number of parameters. | |
virtual int | NumObjectives [get, set] |
Number of objective functions (normally 1 for this type, but can be 0). | |
virtual int | NumConstraints [get, set] |
Number of constraints. | |
virtual int | NumEqualityConstraints [get, set] |
Number of equality constraints. | |
virtual int | NumInequalityConstraints [get] |
Returns number of inequality constraints. | |
virtual bool | CopyReferences [get, set] |
Indicates whether just references can be copied when setting optimization parameters or results. If false then deep copy is always performed. Default is false. | |
virtual IVector | Parameters [get, set] |
Optimization parameters. If CopyReferences=true (false by default) then only the reference is copied when assigning. | |
virtual double | Objective [get, set] |
Value of the objective function. | |
virtual IVector | ObjectiveGradient [get, set] |
Objective function gradient. If CopyReferences=true (false by default) then only the reference is copied in assignments. | |
virtual List< double > | Constraints [get, set] |
Constraint function values. If CopyReferences=true (false by default) then only the list reference is copied in assignments. | |
virtual List< IVector > | ConstraintGradients [get, set] |
Constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied in assignments. | |
virtual IMatrix | ObjectiveHessian [get, set] |
Objective function Hessian (matrix of second derivatives). If CopyReferences=true (false by default) then only the reference is copied in assignments. | |
virtual List< IMatrix > | ConstraintHessians [get, set] |
Constraint functions' Hessians (matrices of second derivatives). If CopyReferences=true (false by default) then only the list reference is copied in assignments. | |
virtual bool | ReqObjective [get, set] |
Indicates whether calculation of objective function is/was requested. | |
virtual bool | ReqObjectiveGradient [get, set] |
Indicates whether calculation of objective function gradient is/was requested. | |
virtual bool | ReqObjectiveHessian [get, set] |
Indicates whether calculation of objective function Hessian is/was requested. | |
virtual bool | ReqConstraints [get, set] |
Indicates whether calculation of constraint functions is/was requested. | |
virtual bool | ReqConstraintGradients [get, set] |
Indicates whether calculation of constraint functions gradient is/was requested. | |
virtual bool | ReqConstraintHessians [get, set] |
Indicates whether calculation of constraint functions Hessian is/was requested. | |
virtual int | ErrorCode [get, set] |
Error code. 0 - everything is OK. negative value - something went wrong. | |
virtual String | ErrorString [get, set] |
Error string indicating what went wrong. | |
virtual bool | Calculated [get, set] |
Collectively gets or sets calculated flags. Set false: all calculated flags are set to false. Set true: all calculated flags for which the corresponding request flags are true, are set to truee, others are set to false. Get: returns true if all the flags for which the corresponding request flags are true, are also true. Otherwise returns false. | |
virtual bool | CalculatedObjective [get, set] |
Indicates whether calculation of objective function is/was requested. | |
virtual bool | CalculatedObjectiveGradient [get, set] |
Indicates whether calculation of objective function gradient is/was requested. | |
virtual bool | CalculatedObjectiveHessian [get, set] |
Indicates whether calculation of objective function Hessian is/was requested. | |
virtual bool | CalculatedConstraints [get, set] |
Indicates whether calculation of constraint functions is/was requested. | |
virtual bool | CalculatedConstraintGradients [get, set] |
Indicates whether calculation of constraint functions gradient is/was requested. | |
virtual bool | CalculatedConstraintHessians [get, set] |
Indicates whether calculation of constraint functions Hessian is/was requested. | |
Static Private Member Functions | |
static string | ToStringMath (bool value) |
Returns a atring representation of a boolean value: "0" for false and "1" for true. | |
static void | ReadAnalysisRequest (string filePath, ref IVector parameters, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr, ref string cd) |
Read the analysis data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }. | |
static void | GetAnalysisRequest (string requestString, ref IVector parameters, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr, ref string cd) |
Read the analysis request data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }. | |
static void | ReadAnalysisResult (string filePath, ref IVector parameters, ref bool calcobj, ref bool calcconstr, ref bool calcgradobj, ref bool calcgradconstr, ref double obj, ref IVector constr, ref IVector dobjdp, ref IVector[] dconstr, ref int errorcode, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr) |
Read the analysis result data from data file Format: | |
static void | GetAnalysisResult (string requestString, ref IVector parameters, ref bool calcobj, ref bool calcconstr, ref bool calcgradobj, ref bool calcgradconstr, ref double obj, ref IVector constr, ref IVector dobjdp, ref IVector[] dconstr, ref int errorcode, ref bool reqcalcobj, ref bool reqcalcconstr, ref bool reqcalcgradobj, ref bool reqcalcgradconstr) |
Read the analysis result data from data file Format: |
Single objective optimization analysis results. Used to transfer parameters input (e.g. vector of parameters, request flags) to the analysis function and to store analysis output results (e.g. objective and constraint functions, their gradients, error codes, and flags indicating what has actually been calculated). REMARKS: Property CopyReferences specifies whether only references are copied when individial object fields are assigned & set (when the property is true), or values are actually copied (when false - deep copy). Each setter method also has the variant that always copies only the reference (function name appended by "Reference"). This makes possible to avoid duplication of allocated data and also to avoid having different data with the same references. AGREEMENTS: Optimization problem is defined as minimize f(x), subject to: c_i(x)<=0, i=0...NI-1 c_j(x)=0, j=NI...NI+NE-1. Here x is vector of parameters, f(x) is the objective function, and c_i(x) and c_j(c) are constraint functions. NI is number of inequality constraints and NE is number of equality constraints. If there are equality constraints then they are listed after inequality constraints.
$A Igor Jan08 Jun08;
IG::Num::AnalysisResults::AnalysisResults | ( | ) | [inline] |
1 parameter, no constraints, 1 objective function. No gradients required
IG::Num::AnalysisResults::AnalysisResults | ( | bool | reqGradients | ) | [inline] |
1 parameter, no constraints, 1 objective function.
reqGradients | Whether gradient of the objective function is required. |
IG::Num::AnalysisResults::AnalysisResults | ( | int | numParameters | ) | [inline] |
Specified number of parameters, 1 objective, no constraints. No gradients required.
numParameters | Number of parameters. |
IG::Num::AnalysisResults::AnalysisResults | ( | int | numParameters, |
bool | reqGradients | ||
) | [inline] |
Specified number of parameters, 1 objective, no constraints. No gradients required.
numParameters | Number of parameters. |
reqGradients | Whether gradients are requested. |
IG::Num::AnalysisResults::AnalysisResults | ( | int | numParameters, |
int | numConstraints | ||
) | [inline] |
Specified number of parameters and constraints, 1 objective. No gradients required.
numParameters | Number of parameters. |
numConstraints | Number of constraints. |
IG::Num::AnalysisResults::AnalysisResults | ( | int | numParameters, |
int | numConstraints, | ||
bool | reqGradients | ||
) | [inline] |
Specified number of parameters and constraints, 1 objective. No gradients required.
numParameters | Number of parameters. |
numConstraints | Number of constraints. |
virtual bool IG::Num::AnalysisResults::IsEqualityConstraint | ( | int | which | ) | [inline, virtual] |
Returns true if the specified constraint is an equality constraint, and false otherwise.
which | Index of constraint to determine the type. |
virtual IVector IG::Num::AnalysisResults::GetParameters | ( | ) | [inline, virtual] |
Returns vector of optimization parameters.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetParameters | ( | IVector | value | ) | [inline, virtual] |
Sets the vector of optimization parameters. If CopyReferences=true (false by default) then only the reference is copied.
value | Value to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetParametersReference | ( | IVector | reference | ) | [inline, virtual] |
Sets the vector of optimization parameters. Only the reference is copied.
value | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetParameter | ( | int | index | ) | [inline, virtual] |
Returns specific optimization parameter. Throws exception if not defined or index out of bounds.
iindex | Index of parameter to be returned (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetParameter | ( | int | index, |
double | value | ||
) | [inline, virtual] |
Sets the specified optimization parameter.
index | Index of parameter to be set (counting from 0). |
value | Parameter value. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetObjective | ( | ) | [inline, virtual] |
Returns the value of the objective function./summary>
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjective | ( | double | value | ) | [inline, virtual] |
Sets the value of the objective function.
value | Value to be assigned to the objective function. |
Implements IG::Num::IAnalysisResults.
virtual IVector IG::Num::AnalysisResults::GetObjectiveGradient | ( | ) | [inline, virtual] |
Returns the objective function gradient.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveGradient | ( | IVector | value | ) | [inline, virtual] |
Sets the objective function gradient. If CopyReferences=true (false by default) then only the reference is copied.
value | Value to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveGradientReference | ( | IVector | reference | ) | [inline, virtual] |
Sets the objective function gradient. Only the reference is copied.
value | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetObjectiveGradient | ( | int | index | ) | [inline, virtual] |
Returns the specified component of the objective function gradient.
index | Index of the component. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveGradient | ( | int | index, |
double | value | ||
) | [inline, virtual] |
Sets the specified component of the objective function gradient.
index | Index of objective gradient component to be set. |
value | Value of the objective gradient component. |
Implements IG::Num::IAnalysisResults.
virtual List<double> IG::Num::AnalysisResults::GetConstraints | ( | ) | [inline, virtual] |
Returns a list of constraint function values.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraints | ( | List< double > | values | ) | [inline, virtual] |
Sets the list of constraint function values. If CopyReferences=true (false by default) then only the list reference is copied.
values | Values of constraint functions. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintsReference | ( | List< double > | reference | ) | [inline, virtual] |
Sets the list of constraint function values. Only the list reference is copied.
values | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetConstraint | ( | int | which | ) | [inline, virtual] |
Returns the specified constraint function value.
which | Specifies which constraint function to return (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraint | ( | int | which, |
double | value | ||
) | [inline, virtual] |
Sets the specified constraint function value.
which | Specifies which constraint function is set (counting from 0). |
value | Assigned value of the constraint function. |
Implements IG::Num::IAnalysisResults.
virtual List<IVector> IG::Num::AnalysisResults::GetConstraintGradients | ( | ) | [inline, virtual] |
Returns a list of constraint function gradients.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintGradients | ( | List< IVector > | values | ) | [inline, virtual] |
Sets constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied.
values | Value to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintGradientsReference | ( | List< IVector > | reference | ) | [inline, virtual] |
Sets constraint function gradients. Only the list reference is copied.
values | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual IVector IG::Num::AnalysisResults::GetConstraintGradient | ( | int | which | ) | [inline, virtual] |
Returns the gradient of the specified constraint function.
which | Specifies which constraint function to take (couonted from 0). |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetConstraintGradient | ( | int | which, |
int | index | ||
) | [inline, virtual] |
Returns the specific constraint function gradient component.
which | Specifies which constraint function to take (couonted from 0). |
index | Specifies gradient component (conted form 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintGradient | ( | int | which, |
IVector | value | ||
) | [inline, virtual] |
Sets the specified constraint function gradient. If CopyReferences=true (false by default) then only the reference is copied.
which | Specifies which constraint function to take (couonted from 0). |
value | Value of the gradient to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintGradientReference | ( | int | which, |
IVector | reference | ||
) | [inline, virtual] |
Sets the specified constraint function gradient. Only the reference is copied.
which | Specifies which constraint function to take (couonted from 0). |
value | Gradient reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintGradient | ( | int | which, |
int | index, | ||
double | value | ||
) | [inline, virtual] |
Sets the specified constraint fuction gradient component.
which | Specifies which constraint function to take (couonted from 0). |
index | Specified index of gradient coponent to be set. |
value | Value to be assigned to the specified component. |
Implements IG::Num::IAnalysisResults.
virtual IMatrix IG::Num::AnalysisResults::GetObjectiveHessian | ( | ) | [inline, virtual] |
Returns the objective function's Hessian.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveHessian | ( | IMatrix | value | ) | [inline, virtual] |
Sets the objective functions' Hessian. If CopyReferences=true (false by default) then only the reference is copied.
value | Value to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveHessianReference | ( | IMatrix | reference | ) | [inline, virtual] |
Sets the objective functions' Hessian. Only the reference is copied.
value | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetObjectiveHessian | ( | int | rowIndex, |
int | columnIndex | ||
) | [inline, virtual] |
Returns the specified component of the objective function Hessian.
rowIndex | Row index of the component (counting from 0). |
columnIndex | Column index of the component (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetObjectiveHessian | ( | int | rowIndex, |
int | columnIndex, | ||
double | value | ||
) | [inline, virtual] |
Sets the specified component of the objective function's Hessian.
rowIndex | Row index of the component (counting from 0). |
columnIndex | Column index of the component (counting from 0). |
value | Value to be assigned to Hessian. |
Implements IG::Num::IAnalysisResults.
virtual List<IMatrix> IG::Num::AnalysisResults::GetConstraintHessians | ( | ) | [inline, virtual] |
Returns the list of constraint functions' Hessians.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintHessians | ( | List< IMatrix > | values | ) | [inline, virtual] |
Sets constraint functios' Hessians. If CopyReferences=true (false by default) then only the list reference is copied.
values | List of Hessians to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintHessiansReference | ( | List< IMatrix > | reference | ) | [inline, virtual] |
Sets constraint functios' Hessians. Only the list reference is copied.
values | Reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual IMatrix IG::Num::AnalysisResults::GetConstraintHessian | ( | int | which | ) | [inline, virtual] |
Returns Hessian of the specified constraint function.
which | Specifies which constraint function it applies to (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetConstraintHessian | ( | int | which, |
int | rowIndex, | ||
int | columnIndex | ||
) | [inline, virtual] |
Returns the specified component of Hessian of the specified constraint function.
which | Specifies which constraint function it applies to (counting from 0). |
rowIndex | Row index of the component (counting from 0). |
columnIndex | Column index of the component (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintHessian | ( | int | which, |
IMatrix | value | ||
) | [inline, virtual] |
Sets the specified constraint function's Hessian. If CopyReferences=true (false by default) then only the reference is copied.
which | Specifies which constraint function it applies to (counting from 0). |
value | Hessian matrix to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintHessianReference | ( | int | which, |
IMatrix | reference | ||
) | [inline, virtual] |
Sets the specified constraint function's Hessian. Only the reference is copied.
which | Specifies which constraint function it applies to (counting from 0). |
value | Hessian matrix reference to be assigned. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetConstraintHessian | ( | int | which, |
int | rowIndex, | ||
int | columnIndex, | ||
double | value | ||
) | [inline, virtual] |
Sets the specified component of the specified constraint's Hessian.
which | Specifies which constraint function it applies to (counting from 0). |
rowIndex | Row index of the component (counting from 0). |
columnIndex | Column index of the component (counting from 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::NullifyAll | ( | ) | [inline, virtual] |
Sets all objects (parameters and result objects) to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::NullifyResults | ( | ) | [inline, virtual] |
Sets all result objects to null. If the references are not assigned elsewhere, these objects become eligible for garbage collection.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateParameters | ( | ) | [inline, virtual] |
Allocates space for parameters.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateRequested | ( | ) | [inline, virtual] |
Allocates space for all requested result objects.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateObjectiveGradient | ( | ) | [inline, virtual] |
Allocate space for objective function gradient.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateObjectiveHessian | ( | ) | [inline, virtual] |
Allocates space for objective function Hessian.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintsList | ( | ) | [inline, virtual] |
Allocates space for list of constraint functions.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintGradientsList | ( | ) | [inline, virtual] |
Allocates space for list of constraint function gradients.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstrainGradients | ( | ) | [inline, virtual] |
Allocates space for constraint function gradients (including for the list, if necessarty).
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintGradient | ( | int | which | ) | [inline, virtual] |
Allocates space for the specified constraint function gradient.
which | Specifies which constraint function it applies to (countinf form 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintHessiansList | ( | ) | [inline, virtual] |
Allocates space for the list of constraint functions' Hessians.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintHessians | ( | ) | [inline, virtual] |
Allocates space for constraint functions' Hessians (including space for the list, if necessary).
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::AllocateConstraintHessian | ( | int | which | ) | [inline, virtual] |
Allocates space for the specified constraint fucnction's Hessian.
which | Specifies which constraint function it applies to (conting form 0). |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::ResetResults | ( | ) | [inline, virtual] |
Sets all calculated flags to false, error code to 0 (no error) and error string to null.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetDimensions | ( | int | numParameters, |
int | numConstraints | ||
) | [inline, virtual] |
Sets the dimension of the analysis results object according to the specified values. Number of objective functions is set to 1.
numParameters | Number of parameters. |
numConstraints | Number of constraints. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::SetDimensions | ( | int | numParameters, |
int | numObjectives, | ||
int | numConstraints | ||
) | [inline, virtual] |
Sets the dimension of the analysis results object according to the specified values.
numParameters | Number of parameters. |
numObjectives | Number of objective functions. |
numConstraints | Number of constraints. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::PrepareResultStorage | ( | ) | [inline, virtual] |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. Things whose calculation is not requested are not calculated.
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::PrepareResultStorage | ( | bool | resetCalculatedFlags | ) | [inline, virtual] |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. Things whose calculation is not requested are not calculated.
resetCalculatedFlags | Whether the calculation flags are reset to false or not. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::PrepareResultStorage | ( | int | numParameters, |
int | numConstraints | ||
) | [inline, virtual] |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters and constraints while number of objective functions is set to 1).Things whose calculation is not requested are not calculated.
numParameters | Number of parameters. |
numConstraints | Number of constraints. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::PrepareResultStorage | ( | int | numParameters, |
int | numObjectives, | ||
int | numConstraints | ||
) | [inline, virtual] |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags, and resets calculation flags to false. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.
numParameters | Number of parameters. |
numObjectives | Number of objective functions. |
numConstraints | Number of constraints. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::PrepareResultStorage | ( | int | numParameters, |
int | numObjectives, | ||
int | numConstraints, | ||
bool | resetCalculatedFlags | ||
) | [inline, virtual] |
Prepares data storage for results (allocates the appropriate vectors, matrices, lists, etc.) according to the numbers of parameters, constraint functions, and request flags. This method also sets dimensions before preparing the storage (i.e. number of parameters, objective functions and constraints).Things whose calculation is not requested are not calculated.
numParameters | Number of parameters. |
numObjectives | Number of objective functions. |
numConstraints | Number of constraints. |
resetCalculatedFlags | Whether the calculation flags are reset to false or not. |
Implements IG::Num::IAnalysisResults.
virtual void IG::Num::AnalysisResults::Copy | ( | IAnalysisResults | results | ) | [inline, virtual] |
Copies data from another analysis results.
res | Analysis results which data is copied from. |
Implements IG::Num::IAnalysisResults.
virtual IAnalysisResults IG::Num::AnalysisResults::GetCopy | ( | ) | [inline, virtual] |
Returns an exact deep copy of the current object.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::IsViolated | ( | int | which, |
double | equalityTolerance | ||
) | [inline, virtual] |
Returns true if the specified constraint is violated according to the current analysis results, false otherwise.
which | Specifies the constraint in question. |
equalityTolerance | Tolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated. |
IndexOutOfRangeException | when constraint index is smaller lesser than 0 or greater than the number of constraints. |
InvalidOperationException | when constraints are not evaluated. |
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::IsViolated | ( | int | which | ) | [inline, virtual] |
Returns true if the specified constraint is violated according to the current analysis results, false otherwise.
which | Specifies the constraint in question. |
IndexOutOfRangeException | when constraint index is smaller lesser than 0 or greater than the number of constraints. |
InvalidOperationException | when constraints are not evaluated. |
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::IsFeasible | ( | double | equalityTolerance | ) | [inline, virtual] |
Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::IsFeasible | ( | ) | [inline, virtual] |
Returns true if the current analysis results represent a feasible point. Feasible point is one where no constraints are violated. For unconstraint problems this method always returns true.
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::GetNumViolatedConstraints | ( | double | equalityTolerance | ) | [inline, virtual] |
Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
equalityTolerance | Tolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated. |
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::GetNumViolatedConstraints | ( | ) | [inline, virtual] |
Returns number of violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetSumResiduals | ( | double | equalityTolerance | ) | [inline, virtual] |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
equalityTolerance | Tolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated. |
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetSumResiduals | ( | ) | [inline, virtual] |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetMaximalResidual | ( | double | equalityTolerance | ) | [inline, virtual] |
Returns the largest constraint function value corresponding to any violated constraint in the current analysis results, or 0 if there are no violated constraints. Specific constraint is violated if the corresponding constraint function is greater than 0.
equalityTolerance | Tolerance for violation of equality constraints. If constraint function corresponding to equality conatraint is less or equal than tolerance then the corresponding constraint is considered non-violated. |
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetMaximalResidual | ( | ) | [inline, virtual] |
Returns sum of constraint function values corresponding to violated constraints in the current analysis results. Specific constraint is violated if the corresponding constraint function is greater than 0.
InvalidOperationException | If constraint optimization results do not contain evaluated constraint values. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetPenaltyTerm | ( | int | which, |
IPenaltyEvaluator | evaluator | ||
) | [inline, virtual] |
Returns value of the penalty term corresponding to the specified constraint, calculated by the specified penalty evaluator.
which | Specifies the constraint in question. |
evaluator | Penalty function evaluator that evaluates penalty functions. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetSumPenaltyTerms | ( | IPenaltyEvaluator | evaluator | ) | [inline, virtual] |
Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.
evaluator | Penalty function evaluator that evaluates penalty functions. |
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::GetMaxPenaltyTerm | ( | IPenaltyEvaluator | evaluator | ) | [inline, virtual] |
Returns sum of the penalty terms corresponding to all constraint, calculated by the specified penalty evaluator.
evaluator | Penalty function evaluator that evaluates penalty functions. |
Implements IG::Num::IAnalysisResults.
static string IG::Num::AnalysisResults::ToStringMath | ( | bool | value | ) | [inline, static, private] |
Returns a atring representation of a boolean value: "0" for false and "1" for true.
value | Value whose string representation is returned. |
static void IG::Num::AnalysisResults::AppendRequestFlagsMath | ( | StringBuilder | sb, |
IAnalysisResults | anres | ||
) | [inline, static, protected] |
static string IG::Num::AnalysisResults::ToString | ( | IAnalysisResults | anres | ) | [inline, static] |
Returns a string representation of the specified analysis results object in a standard IGLib form.
anres | Object whose string representation is returned. |
static string IG::Num::AnalysisResults::ToStringRequestMath | ( | IAnalysisResults | anres | ) | [inline, static] |
Returns a string representation of the specified analysis request object in a standard IGLib form (Mathematica-like format but with C representation of numbers).
anres | Object whose string representation is returned. |
static string IG::Num::AnalysisResults::ToStringMath | ( | IAnalysisResults | anres | ) | [inline, static] |
Returns a string representation of the specified analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).
anres | Object whose string representation is returned. |
static void IG::Num::AnalysisResults::LoadStringRequestMath | ( | string | requestString, |
ref AnalysisResults | anres | ||
) | [inline, static] |
Reads analysis request data.
requestString | |
anres |
$A Igor Mar11; Tako78 Apr11;
static void IG::Num::AnalysisResults::LoadStringMath | ( | string | analysisOutputString, |
ref AnalysisResults | anres | ||
) | [inline, static] |
Reads analysis results data.
analysisOutputString | String from which data is read. |
anres | Object where results are stored. |
$A Igor Mar11; Tako78 Apr11;
static void IG::Num::AnalysisResults::SaveRequestMath | ( | IAnalysisResults | anres, |
string | filePath | ||
) | [inline, static] |
Saves the specified analysis request to a file. If the file already exists then it is overwritten.
anres | Object from which analysis request is saved. |
filePath | Path to the file where analysis request is stored. |
static void IG::Num::AnalysisResults::SaveRequestMath | ( | IAnalysisResults | anres, |
string | filePath, | ||
bool | append | ||
) | [inline, static] |
Saves the specified analysis request to a file.
anres | Object from which analysis request is saved. |
filePath | Path to the file where analysis request is stored. |
append | If true then contents are appended to the end of the file if the file already exists. |
static void IG::Num::AnalysisResults::SaveMath | ( | IAnalysisResults | anres, |
string | filePath | ||
) | [inline, static] |
Saves the specified analysis results to a file. If the file already exists then it is overwritten.
anres | Object from which analysis results are saved. |
filePath | Path to the file where analysis results are stored. |
static void IG::Num::AnalysisResults::SaveMath | ( | IAnalysisResults | anres, |
string | filePath, | ||
bool | append | ||
) | [inline, static] |
Saves the specified analysis results to a file.
anres | Object from which analysis results are saved. |
filePath | Path to the file where analysis results are stored. |
append | If true then contents are appended to the end of the file if the file already exists. |
static void IG::Num::AnalysisResults::LoadRequestMath | ( | string | filePath, |
ref AnalysisResults | anResults | ||
) | [inline, static] |
Loads analysis request data from a file in standard mathematical format and stores it in the specified analysis results object.
filePath | Path to the file from which object is read. |
anResults | Object where data is stored. |
static void IG::Num::AnalysisResults::LoadMath | ( | string | filePath, |
ref AnalysisResults | anResults | ||
) | [inline, static] |
Loads analysis results from a file in standard mathematical format and stores it in the specified analysis results object.
filePath | Path to the file from which object is read. |
anResults | Object where data is stored. |
static void IG::Num::AnalysisResults::SaveRequestJson | ( | AnalysisResults | anResulsts, |
string | filePath | ||
) | [inline, static] |
Saves (serializes) the specified analysis request to the specified JSON file. File is owerwritten if it exists.
anResulsts | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
static void IG::Num::AnalysisResults::SaveRequestJson | ( | AnalysisResults | anResults, |
string | filePath, | ||
bool | append | ||
) | [inline, static] |
Saves (serializes) the specified analysis request to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.
anResults | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
append | Specifies whether serialized data is appended at the end of the file in the case that the file already exists. |
static void IG::Num::AnalysisResults::LoadRequestJson | ( | string | filePath, |
ref AnalysisResults | anResultsRestored | ||
) | [inline, static] |
Restores (deserializes) analysis request from the specified file in JSON format.
filePath | File from which object is restored. |
anResultsRestored | Object that is restored by deserialization. |
static void IG::Num::AnalysisResults::SaveJson | ( | AnalysisResults | anResulsts, |
string | filePath | ||
) | [inline, static] |
Saves (serializes) the specified analysis results to the specified JSON file. File is owerwritten if it exists.
anResulsts | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
static void IG::Num::AnalysisResults::SaveJson | ( | AnalysisResults | anResults, |
string | filePath, | ||
bool | append | ||
) | [inline, static] |
Saves (serializes) the specified analysis results to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.
anResults | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
append | Specifies whether serialized data is appended at the end of the file in the case that the file already exists. |
static void IG::Num::AnalysisResults::LoadJson | ( | string | filePath, |
ref AnalysisResults | anResultsRestored | ||
) | [inline, static] |
Restores (deserializes) analysis results from the specified file in JSON format.
filePath | File from which object is restored. |
anResultsRestored | Object that is restored by deserialization. |
static void IG::Num::AnalysisResults::ReadAnalysisRequest | ( | string | filePath, |
ref IVector | parameters, | ||
ref bool | reqcalcobj, | ||
ref bool | reqcalcconstr, | ||
ref bool | reqcalcgradobj, | ||
ref bool | reqcalcgradconstr, | ||
ref string | cd | ||
) | [inline, static, private] |
Read the analysis data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.
filePath | Path to the file where training data are saved. |
parameters | Input and output parameters: { p1, p2, … }. |
reqcalcobj | Flag: reqcalcobj. |
reqcalcconstr | Flag: reqcalcconstr. |
reqcalcgradobj | Flag: reqcalcgradobj. |
reqcalcgradconstr | Flag: reqcalcgradconstr. |
cd | String: cd. |
$A Tako78 Mar11;
static void IG::Num::AnalysisResults::GetAnalysisRequest | ( | string | requestString, |
ref IVector | parameters, | ||
ref bool | reqcalcobj, | ||
ref bool | reqcalcconstr, | ||
ref bool | reqcalcgradobj, | ||
ref bool | reqcalcgradconstr, | ||
ref string | cd | ||
) | [inline, static, private] |
Read the analysis request data from data file Format: { { p1, p2, … }, { reqcalcobj, reqcalcconstr, reqcalcgradobj, reqcalcgradconstr }, cd }.
requestString | String with request analysis data. |
parameters | Input and output parameters: { p1, p2, … }. |
reqcalcobj | Flag: reqcalcobj. |
reqcalcconstr | Flag: reqcalcconstr. |
reqcalcgradobj | Flag: reqcalcgradobj. |
reqcalcgradconstr | Flag: reqcalcgradconstr. |
cd | String: cd. |
$A Tako78 Mar11;
static void IG::Num::AnalysisResults::ReadAnalysisResult | ( | string | filePath, |
ref IVector | parameters, | ||
ref bool | calcobj, | ||
ref bool | calcconstr, | ||
ref bool | calcgradobj, | ||
ref bool | calcgradconstr, | ||
ref double | obj, | ||
ref IVector | constr, | ||
ref IVector | dobjdp, | ||
ref IVector[] | dconstr, | ||
ref int | errorcode, | ||
ref bool | reqcalcobj, | ||
ref bool | reqcalcconstr, | ||
ref bool | reqcalcgradobj, | ||
ref bool | reqcalcgradconstr | ||
) | [inline, static, private] |
Read the analysis result data from data file Format:
filePath | Path to the file where training data are saved. |
parameters | Input and output parameters: { p1, p2, … }. |
calcobj | Flag for the objective function. |
calcconstr | Flag for constraint functions. |
calcgradobj | Gradient of the objective function. |
calcgradconstr | Gradients of constraint functions. |
obj | Value of the objective functions. |
constr | Values of the constraint functions. |
dobjdp | Derivatives of the objective function. |
dconstr | Derivatives of individual constraint functions. |
errorcode | Integer error code of analysis. |
reqcalcobj | Flag for calculation of the various values. |
reqcalcconstr | Flag for calculation of the various values. |
reqcalcgradobj | Flag for calculation of the various values. |
reqcalcgradconstr | Flag for calculation of the various values. |
$A Tako78 Apr11;
static void IG::Num::AnalysisResults::GetAnalysisResult | ( | string | requestString, |
ref IVector | parameters, | ||
ref bool | calcobj, | ||
ref bool | calcconstr, | ||
ref bool | calcgradobj, | ||
ref bool | calcgradconstr, | ||
ref double | obj, | ||
ref IVector | constr, | ||
ref IVector | dobjdp, | ||
ref IVector[] | dconstr, | ||
ref int | errorcode, | ||
ref bool | reqcalcobj, | ||
ref bool | reqcalcconstr, | ||
ref bool | reqcalcgradobj, | ||
ref bool | reqcalcgradconstr | ||
) | [inline, static, private] |
Read the analysis result data from data file Format:
resultString | String with result analysis data. |
parameters | Input and output parameters: { p1, p2, … }. |
calcobj | Flag for the objective function. |
calcconstr | Flag for constraint functions. |
calcgradobj | Gradient of the objective function. |
calcgradconstr | Gradients of constraint functions. |
obj | Value of the objective functions. |
constr | Values of the constraint functions. |
dobjdp | Derivatives of the objective function. |
dconstr | Derivatives of individual constraint functions. |
errorcode | Integer error code of analysis. |
reqcalcobj | Flag for calculation of the various values. |
reqcalcconstr | Flag for calculation of the various values. |
reqcalcgradobj | Flag for calculation of the various values. |
reqcalcgradconstr | Flag for calculation of the various values. |
$A Tako78 Apr11;
override string IG::Num::AnalysisResults::ToString | ( | ) | [inline] |
Returns a string representation of the current analysis results object in a standard IGLib form.
string IG::Num::AnalysisResults::ToStringMath | ( | ) | [inline] |
Returns a string representation of the current analysis results object in a standard IGLib form (Mathematica-like format but with C representation of numbers).
static AnalysisResults IG::Num::AnalysisResults::CreateExample | ( | int | numParameters, |
int | numConstraints, | ||
bool | reqObjective, | ||
bool | reqConstraints, | ||
bool | reqObjectiveGradient, | ||
bool | reqConstraintGradients, | ||
bool | reqObjectiveHessian, | ||
bool | reqConstraintHessians | ||
) | [inline, static] |
Creates an example analysis results object according to parameters, with some arbitrary result components.
numParameters | Number of prameters of the optimization problem. |
numConstraints | Number of constraints. |
reqObjective | Whether calculation of the objective function is required. |
reqConstraints | Whether calculation of constraint functions is required. |
reqObjectiveGradient | Whether calculation of objective gradient is required. |
reqConstraintGradients | Whether calculation of constraint gradients is required. |
reqObjectiveHessian | Whether calculation of objective Hessian is required. |
reqConstraintHessians | Whether calculation of constraint Hessians is required. |
int IG::Num::AnalysisResults::_numParameters = 0 [protected] |
int IG::Num::AnalysisResults::_numObjectives = 1 [protected] |
int IG::Num::AnalysisResults::_numConstraints = 0 [protected] |
int IG::Num::AnalysisResults::_numEqualityConstraints = 0 [protected] |
IVector IG::Num::AnalysisResults::_parameters [protected] |
double IG::Num::AnalysisResults::_objective [protected] |
IVector IG::Num::AnalysisResults::_objectiveGradient [protected] |
IMatrix IG::Num::AnalysisResults::_objectiveHessian [protected] |
List<double> IG::Num::AnalysisResults::_constraints [protected] |
List<IVector> IG::Num::AnalysisResults::_constraintGradients [protected] |
List<IMatrix> IG::Num::AnalysisResults::_constraintHessians [protected] |
bool IG::Num::AnalysisResults::_copyReferences = false [protected] |
bool IG::Num::AnalysisResults::_reqObjective = false [protected] |
bool IG::Num::AnalysisResults::_reqConstraints = false [protected] |
bool IG::Num::AnalysisResults::_reqObjectiveGradient = false [protected] |
bool IG::Num::AnalysisResults::_reqConstraintGradients = false [protected] |
bool IG::Num::AnalysisResults::_reqObjectiveHessian = false [protected] |
bool IG::Num::AnalysisResults::_reqConstraintHessians = false [protected] |
int IG::Num::AnalysisResults::_errorCode = 0 [protected] |
string IG::Num::AnalysisResults::_errorString = null [protected] |
bool IG::Num::AnalysisResults::_calcObjective = false [protected] |
bool IG::Num::AnalysisResults::_calcConstraints = false [protected] |
bool IG::Num::AnalysisResults::_calcObjectiveGradient = false [protected] |
bool IG::Num::AnalysisResults::_calcConstraintGradients = false [protected] |
bool IG::Num::AnalysisResults::_calcObjectiveHessian = false [protected] |
bool IG::Num::AnalysisResults::_calcConstraintHessians = false [protected] |
virtual int IG::Num::AnalysisResults::NumParameters [get, set] |
Number of parameters.
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::NumObjectives [get, set] |
Number of objective functions (normally 1 for this type, but can be 0).
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::NumConstraints [get, set] |
Number of constraints.
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::NumEqualityConstraints [get, set] |
Number of equality constraints.
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::NumInequalityConstraints [get] |
Returns number of inequality constraints.
virtual bool IG::Num::AnalysisResults::CopyReferences [get, set] |
Indicates whether just references can be copied when setting optimization parameters or results. If false then deep copy is always performed. Default is false.
Implements IG::Num::IAnalysisResults.
virtual IVector IG::Num::AnalysisResults::Parameters [get, set] |
Optimization parameters. If CopyReferences=true (false by default) then only the reference is copied when assigning.
Implements IG::Num::IAnalysisResults.
virtual double IG::Num::AnalysisResults::Objective [get, set] |
Value of the objective function.
Implements IG::Num::IAnalysisResults.
virtual IVector IG::Num::AnalysisResults::ObjectiveGradient [get, set] |
Objective function gradient. If CopyReferences=true (false by default) then only the reference is copied in assignments.
Implements IG::Num::IAnalysisResults.
virtual List<double> IG::Num::AnalysisResults::Constraints [get, set] |
Constraint function values. If CopyReferences=true (false by default) then only the list reference is copied in assignments.
Implements IG::Num::IAnalysisResults.
virtual List<IVector> IG::Num::AnalysisResults::ConstraintGradients [get, set] |
Constraint function gradients. If CopyReferences=true (false by default) then only the list reference is copied in assignments.
Implements IG::Num::IAnalysisResults.
virtual IMatrix IG::Num::AnalysisResults::ObjectiveHessian [get, set] |
Objective function Hessian (matrix of second derivatives). If CopyReferences=true (false by default) then only the reference is copied in assignments.
Implements IG::Num::IAnalysisResults.
virtual List<IMatrix> IG::Num::AnalysisResults::ConstraintHessians [get, set] |
Constraint functions' Hessians (matrices of second derivatives). If CopyReferences=true (false by default) then only the list reference is copied in assignments.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqObjective [get, set] |
Indicates whether calculation of objective function is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqObjectiveGradient [get, set] |
Indicates whether calculation of objective function gradient is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqObjectiveHessian [get, set] |
Indicates whether calculation of objective function Hessian is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqConstraints [get, set] |
Indicates whether calculation of constraint functions is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqConstraintGradients [get, set] |
Indicates whether calculation of constraint functions gradient is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::ReqConstraintHessians [get, set] |
Indicates whether calculation of constraint functions Hessian is/was requested.
Implements IG::Num::IAnalysisResults.
virtual int IG::Num::AnalysisResults::ErrorCode [get, set] |
Error code. 0 - everything is OK. negative value - something went wrong.
Implements IG::Num::IAnalysisResults.
virtual String IG::Num::AnalysisResults::ErrorString [get, set] |
Error string indicating what went wrong.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::Calculated [get, set] |
Collectively gets or sets calculated flags. Set false: all calculated flags are set to false. Set true: all calculated flags for which the corresponding request flags are true, are set to truee, others are set to false. Get: returns true if all the flags for which the corresponding request flags are true, are also true. Otherwise returns false.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedObjective [get, set] |
Indicates whether calculation of objective function is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedObjectiveGradient [get, set] |
Indicates whether calculation of objective function gradient is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedObjectiveHessian [get, set] |
Indicates whether calculation of objective function Hessian is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedConstraints [get, set] |
Indicates whether calculation of constraint functions is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedConstraintGradients [get, set] |
Indicates whether calculation of constraint functions gradient is/was requested.
Implements IG::Num::IAnalysisResults.
virtual bool IG::Num::AnalysisResults::CalculatedConstraintHessians [get, set] |
Indicates whether calculation of constraint functions Hessian is/was requested.
Implements IG::Num::IAnalysisResults.