Public Member Functions | Protected Attributes

ConstantSimpleConstMapping Class Reference
[mapping - classes representing mathematical mappings]

Represents a constant mathematical mapping (f(x) = c). More...

#include <MappingUtils.h>

Inherits SimpleConstMapping.

Collaboration diagram for ConstantSimpleConstMapping:
Collaboration graph
[legend]

List of all members.

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.
ConstMappingconstClone () const
 creates a clone of this mapping.

Protected Attributes

double value

Detailed Description

Represents a constant mathematical mapping (f(x) = c).

Returns the same value for every point in any dimension.

Author:
Karl Wessel

Definition at line 787 of file MappingUtils.h.


Member Function Documentation

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;
  }


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