Fit model.
More...
#include <JModel.hh>
Fit model.
Definition at line 29 of file JMath/JModel.hh.
Reset.
- Parameters
-
- Returns
- this model
Definition at line 43 of file JMath/JModel.hh.
45 for (
size_t i = 0; i != this->size(); ++i) {
double& JMATH::JModel_t::operator[] |
( |
const size_t |
index | ) |
|
|
inline |
Get value at given index.
- Parameters
-
- Returns
- value
Definition at line 59 of file JMath/JModel.hh.
61 if (index >= this->size()) {
62 this->resize(index + 1, 0.0);
bool JMATH::JModel_t::equals |
( |
const JModel_t & |
model, |
|
|
const double |
eps = std::numeric_limits<double>::min() |
|
) |
| const |
|
inline |
Equality.
- Parameters
-
model | model |
eps | numerical precision |
- Returns
- true if model's identical; else false
Definition at line 76 of file JMath/JModel.hh.
79 for (
size_t i = 0; i != this->size(); ++i) {
80 if (fabs((*
this)[i] - model[i]) >= eps) {
Negate model.
- Returns
- this model
Definition at line 94 of file JMath/JModel.hh.
96 for (
size_t i = 0; i != this->size(); ++i) {
97 (*this)[i] = -(*this)[i];
Add model.
- Parameters
-
- Returns
- this model
Definition at line 110 of file JMath/JModel.hh.
112 for (
size_t i = 0; i != model.size(); ++i) {
113 (*this)[i] += model[i];
Subtract model.
- Parameters
-
- Returns
- this model
Definition at line 126 of file JMath/JModel.hh.
128 for (
size_t i = 0; i != model.size(); ++i) {
129 (*this)[i] -= model[i];
JModel_t& JMATH::JModel_t::mul |
( |
const double |
factor | ) |
|
|
inline |
Scale model.
- Parameters
-
factor | multiplication factor |
- Returns
- this model
Definition at line 142 of file JMath/JModel.hh.
144 for (
size_t i = 0; i != this->size(); ++i) {
145 (*this)[i] *= factor;
JModel_t& JMATH::JModel_t::div |
( |
const double |
factor | ) |
|
|
inline |
Scale model.
- Parameters
-
- Returns
- this model
Definition at line 158 of file JMath/JModel.hh.
160 for (
size_t i = 0; i != this->size(); ++i) {
161 (*this)[i] /= factor;
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 357 of file JMath.hh.
Auxiliary class for arithmetic operations on objects.
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
JModel_t & |
model |
|
) |
| |
|
friend |
Write model to input stream.
- Parameters
-
in | input stream |
model | model |
- Returns
- input stream
Definition at line 175 of file JMath/JModel.hh.
179 for (
double value;
in >> value; ) {
180 model.push_back(value);
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JModel_t & |
model |
|
) |
| |
|
friend |
Write model to output stream.
- Parameters
-
out | output stream |
model | model |
- Returns
- output stream
Definition at line 194 of file JMath/JModel.hh.
198 for (JModel_t::const_iterator i = model.begin(); i != model.end(); ++i) {
199 return out <<
FIXED(7,3) << *i <<
' ';
Auxiliary data structure for floating point format specification.
The documentation for this struct was generated from the following file: