22#ifndef _nmrBernsteinPolynomial_h
23#define _nmrBernsteinPolynomial_h
69 typedef nmrDynAllocPolynomialContainer
BaseType;
74#ifdef CISST_COMPILER_IS_MSVC
76#pragma warning(disable:4996)
90 :
BaseType(numVariables, degree, degree)
92 , PowerBasis(numVariables, degree, numVariables - 1)
95#if INCLUDE_DEPRECATED_POLYNOMIAL_CODE
96 VariablePowers = &PowerBasis;
100#if INCLUDE_DEPRECATED_POLYNOMIAL_CODE
109 PowerBasis.SetVariables(values);
115 virtual void CISST_DEPRECATED SetVariable(VariableIndexType varIndex, VariableType value)
117 PowerBasis.SetVariable(varIndex, value);
121 virtual bool CISST_DEPRECATED CanSetVariable(VariableIndexType varIndex)
const
123 return ( (0 <= varIndex) &&
124 (varIndex < GetNumVariables()) &&
125 (varIndex != GetImplicitVarIndex()) );
131 return PowerBasis.GetImplicitVariable();
137 return PowerBasis.GetImplicitVarIndex();
143 PowerBasis.SetImplicitVarIndex(newIndex);
145#ifdef CISST_COMPILER_IS_MSVC
153 CoefficientType coefficient);
157 virtual InsertStatus
SetCoefficient(TermIteratorType & where, CoefficientType coefficient);
163 virtual CoefficientType
GetCoefficient(
const TermConstIteratorType & where)
const
193 virtual void SerializeTermInfo(std::ostream & output,
const TermConstIteratorType & termIterator)
const;
217 CoefficientType shiftAmount)
const;
222 return ((BernsteinTermInfo *)(where->second))->second;
228 return ((BernsteinTermInfo *)(where->second))->second;
236 return ((BernsteinTermInfo *)(where->second))->second;
241 return ((BernsteinTermInfo *)(where->second))->first;
246 return ((BernsteinTermInfo *)(where->second))->first;
251 return ((BernsteinTermInfo *)(where->second))->first;
254#if INCLUDE_DEPRECATED_POLYNOMIAL_CODE
Definition nmrDynAllocPolynomialContainer.h:29
Definition nmrMultiVariablePowerBasis.h:38
double CoefficientType
Definition nmrPolynomialBase.h:56
Represents the power index of a single term in a multi-variable polynomial.
Definition nmrPolynomialTermPowerIndex.h:90
unsigned long MultinomialCoefficientType
Definition nmrPolynomialTermPowerIndex.h:101
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CISST_DEPRECATED
Definition cmnPortability.h:314
nmrBernsteinPolynomial(VariableIndexType numVariables, PowerType degree)
Definition nmrBernsteinPolynomial.h:89
virtual void RemoveTerm(TermIteratorType &where)
virtual void AddConstant(CoefficientType shiftAmount)
virtual ValueType EvaluateBasis(const nmrPolynomialTermPowerIndex &where, const nmrMultiVariablePowerBasis &variables) const
virtual InsertStatus SetCoefficient(const nmrPolynomialTermPowerIndex &where, CoefficientType coefficient)
virtual void AddConstantToCoefficients(CoefficientType coefficients[], CoefficientType shiftAmount) const
CoefficientType & RefTermCoefficient(const TermIteratorType &where)
Definition nmrBernsteinPolynomial.h:249
nmrPolynomialTermPowerIndex::MultinomialCoefficientType & RefMultinomialCoefficient(const TermIteratorType &where)
Definition nmrBernsteinPolynomial.h:234
virtual void SerializeTermInfo(std::ostream &output, const TermConstIteratorType &termIterator) const
const nmrPolynomialTermPowerIndex::MultinomialCoefficientType & GetMultinomialCoefficient(const TermIteratorType &where) const
Definition nmrBernsteinPolynomial.h:220
const CoefficientType & GetTermCoefficient(const TermConstIteratorType &where) const
Definition nmrBernsteinPolynomial.h:239
virtual CoefficientType GetCoefficient(const nmrPolynomialTermPowerIndex &where) const
virtual void DeserializeTermInfo(std::istream &input, TermIteratorType &termIterator)
#define INCLUDE_DEPRECATED_POLYNOMIAL_CODE
Definition nmrPolynomialBase.h:37
vctDynamicNArrayBase< vctDynamicNArrayOwner< _elementType, _dimension >, _elementType, _dimension > BaseType
Definition vctDynamicNArray.h:133