9 Array<int,1> eidx(eval_indexes());
10 for(
int coeff_idx = 0; coeff_idx < coeffs_.rows(); coeff_idx++) {
11 res = coeffs_(eidx(coeff_idx)).value() + res * Value;
21 Array<int,1> eidx(eval_indexes());
22 for(
int coeff_idx = 0; coeff_idx < coeffs_.rows(); coeff_idx++) {
23 res = coeffs_(eidx(coeff_idx)) + res * Value;
32 for(
int arr_idx = 0; arr_idx < res.rows(); arr_idx++)
33 res(arr_idx) = (*this)(Arr(arr_idx));
39 Array<double, 1> res(Arr.rows());
40 for(
int arr_idx = 0; arr_idx < res.rows(); arr_idx++)
41 res(arr_idx) = (*this)(Arr(arr_idx));
45 blitz::Array<int,1> Poly1d::eval_indexes()
const 47 Array<int, 1> res(coeffs_.rows());
48 for(
int idx = 0; idx < coeffs_.rows(); idx++) {
52 res(idx) = coeffs_.rows() - idx - 1;
59 Os <<
"Poly1d : Polynomial: ";
60 int ncoeffs = coeffs_.rows();
61 Array<int,1> eidx(eval_indexes());
62 for(
int coeff_idx = 0; coeff_idx < ncoeffs; coeff_idx++) {
63 double coeff = coeffs_(eidx(coeff_idx)).value();
64 int power = ncoeffs - coeff_idx - 1;
66 coeff < 0.0 ? Os <<
" - " : Os <<
" + ";
71 if(power > 0) Os <<
"x";
72 if(power > 1) Os <<
"^" << power;
Apply value function to a blitz array.
double operator()(double Value) const
Evaluate polynomial for a value.
int number_variable() const
Contains classes to abstract away details in various Spurr Radiative Transfer software.
virtual void print(std::ostream &Os) const