ERC CISST - cisst software

nmrMultiVariablePowerBasis Class Reference

#include <nmrMultiVariablePowerBasis.h>

Inheritance diagram for nmrMultiVariablePowerBasis:

Inheritance graph
[legend]
Collaboration diagram for nmrMultiVariablePowerBasis:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class represents the set of variables and variable powers that is used in evaluating a polynomial. The functionality was factored out of the original location in the polynomial class, so that the polynomial can serve as a term container, and passes by const reference to functions.

The SetVariable() and SetVariables() functions are declared virtual, to support various bases, such as standard basis and barycentric basis.

Definition at line 38 of file nmrMultiVariablePowerBasis.h.

Public Types

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes


Member Function Documentation

void nmrMultiVariablePowerBasis::Initialize ( VariableIndexType  numVariables,
PowerType  maxPower 
)

This function initializes the all independent variables to zero and the degree to the given value. It is to be called during events such as serialization.

void nmrMultiVariablePowerBasis::GetVariables ( VariableType  vars[]  )  const [inline]

Retrieve the values of the variables at the current point

Definition at line 81 of file nmrMultiVariablePowerBasis.h.

References vctDynamicVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType >::Assign().

VariableType nmrMultiVariablePowerBasis::GetSumOfVariables (  )  const [inline]

Return the sum of all the variables

Definition at line 88 of file nmrMultiVariablePowerBasis.h.

VariableType nmrMultiVariablePowerBasis::GetVariablePower ( VariableIndexType  var,
PowerType  power 
) const [inline]

Return a specific power of a specific variable

Definition at line 94 of file nmrMultiVariablePowerBasis.h.

virtual void nmrMultiVariablePowerBasis::SetVariable ( VariableIndexType  varIndex,
VariableType  value 
) [pure virtual]

Set the value of one variable

virtual void nmrMultiVariablePowerBasis::SetVariables ( const VariableType  vars[]  )  [pure virtual]

Set the values of the polynomial variables to a specific n-dimensional point. This enables to pre-calculate the power basis for future evaluations. Implemented for each concrete polynomial class

virtual bool nmrMultiVariablePowerBasis::CanSetVariable ( VariableIndexType  varIndex  )  const [pure virtual]

Returns true if the value of variable indicated by the index can be set using SetVariable().

Referenced by SetVariable().

ValueType nmrMultiVariablePowerBasis::EvaluatePowerProduct ( const PowerType  powers[]  )  const

This function is provided for efficiency reasons. In some cases, such as computing integrals, the user would want to avoid the overhead of instantiating a nmrPolynomialTermPowerIndex and just evaluate the product, say, based on an external table. In these case, the user can call this quick-access method. Note that this method is not safe in general, since it does not perform validity checks on the input set of powers. It is specifically made for highest runtime efficiency -- do not use it with untested code.

Referenced by nmrStandardPolynomial::EvaluateBasis().

void nmrMultiVariablePowerBasis::PrivateSetVariable ( VariableIndexType  varIndex,
VariableType  value 
) [protected]

Actually set the value of a variable by index

Referenced by SetVariable().

VariableType nmrMultiVariablePowerBasis::GetImplicitVariable (  )  const [inline]

return the value of the implicit variable.

Definition at line 174 of file nmrMultiVariablePowerBasis.h.

References GetVariable().

VariableIndexType nmrMultiVariablePowerBasis::GetImplicitVarIndex (  )  const [inline]

return the index of the implicit variable

Definition at line 180 of file nmrMultiVariablePowerBasis.h.

Referenced by CanSetVariable().

void nmrMultiVariablePowerBasis::SetImplicitVarIndex ( VariableIndexType  newIndex  )  [inline]

choose which of the variables is the implicit one.

Definition at line 186 of file nmrMultiVariablePowerBasis.h.

References CMN_ASSERT, and GetNumVariables().


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu