Jpp
15.0.0
the software that should make you happy
|
Model for fit to acoustics data. More...
#include <JModel.hh>
Classes | |
struct | emitter_type |
Map emitter key to model parameters of emitter. More... | |
struct | string_type |
Map string identifier to model parameters of string. More... | |
Public Types | |
typedef JMODEL::JString | JString |
typedef JMODEL::JEmitter | JEmitter |
typedef size_t | parameter_type |
Type definition of fit parameter. More... | |
Public Member Functions | |
JModel () | |
Default constructor. More... | |
template<class T > | |
JModel (T __begin, T __end) | |
Constructor. More... | |
JModel & | operator= (const JMATH::JZero &zero) |
Reset parameters. More... | |
void | clear () |
Clear parameters. More... | |
void | reset () |
Reset parameters. More... | |
JModel & | negate () |
Negate model. More... | |
JModel & | add (const JModel &model) |
Add model. More... | |
JModel & | sub (const JModel &model) |
Subtract model. More... | |
JModel & | mul (const double factor) |
Scale model. More... | |
JModel & | div (const double factor) |
Scale model. More... | |
bool | equals (const JModel &model, const double precision=std::numeric_limits< double >::min()) const |
Check equality. More... | |
size_t | getN () const |
Get number of fit parameters. More... | |
size_t | getIndex (int id, double JString::*p) const |
Get index of fit parameter for given string. More... | |
size_t | getIndex (const JEKey &id, double JEmitter::*p) const |
Get index of fit parameter for given emitter. More... | |
double | operator[] (const size_t index) const |
Read access to fit parameter value by index. More... | |
double & | operator[] (const size_t index) |
Read/write access to fit parameter value by index. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
Static Public Member Functions | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static void | reset (JHashMap< JKey_t, JValue_t, JEvaluator_t > &buffer) |
Reset buffer. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static void | set (JHashMap< JKey_t, JValue_t, JEvaluator_t > &target, const JHashMap< JKey_t, JValue_t, JEvaluator_t > &source, const JValue_t &value) |
Set values in target corresponding to keys in source. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static void | evaluate (JHashMap< JKey_t, JValue_t, JEvaluator_t > &buffer, JValue_t &(JValue_t::*f1)()) |
Evaluate arithmetic operation on buffer. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static void | evaluate (JHashMap< JKey_t, JValue_t, JEvaluator_t > &first, const JHashMap< JKey_t, JValue_t, JEvaluator_t > &second, JValue_t &(JValue_t::*f1)(const JValue_t &)) |
Evaluate arithmetic operation on buffers. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static void | evaluate (JHashMap< JKey_t, JValue_t, JEvaluator_t > &buffer, JValue_t &(JValue_t::*f1)(const double), const double factor) |
Evaluate arithmetic operation on buffer. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static bool | equals (const JHashMap< JKey_t, JValue_t, JEvaluator_t > &first, const JHashMap< JKey_t, JValue_t, JEvaluator_t > &second) |
Check equality of buffers. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static bool | equals (const JHashMap< JKey_t, JValue_t, JEvaluator_t > &first, const JHashMap< JKey_t, JValue_t, JEvaluator_t > &second, const double precision) |
Check equality of buffers. More... | |
Public Attributes | |
JACOUSTICS::JModel::emitter_type | emitter |
JACOUSTICS::JModel::string_type | string |
Static Private Member Functions | |
template<class T > | |
static size_t | getIndex (double T::*p) |
Get index of fit parameter in given data structure. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static double | getParameter (const JHashMap< JKey_t, JValue_t, JEvaluator_t > &buffer, const size_t index) |
Get read access to fit parameter value at given index in buffer. More... | |
template<class JKey_t , class JValue_t , class JEvaluator_t > | |
static double & | getParameter (JHashMap< JKey_t, JValue_t, JEvaluator_t > &buffer, const size_t index) |
Get read/write access to fit parameter value at given index in buffer. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const JModel &model) |
Write model parameters to output stream. More... | |
Model for fit to acoustics data.
The model consists of string parameters and emitter parameters.
These parameters relate to the string identifer and emitter key, respectively.
Definition at line 400 of file JAcoustics/JModel.hh.
Definition at line 409 of file JAcoustics/JModel.hh.
Definition at line 410 of file JAcoustics/JModel.hh.
typedef size_t JACOUSTICS::JModel::parameter_type |
Type definition of fit parameter.
Definition at line 416 of file JAcoustics/JModel.hh.
|
inline |
Constructor.
This constructor can be used to set up a default model (i.e. all values at zero) for the given set of hits.
The data type corresponding to the hits should provide for the following policy methods.
int getString(); // get string identifier JEkey getEKey(); // get emitter key
__begin | begin of hits |
__end | end of hits |
Definition at line 440 of file JAcoustics/JModel.hh.
|
inline |
Reset parameters.
zero | zero |
Definition at line 461 of file JAcoustics/JModel.hh.
|
inline |
Clear parameters.
Definition at line 472 of file JAcoustics/JModel.hh.
|
inline |
Reset parameters.
Definition at line 482 of file JAcoustics/JModel.hh.
|
inline |
Negate model.
Definition at line 494 of file JAcoustics/JModel.hh.
Add model.
model | model |
Definition at line 509 of file JAcoustics/JModel.hh.
Subtract model.
model | model |
Definition at line 524 of file JAcoustics/JModel.hh.
|
inline |
Scale model.
factor | multiplication factor |
Definition at line 539 of file JAcoustics/JModel.hh.
|
inline |
Scale model.
factor | division factor |
Definition at line 554 of file JAcoustics/JModel.hh.
|
inline |
Check equality.
model | model |
precision | precision |
Definition at line 570 of file JAcoustics/JModel.hh.
|
inline |
Get number of fit parameters.
Definition at line 607 of file JAcoustics/JModel.hh.
|
inline |
Get index of fit parameter for given string.
id | string identifier |
p | pointer to data member |
Definition at line 620 of file JAcoustics/JModel.hh.
|
inline |
Get index of fit parameter for given emitter.
id | emitter key |
p | pointer to data member |
Definition at line 636 of file JAcoustics/JModel.hh.
|
inline |
Read access to fit parameter value by index.
index | index |
Definition at line 651 of file JAcoustics/JModel.hh.
|
inline |
Read/write access to fit parameter value by index.
index | index |
Definition at line 671 of file JAcoustics/JModel.hh.
|
inlinestaticprivate |
Get index of fit parameter in given data structure.
p | pointer to data member |
Definition at line 779 of file JAcoustics/JModel.hh.
|
inlinestaticprivate |
Get read access to fit parameter value at given index in buffer.
buffer | buffer |
index | index |
Definition at line 795 of file JAcoustics/JModel.hh.
|
inlinestaticprivate |
Get read/write access to fit parameter value at given index in buffer.
buffer | buffer |
index | index |
Definition at line 814 of file JAcoustics/JModel.hh.
|
inlineinherited |
Multiply with object.
object | object |
Definition at line 357 of file JMath.hh.
|
inlinestaticinherited |
Reset buffer.
buffer | buffer |
Definition at line 32 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Set values in target corresponding to keys in source.
target | target buffer |
source | source buffer |
value | value |
Definition at line 48 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Evaluate arithmetic operation on buffer.
buffer | buffer |
f1 | operation |
Definition at line 67 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Evaluate arithmetic operation on buffers.
first | first buffer |
second | second buffer |
f1 | operation |
Definition at line 84 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Evaluate arithmetic operation on buffer.
buffer | buffer |
f1 | operation |
factor | factor |
Definition at line 102 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Check equality of buffers.
first | first buffer |
second | second buffer |
Definition at line 120 of file JHashMapToolkit.hh.
|
inlinestaticinherited |
Check equality of buffers.
first | first buffer |
second | second buffer |
precision | precision |
Definition at line 154 of file JHashMapToolkit.hh.
|
friend |
Write model parameters to output stream.
out | output stream |
model | model |
Definition at line 585 of file JAcoustics/JModel.hh.
JACOUSTICS::JModel::emitter_type JACOUSTICS::JModel::emitter |
JACOUSTICS::JModel::string_type JACOUSTICS::JModel::string |