Crystal AI  1.0.0
Crystal.EvaluatorBase Class Reference

EvaluatorBase serves as a base class for all evaluators, i.e. functions with arbitrary domain of definition and a range equal to any sub-interval of [0,1]. More...

Inheritance diagram for Crystal.EvaluatorBase:
Crystal.IEvaluator Crystal.CompositeEvaluator Crystal.LinearEvaluator Crystal.PowerEvaluator Crystal.SigmoidEvaluator

Classes

class  EvaluatorDxZeroException
 
class  EvaluatorXaGreaterThanXbException
 

Public Member Functions

int CompareTo (IEvaluator other)
 Compares the current object with another object of the same type. More...
 
virtual float Evaluate (float x)
 Returns the value for the specified x. More...
 

Protected Member Functions

 EvaluatorBase ()
 Initializes a new instance of the T:Crystal.EvaluatorBase class. More...
 
 EvaluatorBase (Pointf ptA, Pointf ptB)
 Initializes a new instance of the T:Crystal.EvaluatorBase class. More...
 

Protected Attributes

float Xa
 The x-coordinate of point A. Note, this can have any value in the real interval (-inf, +inf). More...
 
float Xb
 The x-coordinate of point B. Note, this can have any value in the real interval (-inf, +inf). More...
 
float Ya
 The y-coordinate of point A. Note, this can have a value within the interval [0, 1]. More...
 
float Yb
 The y-coordinate of point B. Note, this can have a value within the interval [0, 1]. More...
 

Properties

Pointf PtA [get]
 The first point of the evaluator. The x-coordinate of this point will always be strictly smaller than that of PtB. More...
 
Pointf PtB [get]
 The second point of the evaluator. The x-coordinate of this point will always be strictly larger than that of PtA. More...
 
float MinX [get]
 The lower bound of the x-coordinate interval. More...
 
float MaxX [get]
 The upper bound of the x-coordinate interval. More...
 
float MinY [get]
 The lower bound of the y-coordinate interval. More...
 
float MaxY [get]
 The upper bound of the y-coordinate interval. More...
 
Interval< float > XInterval [get]
 The x-coordinate interval represents the domain of definition of this evaluator. More...
 
Interval< float > YInterval [get]
 The y-coordinate interval represents the range of this evaluator. Note that this must be a sub-interval (or the entire interval) [0,1]. More...
 
bool IsInverted [get, set]
 When true, the output of the Evaluate method is transformed to 1.0f - (normal output). More...
 
- Properties inherited from Crystal.IEvaluator
Pointf PtA [get]
 The first point of the evaluator. The x-coordinate of this point will always be strictly smaller than that of PtB. More...
 
Pointf PtB [get]
 The second point of the evaluator. The x-coordinate of this point will always be strictly larger than that of PtA. More...
 
float MinX [get]
 The lower bound of the x-coordinate interval. More...
 
float MaxX [get]
 The upper bound of the x-coordinate interval. More...
 
float MinY [get]
 The lower bound of the y-coordinate interval. More...
 
float MaxY [get]
 The upper bound of the y-coordinate interval. More...
 
Interval< float > XInterval [get]
 The x-coordinate interval represents the domain of definition of this evaluator. More...
 
Interval< float > YInterval [get]
 The y-coordinate interval represents the range of this evaluator. Note that this must be a sub-interval (or the entire interval) [0,1]. More...
 
bool IsInverted [get, set]
 When true, the output of the Evaluate method is transformed to 1.0f - (normal output). More...
 

Detailed Description

EvaluatorBase serves as a base class for all evaluators, i.e. functions with arbitrary domain of definition and a range equal to any sub-interval of [0,1].

See also
T:Crystal.IEvaluator, T:System.IComparable`1

Constructor & Destructor Documentation

Crystal.EvaluatorBase.EvaluatorBase ( )
inlineprotected

Initializes a new instance of the T:Crystal.EvaluatorBase class.

Crystal.EvaluatorBase.EvaluatorBase ( Pointf  ptA,
Pointf  ptB 
)
inlineprotected

Initializes a new instance of the T:Crystal.EvaluatorBase class.

Parameters
ptAThe pt a.
ptBThe pt b.

Member Function Documentation

int Crystal.EvaluatorBase.CompareTo ( IEvaluator  other)
inline

Compares the current object with another object of the same type.

Parameters
otherAn object to compare with this object.
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other . Greater than zero This object is greater than other .
virtual float Crystal.EvaluatorBase.Evaluate ( float  x)
inlinevirtual

Returns the value for the specified x.

Implements Crystal.IEvaluator.

Reimplemented in Crystal.CompositeEvaluator, Crystal.SigmoidEvaluator, Crystal.PowerEvaluator, and Crystal.LinearEvaluator.

Member Data Documentation

float Crystal.EvaluatorBase.Xa
protected

The x-coordinate of point A. Note, this can have any value in the real interval (-inf, +inf).

float Crystal.EvaluatorBase.Xb
protected

The x-coordinate of point B. Note, this can have any value in the real interval (-inf, +inf).

float Crystal.EvaluatorBase.Ya
protected

The y-coordinate of point A. Note, this can have a value within the interval [0, 1].

float Crystal.EvaluatorBase.Yb
protected

The y-coordinate of point B. Note, this can have a value within the interval [0, 1].

Property Documentation

bool Crystal.EvaluatorBase.IsInverted
getset

When true, the output of the Evaluate method is transformed to 1.0f - (normal output).

float Crystal.EvaluatorBase.MaxX
get

The upper bound of the x-coordinate interval.

float Crystal.EvaluatorBase.MaxY
get

The upper bound of the y-coordinate interval.

float Crystal.EvaluatorBase.MinX
get

The lower bound of the x-coordinate interval.

float Crystal.EvaluatorBase.MinY
get

The lower bound of the y-coordinate interval.

Pointf Crystal.EvaluatorBase.PtA
get

The first point of the evaluator. The x-coordinate of this point will always be strictly smaller than that of PtB.

Pointf Crystal.EvaluatorBase.PtB
get

The second point of the evaluator. The x-coordinate of this point will always be strictly larger than that of PtA.

Interval<float> Crystal.EvaluatorBase.XInterval
get

The x-coordinate interval represents the domain of definition of this evaluator.

Interval<float> Crystal.EvaluatorBase.YInterval
get

The y-coordinate interval represents the range of this evaluator. Note that this must be a sub-interval (or the entire interval) [0,1].


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