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.AnalysisComparer Class Reference

Compares two sets of analysis results in various different ways. More...

+ Inheritance diagram for IG.Num.AnalysisComparer:
+ Collaboration diagram for IG.Num.AnalysisComparer:

Public Member Functions

 AnalysisComparer ()
 
 AnalysisComparer (double barrierLength, double barrierHeight)
 Creates analysis results comparer with initialized penalty evaluator containing one penalty function (common for all constraints) initialized to the default penalty function with specified characteristic barrier length and height. More...
 
 AnalysisComparer (double barrierLength, double barrierHeight, double maxZero)
 Creates analysis results comparer with initialized penalty evaluator with penalty function (common for all constraints) initialized to the default penalty function with specified characteristic barrier length and height and transition point where penalty function becomes non-zero. More...
 
int Compare (IAnalysisResults an1, IAnalysisResults an2)
 Compares two sets of analysis results points. More...
 

Protected Attributes

double _equalityConstraintTolerance
 
bool _cmpNumViolated = false
 
bool _cmpMaxResidual = false
 
bool _cmpSumResiduals = true
 
bool _cmpMaxPenalty = false
 
bool _cmpSumPenalties = false
 
bool _cmpObjectiveFunction = true
 

Properties

double EqualityConstraintTolerance [get, set]
 Gets or sets tolerance for equality constraints. When absolute value of a constraint function is below this tolerance, the corresponding constraint is not considered violated. Tolerance must not be negative. More...
 
IPenaltyEvaluator PenaltyEvaluator [get, set]
 Gets or sets evaluator of penalty terms. This is needed when e.g. sums of penalty terms are defined. More...
 
bool CompareNumViolated [get, set]
 Whether number of violated constraints is compared. More...
 
bool CompareMaxResidual [get, set]
 Whether maximal constraint residual is compared. More...
 
bool CompareSumResiduals [get, set]
 Whether sum of constraint residuals is compared. More...
 
bool CompareMaxPenalty [get, set]
 Whether maximal penalty term is compared. More...
 
bool CompareSumPenalties [get, set]
 Whether sum of penalty terms is compared. More...
 
bool CompareObjectiveFunction [get, set]
 Whether value of the objective function is compared. More...
 

Private Attributes

IPenaltyEvaluator _penaltyEvaluator = null
 

Detailed Description

Compares two sets of analysis results in various different ways.

Constructor & Destructor Documentation

IG.Num.AnalysisComparer.AnalysisComparer ( )
inline
IG.Num.AnalysisComparer.AnalysisComparer ( double  barrierLength,
double  barrierHeight 
)
inline

Creates analysis results comparer with initialized penalty evaluator containing one penalty function (common for all constraints) initialized to the default penalty function with specified characteristic barrier length and height.

Parameters
barrierLengthCharacteristic barrrier length. Within this length the created penalty function grows approximately from 0 to characteristic height.
barrierHeightCharacteristic barrier height.
IG.Num.AnalysisComparer.AnalysisComparer ( double  barrierLength,
double  barrierHeight,
double  maxZero 
)
inline

Creates analysis results comparer with initialized penalty evaluator with penalty function (common for all constraints) initialized to the default penalty function with specified characteristic barrier length and height and transition point where penalty function becomes non-zero.

Parameters
barrierLengthCharacteristic barrrier length. Within this length the created penalty function grows approximately from 0 to characteristic height.
barrierHeightCharacteristic barrier height.
maxZeroMaximal argument for which the created function is 0.

Member Function Documentation

int IG.Num.AnalysisComparer.Compare ( IAnalysisResults  an1,
IAnalysisResults  an2 
)
inline

Compares two sets of analysis results points.

Parameters
an1First set of analysis results.
an2Second set of analysis results.
Returns
0 if result sets are equal, -1 if the first set is smaller than the second, and 1 if the first set is larger than the second.

References IG.Num.IAnalysisResults.GetMaximalResidual(), IG.Num.IAnalysisResults.GetMaxPenaltyTerm(), IG.Num.IAnalysisResults.GetNumViolatedConstraints(), IG.Num.IAnalysisResults.GetSumPenaltyTerms(), and IG.Num.IAnalysisResults.Objective.

Member Data Documentation

double IG.Num.AnalysisComparer._equalityConstraintTolerance
protected
IPenaltyEvaluator IG.Num.AnalysisComparer._penaltyEvaluator = null
private
bool IG.Num.AnalysisComparer._cmpNumViolated = false
protected
bool IG.Num.AnalysisComparer._cmpMaxResidual = false
protected
bool IG.Num.AnalysisComparer._cmpSumResiduals = true
protected
bool IG.Num.AnalysisComparer._cmpMaxPenalty = false
protected
bool IG.Num.AnalysisComparer._cmpSumPenalties = false
protected
bool IG.Num.AnalysisComparer._cmpObjectiveFunction = true
protected

Property Documentation

double IG.Num.AnalysisComparer.EqualityConstraintTolerance
getset

Gets or sets tolerance for equality constraints. When absolute value of a constraint function is below this tolerance, the corresponding constraint is not considered violated. Tolerance must not be negative.

IPenaltyEvaluator IG.Num.AnalysisComparer.PenaltyEvaluator
getsetprivate

Gets or sets evaluator of penalty terms. This is needed when e.g. sums of penalty terms are defined.

bool IG.Num.AnalysisComparer.CompareNumViolated
getset

Whether number of violated constraints is compared.

bool IG.Num.AnalysisComparer.CompareMaxResidual
getset

Whether maximal constraint residual is compared.

bool IG.Num.AnalysisComparer.CompareSumResiduals
getset

Whether sum of constraint residuals is compared.

bool IG.Num.AnalysisComparer.CompareMaxPenalty
getset

Whether maximal penalty term is compared.

bool IG.Num.AnalysisComparer.CompareSumPenalties
getset

Whether sum of penalty terms is compared.

bool IG.Num.AnalysisComparer.CompareObjectiveFunction
getset

Whether value of the objective function is compared.


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