MGCL V10
V10
MGCL V10
|
Defines PP-Represetation of a spline. [詳解]
公開メンバ関数 | |
MGPPRep () | |
Default constructor. [詳解] | |
MGPPRep (int order, int nbreak, int sdim) | |
Constructor of dummy PP-Rep of specified size. [詳解] | |
MGPPRep (int order, int sdim, const MGNDDArray &tau) | |
Constructor of dummy PP-Rep(no data except data points) of specified size. [詳解] | |
MGPPRep (const MGLBRep &lbrep) | |
Constructor to convert from Line B-Representation. [詳解] | |
MGPPRep (int order, const MGPPRep &pprep) | |
MGPPRep (const MGPPRep &rhs) | |
Copy constructor. [詳解] | |
~MGPPRep () | |
MGPPRep & | operator= (const MGPPRep &) |
double | operator() (int i, int j, int k) const |
Assignment. [詳解] | |
double & | operator() (int i, int j, int k) |
MGVector | operator() (int i, int j) const |
Extract (i,j,k)elements for 0<=k<sdim() as a vector. [詳解] | |
const MGNDDArray & | break_point () const |
Returns break point sequence. [詳解] | |
double | break_point (int i) const |
Returns i-th break point value. [詳解] | |
double & | break_point (int i) |
Returns a pointer to i-th break_point to access. [詳解] | |
const double * | break_point_data () const |
Returns a pointer to the break_point data. [詳解] | |
double | coef (int i, int j, int k) const |
Returns (i,j,k)-th coef value. [詳解] | |
double & | coef (int i, int j, int k) |
Returns a pointer to coef(i,j,k) to access. [詳解] | |
MGVector | coef (int i, int j) const |
Extract (i,j,k)elements for 0<=k<sdim() as a vector. [詳解] | |
const double * | coef_data (int i=0, int j=0, int k=0) const |
Returns a pointer to the PPCoef data. [詳解] | |
MGVector | eval (double t, int n=0) const |
Evaluate right continuous n'th derivative(BPVAL) [詳解] | |
MGVector | eval_i (int i, double t, int n) const |
Evaluate i-th span's n'th derivative(BPVAL) [詳解] | |
int | nbreak () const |
Returns the number of Break points including the end point. [詳解] | |
MGPPRep & | normalize () |
int | order () const |
Returns the order of PPRep. [詳解] | |
double | ref (int i, int j, int k) const |
Return the data of (i,j,k). [詳解] | |
void | reshape (int nbreak) |
void | resize (int order, int nbreak, int dim) |
int | sdim () const |
Returns the space dimension. [詳解] | |
void | store_at (int i, int j, const MGVector &v) |
Store the vector v at coef(i,j). [詳解] | |
int | dump_size () const |
Dump Functions. [詳解] | |
int | dump (MGOfstream &) const |
Dump Function. [詳解] | |
int | restore (MGIfstream &) |
Restore Function. [詳解] | |
フレンド | |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &, const MGPPRep &) |
String stream output Function. [詳解] | |
Defines PP-Represetation of a spline.
The indices are: MGPPRep(i,j,k) where i is order, j is break point id, and k is space dimensio id. When tau(j)<=t<tau(j+1)(tau(j) is break_point(j)), using coef(i,j,k), the PP-representation f(t) is: f(t)=sum of i(coef(i,j,k)/factorial(i)*(power(i) of (t-tau(j)))) for i=0,...,order-1. In other words, the coefficinet of (t-tau(j))**i is coef(i,j,k)/factorial(i) for k=0,...,sdim()-1, and i=0, ... ,order-1. Here, ** i indicates power i.
MGPPRep::MGPPRep | ( | ) |
Default constructor.
MGPPRep::MGPPRep | ( | int | order, |
int | nbreak, | ||
int | sdim | ||
) |
Constructor of dummy PP-Rep of specified size.
MGPPRep::MGPPRep | ( | int | order, |
int | sdim, | ||
const MGNDDArray & | tau | ||
) |
Constructor of dummy PP-Rep(no data except data points) of specified size.
MGPPRep::MGPPRep | ( | const MGLBRep & | lbrep | ) |
Constructor to convert from Line B-Representation.
MGPPRep::MGPPRep | ( | int | order, |
const MGPPRep & | pprep | ||
) |
Constructor to change order of original PP-Representation. New order may be greater or less than the original one. However, if new one is less than the original, PP-Rep constructed may not be able to hold the same shape.
MGPPRep::MGPPRep | ( | const MGPPRep & | rhs | ) |
Copy constructor.
|
inline |
|
inline |
Returns break point sequence.
|
inline |
Returns i-th break point value.
|
inline |
Returns a pointer to i-th break_point to access.
|
inline |
Returns a pointer to the break_point data.
double MGPPRep::coef | ( | int | i, |
int | j, | ||
int | k | ||
) | const |
Returns (i,j,k)-th coef value.
double& MGPPRep::coef | ( | int | i, |
int | j, | ||
int | k | ||
) |
Returns a pointer to coef(i,j,k) to access.
const double* MGPPRep::coef_data | ( | int | i = 0 , |
int | j = 0 , |
||
int | k = 0 |
||
) | const |
Returns a pointer to the PPCoef data.
int MGPPRep::dump | ( | MGOfstream & | ) | const |
Dump Function.
int MGPPRep::dump_size | ( | ) | const |
Dump Functions.
MGVector MGPPRep::eval | ( | double | t, |
int | n = 0 |
||
) | const |
Evaluate right continuous n'th derivative(BPVAL)
t | Parameter value to evaluate. |
n | Degree of derivative. When n=0, compute positional data. |
MGVector MGPPRep::eval_i | ( | int | i, |
double | t, | ||
int | n | ||
) | const |
Evaluate i-th span's n'th derivative(BPVAL)
i | span number(from 0) of the PP-Rep. |
t | Parameter value to evaluate. |
n | Dgree of derivative. When n=0, compute positional data. |
|
inline |
Returns the number of Break points including the end point.
MGPPRep& MGPPRep::normalize | ( | ) |
"normalize" normalizes the PP-Rep, i.e. changes break point data and pp-coefficients so as that length of first derivatives from left and right at each break point are the same.
|
inline |
Assignment.
Return i-th element of the position.
|
inline |
|
inline |
Extract (i,j,k)elements for 0<=k<sdim() as a vector.
|
inline |
Returns the order of PPRep.
double MGPPRep::ref | ( | int | i, |
int | j, | ||
int | k | ||
) | const |
Return the data of (i,j,k).
void MGPPRep::reshape | ( | int | nbreak | ) |
Change size. Change of sdim not allowed. Stored data so far will be guarateed to hold in the same id of coef(i,j,k).
void MGPPRep::resize | ( | int | order, |
int | nbreak, | ||
int | dim | ||
) |
Resize to (order, nbreak, dim). Resutl will contain only garbages.
order | Order number. |
nbreak | number of break points, includes last points. |
dim | Space dimension. |
int MGPPRep::restore | ( | MGIfstream & | ) |
Restore Function.
|
inline |
Returns the space dimension.
void MGPPRep::store_at | ( | int | i, |
int | j, | ||
const MGVector & | v | ||
) |
Store the vector v at coef(i,j).
|
friend |
String stream output Function.