Represents a constant mathematical mapping (f(x) = c). More...
#include <MappingUtils.h>
Inherits SimpleConstMapping.
Public Member Functions | |
ConstantSimpleConstMapping (const DimensionSet &dims, double val) | |
ConstantSimpleConstMapping (const DimensionSet &dims, const Argument &key, double val) | |
virtual double | getValue (const Argument &pos) const |
Returns the value of the mapping at the passed position. | |
double | getValue () const |
Returns the value of this constant mapping. | |
void | setValue (double val) |
Sets the value of this constant mapping. | |
ConstMapping * | constClone () const |
creates a clone of this mapping. | |
Protected Attributes | |
double | value |
Represents a constant mathematical mapping (f(x) = c).
Returns the same value for every point in any dimension.
Definition at line 787 of file MappingUtils.h.
ConstMapping* ConstantSimpleConstMapping::constClone | ( | ) | const [inline, virtual] |
creates a clone of this mapping.
This method has to be implemented by every subclass.
Implements SimpleConstMapping.
Definition at line 816 of file MappingUtils.h.
References ConstMapping::dimensions.
{ return new ConstantSimpleConstMapping(dimensions, value); }
virtual double ConstantSimpleConstMapping::getValue | ( | const Argument & | pos | ) | const [inline, virtual] |
Returns the value of the mapping at the passed position.
This method has to be implemented by every subclass and should only have constant complexity.
Implements SimpleConstMapping.
Definition at line 800 of file MappingUtils.h.
Referenced by MultiDimMapping< Linear >::MultiDimMapping(), and MultiDimMapping< Linear >::operator=().
{
return value;
}