OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
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 |
PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial.
PolynomialCoefficient has three member data
inVarByVec_m | is 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_m | is the output y variable to which the coefficient pertains |
coefficient | is the value of the coefficient |
Definition at line 43 of file PolynomialCoefficient.h.
|
inline |
Construct the coefficient
inVariablesByVector | x power indexed like e.g. |
outVariable | y index that the coefficient pertains to |
coefficient | value of the coefficient |
Definition at line 51 of file PolynomialCoefficient.h.
|
inline |
Copy constructor
Definition at line 60 of file PolynomialCoefficient.h.
|
inline |
Return the coefficient value
Definition at line 72 of file PolynomialCoefficient.h.
References _coefficient.
Referenced by interpolation::operator<<().
|
inline |
|
inline |
Return true if var is in inVariables
Definition at line 95 of file PolynomialCoefficient.h.
References _inVarByVec.
|
inline |
Return the vector of input variables, indexed by vector
Definition at line 66 of file PolynomialCoefficient.h.
References _inVarByVec.
Referenced by interpolation::operator<<().
|
inline |
Set the vector of input variables, indexed by vector
Definition at line 75 of file PolynomialCoefficient.h.
References _inVarByVec.
|
inline |
Return the output variable
Definition at line 69 of file PolynomialCoefficient.h.
References _outVar.
Referenced by interpolation::operator<<().
|
inline |
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
spaceIn | Describes the input subspace |
spaceOut | Describes 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.
|
private |
Definition at line 100 of file PolynomialCoefficient.h.
Referenced by Coefficient().
|
private |
Definition at line 98 of file PolynomialCoefficient.h.
Referenced by HasInVariable(), InVariables(), and SpaceTransform().
|
private |
Definition at line 99 of file PolynomialCoefficient.h.
Referenced by OutVariable(), and SpaceTransform().