OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Attributes | List of all members
interpolation::PolynomialCoefficient Class Reference

PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial. More...

#include <PolynomialCoefficient.h>

Public Member Functions

 PolynomialCoefficient (std::vector< int > inVariablesByVector, int outVariable, double coefficient)
 
 PolynomialCoefficient (const PolynomialCoefficient &pc)
 
std::vector< int > InVariables () const
 
int OutVariable () const
 
double Coefficient () const
 
std::vector< int > InVariables (std::vector< int > inVar)
 
int OutVariable (int outVar)
 
double Coefficient (double coeff)
 
void SpaceTransform (std::vector< int > spaceIn, std::vector< int > spaceOut)
 
bool HasInVariable (int var) const
 

Private Attributes

std::vector< int > _inVarByVec
 
int _outVar
 
double _coefficient
 

Detailed Description

PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial.

PolynomialCoefficient has three member data

Parameters
inVarByVec_mis the x power to which the coefficient pertains, indexed by vector e.g. \(x_1^4 x_2^3 =\) {1,1,1,1,2,2,2}
outVar_mis the output y variable to which the coefficient pertains
coefficientis the value of the coefficient

Definition at line 43 of file PolynomialCoefficient.h.

Constructor & Destructor Documentation

interpolation::PolynomialCoefficient::PolynomialCoefficient ( std::vector< int >  inVariablesByVector,
int  outVariable,
double  coefficient 
)
inline

Construct the coefficient

Parameters
inVariablesByVectorx power indexed like e.g.
outVariabley index that the coefficient pertains to
coefficientvalue of the coefficient

Definition at line 51 of file PolynomialCoefficient.h.

interpolation::PolynomialCoefficient::PolynomialCoefficient ( const PolynomialCoefficient pc)
inline

Copy constructor

Definition at line 60 of file PolynomialCoefficient.h.

Member Function Documentation

double interpolation::PolynomialCoefficient::Coefficient ( ) const
inline

Return the coefficient value

Definition at line 72 of file PolynomialCoefficient.h.

References _coefficient.

Referenced by interpolation::operator<<().

double interpolation::PolynomialCoefficient::Coefficient ( double  coeff)
inline

Set the coefficient

Definition at line 80 of file PolynomialCoefficient.h.

References _coefficient.

bool interpolation::PolynomialCoefficient::HasInVariable ( int  var) const
inline

Return true if var is in inVariables

Definition at line 95 of file PolynomialCoefficient.h.

References _inVarByVec.

std::vector<int> interpolation::PolynomialCoefficient::InVariables ( ) const
inline

Return the vector of input variables, indexed by vector

Definition at line 66 of file PolynomialCoefficient.h.

References _inVarByVec.

Referenced by interpolation::operator<<().

std::vector<int> interpolation::PolynomialCoefficient::InVariables ( std::vector< int >  inVar)
inline

Set the vector of input variables, indexed by vector

Definition at line 75 of file PolynomialCoefficient.h.

References _inVarByVec.

int interpolation::PolynomialCoefficient::OutVariable ( ) const
inline

Return the output variable

Definition at line 69 of file PolynomialCoefficient.h.

References _outVar.

Referenced by interpolation::operator<<().

int interpolation::PolynomialCoefficient::OutVariable ( int  outVar)
inline

Set the output variable

Definition at line 78 of file PolynomialCoefficient.h.

References _outVar.

void interpolation::PolynomialCoefficient::SpaceTransform ( std::vector< int >  spaceIn,
std::vector< int >  spaceOut 
)

Transform coefficient from subspace space_in to subspace space_out, both subspaces of some larger space

Parameters
spaceInDescribes the input subspace
spaceOutDescribes the output subspace Throws an exception if the coefficient is not in the input or output subspace So for coeff({1,2},0,1.1), coeff.space_transform({0,2,3,5}, {4,7,1,2,3,0}) would return coeff({3,4},5,1.1)

Definition at line 13 of file PolynomialCoefficient.cpp.

References _inVarByVec, and _outVar.

Member Data Documentation

double interpolation::PolynomialCoefficient::_coefficient
private

Definition at line 100 of file PolynomialCoefficient.h.

Referenced by Coefficient().

std::vector<int> interpolation::PolynomialCoefficient::_inVarByVec
private

Definition at line 98 of file PolynomialCoefficient.h.

Referenced by HasInVariable(), InVariables(), and SpaceTransform().

int interpolation::PolynomialCoefficient::_outVar
private

Definition at line 99 of file PolynomialCoefficient.h.

Referenced by OutVariable(), and SpaceTransform().


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