Polynome model.
More...
#include <JPolynome.hh>
Polynome model.
Definition at line 26 of file JPolynome.hh.
JMATH::JPolynome_t::JPolynome_t |
( |
| ) |
|
|
inline |
bool JMATH::JPolynome_t::equals |
( |
const JPolynome_t & |
P, |
|
|
const double |
eps = std::numeric_limits<double>::min() |
|
) |
| const |
|
inline |
Equality.
- Parameters
-
P | polynome |
eps | numerical precision |
- Returns
- true if polynomes identical; else false
Definition at line 45 of file JPolynome.hh.
48 if (this->size() == P.size()) {
50 for (const_iterator p = this->begin(), q = P.begin(); p != this->end(); ++p, ++q) {
51 if (fabs(*p - *q) > eps) {
Add polynome.
- Parameters
-
- Returns
- this polynome
Definition at line 71 of file JPolynome.hh.
73 while (this->size() < polynome.size()) {
77 for (
size_t i = 0; i != this->size(); ++i) {
78 (*this)[i] += polynome[i];
Subtract polynome.
- Parameters
-
- Returns
- this polynome
Definition at line 91 of file JPolynome.hh.
93 while (this->size() < polynome.size()) {
97 for (
size_t i = 0; i != this->size(); ++i) {
98 (*this)[i] -= polynome[i];
JPolynome_t& JMATH::JPolynome_t::mul |
( |
const double |
factor | ) |
|
|
inline |
Scale polynome.
- Parameters
-
factor | multiplication factor |
- Returns
- this polynome
Definition at line 111 of file JPolynome.hh.
113 for (iterator i = begin(); i != end(); ++i) {
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 273 of file JMath.hh.
Auxiliary class for arithmetic operations on objects.
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
JPolynome_t & |
object |
|
) |
| |
|
friend |
Read polynome from input.
- Parameters
-
in | input stream |
object | polynome |
- Returns
- input stream
Definition at line 128 of file JPolynome.hh.
130 for (
double x;
in >> x; ) {
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JPolynome_t & |
object |
|
) |
| |
|
friend |
Write polynome to output.
- Parameters
-
out | output stream |
object | polynome |
- Returns
- output stream
Definition at line 145 of file JPolynome.hh.
147 for (JPolynome_t::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
148 out <<
' ' <<
FIXED(9,3) << *i;
Auxiliary data structure for floating point format specification.
The documentation for this struct was generated from the following file: