IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator > Class Template Referenceabstract

Base class for a variety of response evaluators. Calculates response at specific parameters, stores calculated responses in a list, etc. The current generic class can be used for differnt types of respnses (results) and different types of object for evaluation of responses, such as vector funcitons or optimization analyses. More...

+ Inheritance diagram for IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >:
+ Collaboration diagram for IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >:

Public Member Functions

 ResponseEvaluatorWithStorageBase ()
 Creates a ResponseEvaluatorBase object. More...
 
 ResponseEvaluatorWithStorageBase (TypeEvaluator evaluationFunction)
 Creates a ResponseEvaluatorBase object with the specified response evaluator that will be used for response evaluation. More...
 
virtual void EvaluateResponse (IVector parameters)
 Evaluates the response at specific parameters. More...
 
virtual void EvaluateResponse (TypeData requestAndResponse)
 
void ClearResults ()
 Removes all results from the list of results. The list is intended to store the results. More...
 
void AddResult (TypeData result)
 Adds a new result to the list of results. The list is intended to store the results. More...
 

Protected Member Functions

abstract void GetData (TypeData results)
 Copies input data from results object. More...
 
abstract TypeData CopyResults (TypeData results)
 Creates and returns a copy of the speccified results object. More...
 
abstract void CreateRequestThis (IVector parameters, ref TypeData request)
 Creates a request for response evaluation at the specified parameters, where request options are transcribed from the current response evaluator. More...
 
TypeData CreateRequestThis (IVector parameters)
 Creates and returns request for response evaluation at the specified parameters, where request options are transcribed from the current response evaluator. More...
 
abstract void EvaluateResponseThis (TypeData requestAndResponse)
 Evaluates the response. More...
 

Properties

object Lock [get]
 This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
 
object InternalLock [get]
 Used internally for locking access to internal fields. More...
 
virtual TypeData LastResults [get, set]
 Results of the last evaluation of response performed by the current response evaluator. More...
 
virtual bool AddResultsAutomatically [get, set]
 Flag indicated whether the last evaluated results are automatically added to the list of results when these results are set (by setting the LastResults property). More...
 
List< TypeData > Results [get, protected set]
 List of calculated results. The list is intended to store the results. More...
 
virtual TypeData this[int which] [get, set]
 
abstract TypeEvaluator EvaluationObject [get, set]
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Private Attributes

object _mainLock = new object()
 
object _internalLock = new object()
 
TypeData _lastResults
 
bool _addResultsAutomatically = true
 
List< TypeData > _results
 

Detailed Description

Base class for a variety of response evaluators. Calculates response at specific parameters, stores calculated responses in a list, etc. The current generic class can be used for differnt types of respnses (results) and different types of object for evaluation of responses, such as vector funcitons or optimization analyses.

Template Parameters
TypeResultsType of the objects wheer results of evaluation response are stored. Type of objects that hold requests for evaluation of respone must be the same.
TypeEvaluatorType of the function that performs response calculation.</type>

This class provides a generic way for performing evaluation of response at specified parameters and for storing a list of evaluated responses on the followng grounds:

* Response is evaluated by a special designated evaluation object.

* Input parameters for response evaluation are specified as vector.

* Evaluation object performs evaluation on basis of object of a special class that contains the input parameters, the request flags specifying what and how should be evaluated, and results.

$A Igor Jul08;

Type Constraints
TypeData :class 
TypeEvaluator :class 

Constructor & Destructor Documentation

IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.ResponseEvaluatorWithStorageBase ( )
inline

Creates a ResponseEvaluatorBase object.

IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.ResponseEvaluatorWithStorageBase ( TypeEvaluator  evaluationFunction)
inline

Creates a ResponseEvaluatorBase object with the specified response evaluator that will be used for response evaluation.

Parameters
evaluationFunctionEvaluator object that is used for calculation of respones.

Member Function Documentation

abstract void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.GetData ( TypeData  results)
protectedpure virtual

Copies input data from results object.

Parameters
results
abstract TypeData IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.CopyResults ( TypeData  results)
protectedpure virtual

Creates and returns a copy of the speccified results object.

Parameters
resultsResults object to be copied.
Returns
A copy of results object.
abstract void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.CreateRequestThis ( IVector  parameters,
ref TypeData  request 
)
protectedpure virtual

Creates a request for response evaluation at the specified parameters, where request options are transcribed from the current response evaluator.

Parameters
parametersVector of parameters for which response will be calculated.
requestReference to the object where request data for response evaluation is written to.
TypeData IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.CreateRequestThis ( IVector  parameters)
inlineprotected

Creates and returns request for response evaluation at the specified parameters, where request options are transcribed from the current response evaluator.

Parameters
parametersVector of parameters for which response will be calculated.
Returns
Object where request data for response evaluation is written to.
abstract void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.EvaluateResponseThis ( TypeData  requestAndResponse)
protectedpure virtual

Evaluates the response.

Parameters
resultsObject that must contain complete response evaluation request data, and where results of response evaluation will be stored.
virtual void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.EvaluateResponse ( IVector  parameters)
inlinevirtual

Evaluates the response at specific parameters.

Parameters
parameters
virtual void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.EvaluateResponse ( TypeData  requestAndResponse)
inlinevirtual
void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.ClearResults ( )
inline

Removes all results from the list of results. The list is intended to store the results.

void IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.AddResult ( TypeData  result)
inline

Adds a new result to the list of results. The list is intended to store the results.

Parameters
resultObject containing results to be added.

Member Data Documentation

object IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >._mainLock = new object()
private
object IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >._internalLock = new object()
private
TypeData IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >._lastResults
private
bool IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >._addResultsAutomatically = true
private
List<TypeData> IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >._results
private

Property Documentation

object IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.Lock
get

This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.

object IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.InternalLock
getprotected

Used internally for locking access to internal fields.

virtual TypeData IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.LastResults
getset

Results of the last evaluation of response performed by the current response evaluator.

virtual bool IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.AddResultsAutomatically
getset

Flag indicated whether the last evaluated results are automatically added to the list of results when these results are set (by setting the LastResults property).

Referenced by IG.Num.ResponseEvaluatorWithStorageVectorDtoBase< TypeResponseEvaluator >.CopyFromPlain(), and IG.Num.ResponseEvaluatorWithStorageAnalysisDtoBase< TypeResponseEvaluator >.CopyFromPlain().

List<TypeData> IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.Results
getprotected set
virtual TypeData IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.this[int which]
getset
abstract TypeEvaluator IG.Num.ResponseEvaluatorWithStorageBase< TypeData, TypeEvaluator >.EvaluationObject
getset

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