Jpp 19.3.0-rc.1
the software that should make you happy
|
Quantile calculator for a given function. More...
#include <JQuantiles.hh>
Public Types | |
typedef JAbstractCollection< double > | JAbscissa_t |
typedef std::pair< double, double > | pair_type |
typedef JRange< double, std::less< double > > | range_type |
typedef JLANG::JClass< double >::argument_type | argument_type |
typedef double | key_type |
typedef double | mapped_type |
Public Member Functions | |
JQuantiles () | |
Default constructor. | |
template<class JFunction1D_t > | |
JQuantiles (const JFunction1D_t &f1, const double Q=1.0, const double eps=1.0e-6) | |
Constructor. | |
template<class JFunction1D_t > | |
JQuantiles (const JAbscissa_t &abscissa, const JFunction1D_t &f1, const double Q=1.0, const double eps=1.0e-6) | |
Constructor. | |
template<class JFunction1D_t > | |
void | set (const JFunction1D_t &f1, const double Q=1.0, const double eps=1.0e-6) |
Set quantiles. | |
template<class JFunction1D_t > | |
void | set (const JAbscissa_t &abscissa, const JFunction1D_t &f1, const double Q=1.0, const double eps=1.0e-6) |
Set quantiles. | |
double | getX () const |
Get position of maximum. | |
double | getY () const |
Get value of maximum. | |
double | getFWHM () const |
Get Full Width at Half Maximum. | |
double | getIntegral () const |
Get integral of function. | |
operator pair_type () const | |
Type conversion operator. | |
const range_type & | getRange () const |
Get range. | |
void | setRange (const range_type &range) |
Set range. | |
void | setRange (argument_type x, argument_type y) |
Set lower and upper limit. | |
void | setRange (R first, R second) |
Set range. | |
void | setRange (const array_type< JElement_t, JAllocator_t > &buffer) |
Set lower and upper limit according to input data. | |
double | getLowerLimit () const |
Get lower limit. | |
double | getUpperLimit () const |
Get upper limit. | |
void | setLowerLimit (argument_type x) |
Set lower limit. | |
void | setUpperLimit (argument_type y) |
Set upper limit. | |
void | fixLowerLimit (argument_type x) |
Fix lower limit. | |
void | fixUpperLimit (argument_type y) |
Fix upper limit. | |
bool | equals (const range_type &range) const |
Equal method. | |
double | getLength () const |
Get length (difference between upper and lower limit). | |
void | setLength (argument_type length) |
Set length (difference between upper and lower limit). | |
bool | is_valid () const |
Check validity of range. | |
bool | in_range (argument_type x) const |
Test whether value is inside range. | |
bool | operator() (argument_type x) const |
Test whether value is inside range. | |
double | constrain (argument_type x) const |
Constrain value to range. | |
double | mod (argument_type x) const |
Modulo value with respect to range. | |
bool | overlap (const range_type &range) const |
Test overlap with given range. | |
range_type & | include (argument_type x) |
Include given value to range. | |
range_type & | join (const range_type &range) |
Join ranges. | |
range_type & | combine (const range_type &range) |
Combine ranges. | |
range_type & | add (argument_type x) |
Add offset. | |
range_type & | add (const range_type &range) |
Add offsets. | |
range_type & | sub (argument_type x) |
Subtract offset. | |
range_type & | sub (const range_type &range) |
Subtract offsets. | |
range_type & | mul (const double factor) |
Multiply range. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
range_type & | div (const double factor) |
Divide range. | |
const key_type & | getKey () const |
const mapped_type & | getValue () const |
mapped_type & | getValue () |
Static Public Member Functions | |
static double | getMinimum () |
Get minimum possible value. | |
static double | getMaximum () |
Get maximum possible value. | |
static JRange< double, std::less< double > > | DEFAULT_RANGE () |
Default range. | |
Public Attributes | |
std::less< double > | compare |
Function object for comparisons. | |
double | first |
double | second |
Protected Member Functions | |
void | setRange (R first, R second, const JLANG::JBool< false > &option) |
Set range. | |
void | setRange (R first, R second, const JLANG::JBool< true > &option) |
Set range. | |
Protected Attributes | |
double | Xmax |
double | Ymax |
double | fwhm |
double | sum |
Quantile calculator for a given function.
It is assumed that the function has a single maximum.
Definition at line 106 of file JQuantiles.hh.
Definition at line 111 of file JQuantiles.hh.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inline |
|
inline |
Constructor.
f1 | functional collection |
Q | quantile |
eps | relative precision |
Definition at line 132 of file JQuantiles.hh.
|
inline |
|
inline |
Set quantiles.
f1 | functional collection |
Q | quantile |
eps | relative precision |
Definition at line 174 of file JQuantiles.hh.
|
inline |
Set quantiles.
abscissa | abscissa |
f1 | function |
Q | quantile |
eps | relative precision |
Definition at line 294 of file JQuantiles.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
Get range.
|
inlineinherited |
Set range.
range | range |
|
inlineinherited |
|
inlineinherited |
Set range.
The arguments could be values or iterators.
first | first |
second | second |
Definition at line 173 of file JRange.hh.
|
inlineinherited |
|
inlineprotectedinherited |
Set range.
first | first |
second | second |
option | false |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Equal method.
range | range |
Definition at line 275 of file JRange.hh.
|
inlineinherited |
Get length (difference between upper and lower limit).
|
inlineinherited |
Set length (difference between upper and lower limit).
length | length |
|
inlineinherited |
Check validity of range.
|
inlineinherited |
Test whether value is inside range.
x | value |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Join ranges.
The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).
range | range |
Definition at line 415 of file JRange.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Add offsets.
The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.
range | offset |
|
inlineinherited |
|
inlineinherited |
Subtract offsets.
The new lower limit is the difference of the two lower limits and
the new upper limit is the difference of the two upper limits.
range | offset |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlinestaticinherited |
Get maximum possible value.
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protected |
Definition at line 353 of file JQuantiles.hh.
|
protected |
Definition at line 354 of file JQuantiles.hh.
|
protected |
Definition at line 355 of file JQuantiles.hh.
|
protected |
Definition at line 356 of file JQuantiles.hh.
|
inherited |
|
inherited |
|
inherited |