Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JTOOLS::JQuantiles Class Reference

Quantile calculator for a given function. More...

#include <JQuantiles.hh>

Inheritance diagram for JTOOLS::JQuantiles:
JTOOLS::JRange< double > JTOOLS::JPair< double, double > JLANG::JEquals< JFirst_t, JSecond_t > JMATH::JMath< JFirst_t, JSecond_t >

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_typegetRange () 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_typeinclude (argument_type x)
 Include given value to range.
 
range_typejoin (const range_type &range)
 Join ranges.
 
range_typecombine (const range_type &range)
 Combine ranges.
 
range_typeadd (argument_type x)
 Add offset.
 
range_typeadd (const range_type &range)
 Add offsets.
 
range_typesub (argument_type x)
 Subtract offset.
 
range_typesub (const range_type &range)
 Subtract offsets.
 
range_typemul (const double factor)
 Multiply range.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
range_typediv (const double factor)
 Divide range.
 
const key_typegetKey () const
 
const mapped_typegetValue () const
 
mapped_typegetValue ()
 

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
 

Detailed Description

Quantile calculator for a given function.

It is assumed that the function has a single maximum.

Definition at line 106 of file JQuantiles.hh.

Member Typedef Documentation

◆ JAbscissa_t

◆ pair_type

std::pair<double,double> JTOOLS::JRange< double, std::less<double> >::pair_type
inherited

Definition at line 45 of file JRange.hh.

◆ range_type

JRange<double, std::less<double>> JTOOLS::JRange< double, std::less<double> >::range_type
inherited

Definition at line 46 of file JRange.hh.

◆ argument_type

JLANG::JClass<double>::argument_type JTOOLS::JRange< double, std::less<double> >::argument_type
inherited

Definition at line 47 of file JRange.hh.

◆ key_type

double JTOOLS::JPair< double, double >::key_type
inherited

Definition at line 32 of file JPair.hh.

◆ mapped_type

double JTOOLS::JPair< double, double >::mapped_type
inherited

Definition at line 33 of file JPair.hh.

Constructor & Destructor Documentation

◆ JQuantiles() [1/3]

JTOOLS::JQuantiles::JQuantiles ( )
inline

Default constructor.

Definition at line 116 of file JQuantiles.hh.

116 :
117 Xmax(0.0),
118 Ymax(0.0),
119 fwhm(0.0),
120 sum (0.0)
121 {}

◆ JQuantiles() [2/3]

template<class JFunction1D_t >
JTOOLS::JQuantiles::JQuantiles ( const JFunction1D_t & f1,
const double Q = 1.0,
const double eps = 1.0e-6 )
inline

Constructor.

Parameters
f1functional collection
Qquantile
epsrelative precision

Definition at line 132 of file JQuantiles.hh.

134 :
135 Xmax(0.0),
136 Ymax(0.0),
137 fwhm(0.0),
138 sum (0.0)
139 {
140 set(f1, Q, eps);
141 }
void set(const JFunction1D_t &f1, const double Q=1.0, const double eps=1.0e-6)
Set quantiles.

◆ JQuantiles() [3/3]

template<class JFunction1D_t >
JTOOLS::JQuantiles::JQuantiles ( const JAbscissa_t & abscissa,
const JFunction1D_t & f1,
const double Q = 1.0,
const double eps = 1.0e-6 )
inline

Constructor.

Parameters
abscissaabscissa
f1function
Qquantile
epsrelative precision

Definition at line 153 of file JQuantiles.hh.

156 :
157 Xmax(0.0),
158 Ymax(0.0),
159 fwhm(0.0),
160 sum (0.0)
161 {
162 set(abscissa, f1, Q, eps);
163 }

Member Function Documentation

◆ set() [1/2]

template<class JFunction1D_t >
void JTOOLS::JQuantiles::set ( const JFunction1D_t & f1,
const double Q = 1.0,
const double eps = 1.0e-6 )
inline

Set quantiles.

Parameters
f1functional collection
Qquantile
epsrelative precision

Definition at line 174 of file JQuantiles.hh.

177 {
178 typedef typename JFunction1D_t::const_iterator const_iterator;
179
180 if (f1.empty()) {
181 throw JEmptyCollection("JQuantiles() no data.");
182 }
183
184
185 // maximum
186
187 const_iterator p = f1.begin();
188
189 for (const_iterator i = f1.begin(); i != f1.end(); ++i) {
190 if (i->getY() > p->getY()) {
191 p = i;
192 }
193 }
194
195
196 // x at maximum
197
198 Xmax = p->getX();
199
200 if (p != f1.begin()) {
201
202 const double xa = (--p)->getX();
203 const double xb = (++p)->getX();
204
205 if (++p != f1.end()) {
206
207 const double xc = p->getX();
208
209 Xmax = search(xa, xb, xc, f1, -1, eps);
210 }
211 }
212
213 Ymax = get_value(f1(Xmax));
214
215
216 // integral & quantile
217
218 if (Q > 0.0 && Q <= 1.0) {
219
220 JSplineFunction1D<JSplineElement2D<double, double>, JCollection, double> buffer;
221
222 try {
223
224 sum = makeCDF(f1, buffer);
225
226 setLowerLimit(buffer(0.5 * (1.0 - Q)));
227 setUpperLimit(buffer(0.5 * (1.0 + Q)));
228 }
229 catch(const JException& error) {
230 sum = 0.0;
231 }
232
233 } else {
234
236
237 if (Q > 1.0) {
238 setLowerLimit(f1. begin()->getX());
239 setUpperLimit(f1.rbegin()->getX());
240 } else if (Q <= 0.0) {
243 }
244 }
245
246
247 // FWHM
248
249 fwhm = 0.0;
250
251 for (double xmin = f1.begin()->getX(), xmax = Xmax, v = 0.5*Ymax; ; ) {
252
253 const double x = 0.5 * (xmin + xmax);
254 const double y = get_value(f1(x));
255
256 if (fabs(y - v) < eps*v || xmax - xmin < eps) {
257 fwhm -= x;
258 break;
259 }
260
261 if (y > v)
262 xmax = x;
263 else
264 xmin = x;
265 }
266
267 for (double xmin = Xmax, xmax = f1.rbegin()->getX(), v = 0.5*Ymax; ; ) {
268
269 const double x = 0.5 * (xmin + xmax);
270 const double y = get_value(f1(x));
271
272 if (fabs(y - v) < eps*v || xmax - xmin < eps) {
273 fwhm += x;
274 break;
275 }
276
277 if (y > v)
278 xmin = x;
279 else
280 xmax = x;
281 }
282 }
double getX() const
Get position of maximum.
void setUpperLimit(argument_type y)
Definition JRange.hh:235
void setLowerLimit(argument_type x)
Definition JRange.hh:224
const JPolynome f1(1.0, 2.0, 3.0)
Function.
const double xmax
const double xmin
double search(const double xa, const double xb, const double xc, const JFunction1D_t &f, const int is, const double eps=1.0e-6)
Locate maximum or minimun of function.
Definition JQuantiles.hh:48
JContainer_t::ordinate_type makeCDF(const JContainer_t &input, JMappableCollection< JKey_t, JValue_t > &output, const typename JContainer_t::ordinate_type eps=JMATH::zero)
Conversion of data points to cumulative probability distribition (CDF).
JContainer_t::ordinate_type getIntegral(const JContainer_t &input)
Get integral of input data points.
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition JResult.hh:998

◆ set() [2/2]

template<class JFunction1D_t >
void JTOOLS::JQuantiles::set ( const JAbscissa_t & abscissa,
const JFunction1D_t & f1,
const double Q = 1.0,
const double eps = 1.0e-6 )
inline

Set quantiles.

Parameters
abscissaabscissa
f1function
Qquantile
epsrelative precision

Definition at line 294 of file JQuantiles.hh.

298 {
299 JSplineFunction1D<JSplineElement2D<double, double>, JCollection, double> buffer;
300
301 buffer.configure(abscissa, f1);
302 buffer.compile();
303
304 set(buffer, Q, eps);
305 }

◆ getX()

double JTOOLS::JQuantiles::getX ( ) const
inline

Get position of maximum.

Returns
x value at maximum

Definition at line 313 of file JQuantiles.hh.

314 {
315 return Xmax;
316 }

◆ getY()

double JTOOLS::JQuantiles::getY ( ) const
inline

Get value of maximum.

Returns
y value at maximum

Definition at line 324 of file JQuantiles.hh.

325 {
326 return Ymax;
327 }

◆ getFWHM()

double JTOOLS::JQuantiles::getFWHM ( ) const
inline

Get Full Width at Half Maximum.

Returns
FWHM

Definition at line 335 of file JQuantiles.hh.

336 {
337 return fwhm;
338 }

◆ getIntegral()

double JTOOLS::JQuantiles::getIntegral ( ) const
inline

Get integral of function.

Returns
integral

Definition at line 346 of file JQuantiles.hh.

347 {
348 return sum;
349 }

◆ operator pair_type()

JTOOLS::JRange< double, std::less<double> >::operator pair_type ( ) const
inlineinherited

Type conversion operator.

Returns
piar

Definition at line 124 of file JRange.hh.

125 {
127 }
double getLowerLimit() const
Definition JRange.hh:202
std::pair< double, double > pair_type
Definition JRange.hh:45
double getUpperLimit() const
Definition JRange.hh:213

◆ getRange()

const range_type & JTOOLS::JRange< double, std::less<double> >::getRange ( ) const
inlineinherited

Get range.

Returns
range

Definition at line 135 of file JRange.hh.

136 {
137 return static_cast<const range_type&>(*this);
138 }
JRange< double, std::less< double > > range_type
Definition JRange.hh:46

◆ setRange() [1/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( const range_type & range)
inlineinherited

Set range.

Parameters
rangerange

Definition at line 146 of file JRange.hh.

147 {
148 static_cast<range_type&>(*this) = range;
149 }

◆ setRange() [2/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( argument_type x,
argument_type y )
inlineinherited

Set lower and upper limit.

Parameters
xlower limit
yupper limit

Definition at line 158 of file JRange.hh.

159 {
160 this->first = x;
161 this->second = y;
162 }

◆ setRange() [3/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( R first,
R second )
inlineinherited

Set range.


The arguments could be values or iterators.

Parameters
firstfirst
secondsecond

Definition at line 173 of file JRange.hh.

174 {
175 using namespace JLANG;
176
178 }
void setRange(const range_type &range)
Definition JRange.hh:146
Auxiliary classes and methods for language specific functionality.
Auxiliary template class for type bool.
Definition JBool.hh:21
Data structure to check whether given data type is an iterator.
Definition JClass.hh:62

◆ setRange() [4/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( const array_type< JElement_t, JAllocator_t > & buffer)
inlineinherited

Set lower and upper limit according to input data.

Parameters
bufferinput data

Definition at line 187 of file JRange.hh.

188 {
190
191 for (typename array_type<JElement_t, JAllocator_t>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
192 include(*i);
193 }
194 }
range_type & include(argument_type x)
Definition JRange.hh:397
static double getMaximum()
Definition JRange.hh:545
static double getMinimum()
Definition JRange.hh:534

◆ setRange() [5/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( R first,
R second,
const JLANG::JBool< false > & option )
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optionfalse

Definition at line 576 of file JRange.hh.

577 {
579 }
JLANG::JClass< double >::argument_type argument_type
Definition JRange.hh:47

◆ setRange() [6/6]

void JTOOLS::JRange< double, std::less<double> >::setRange ( R first,
R second,
const JLANG::JBool< true > & option )
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optiontrue

Definition at line 590 of file JRange.hh.

591 {
593
594 for (R i = first; i != second; ++i) {
595 include(*i);
596 }
597 }

◆ getLowerLimit()

double JTOOLS::JRange< double, std::less<double> >::getLowerLimit ( ) const
inlineinherited

Get lower limit.

Returns
lower limit

Definition at line 202 of file JRange.hh.

203 {
204 return this->first;
205 }

◆ getUpperLimit()

double JTOOLS::JRange< double, std::less<double> >::getUpperLimit ( ) const
inlineinherited

Get upper limit.

Returns
upper limit

Definition at line 213 of file JRange.hh.

214 {
215 return this->second;
216 }

◆ setLowerLimit()

void JTOOLS::JRange< double, std::less<double> >::setLowerLimit ( argument_type x)
inlineinherited

Set lower limit.

Parameters
xlower limit

Definition at line 224 of file JRange.hh.

225 {
226 this->first = x;
227 }

◆ setUpperLimit()

void JTOOLS::JRange< double, std::less<double> >::setUpperLimit ( argument_type y)
inlineinherited

Set upper limit.

Parameters
yupper limit

Definition at line 235 of file JRange.hh.

236 {
237 this->second = y;
238 }

◆ fixLowerLimit()

void JTOOLS::JRange< double, std::less<double> >::fixLowerLimit ( argument_type x)
inlineinherited

Fix lower limit.

The range is shifted to the given lower limit.

Parameters
xlower limit

Definition at line 248 of file JRange.hh.

249 {
250 this->second += x - this->first;
251 this->first = x;
252 }

◆ fixUpperLimit()

void JTOOLS::JRange< double, std::less<double> >::fixUpperLimit ( argument_type y)
inlineinherited

Fix upper limit.

The range is shifted to the given upper limit.

Parameters
yupper limit

Definition at line 262 of file JRange.hh.

263 {
264 this->first += y - this->second;
265 this->second = y;
266 }

◆ equals()

bool JTOOLS::JRange< double, std::less<double> >::equals ( const range_type & range) const
inlineinherited

Equal method.

Parameters
rangerange
Returns
true if this range is equal to given range; else false

Definition at line 275 of file JRange.hh.

276 {
277 return (!this->compare(this->getLowerLimit(), range.getLowerLimit()) &&
278 !this->compare(range.getLowerLimit(), this->getLowerLimit()) &&
279 !this->compare(this->getUpperLimit(), range.getUpperLimit()) &&
280 !this->compare(range.getUpperLimit(), this->getUpperLimit()));
281 }
std::less< double > compare
Definition JRange.hh:565

◆ getLength()

double JTOOLS::JRange< double, std::less<double> >::getLength ( ) const
inlineinherited

Get length (difference between upper and lower limit).

Returns
length

Definition at line 289 of file JRange.hh.

290 {
291 return getUpperLimit() - getLowerLimit();
292 }

◆ setLength()

void JTOOLS::JRange< double, std::less<double> >::setLength ( argument_type length)
inlineinherited

Set length (difference between upper and lower limit).

Parameters
lengthlength

Definition at line 300 of file JRange.hh.

301 {
302 setUpperLimit(getLowerLimit() + length);
303 }

◆ is_valid()

bool JTOOLS::JRange< double, std::less<double> >::is_valid ( ) const
inlineinherited

Check validity of range.

Returns
true if lower limit less than or equal to upper limit; else false

Definition at line 311 of file JRange.hh.

312 {
313 return !compare(getUpperLimit(), getLowerLimit());
314 }

◆ in_range()

bool JTOOLS::JRange< double, std::less<double> >::in_range ( argument_type x) const
inlineinherited

Test whether value is inside range.

Parameters
xvalue
Returns
true if lower limit <= value <= upper limit; else false

Definition at line 323 of file JRange.hh.

324 {
325 return (!compare(x, getLowerLimit()) &&
326 !compare(getUpperLimit(), x));
327 }

◆ operator()()

bool JTOOLS::JRange< double, std::less<double> >::operator() ( argument_type x) const
inlineinherited

Test whether value is inside range.

Parameters
xvalue
Returns
true if lower limit <= value <= upper limit; else false

Definition at line 336 of file JRange.hh.

337 {
338 return in_range(x);
339 }
bool in_range(argument_type x) const
Definition JRange.hh:323

◆ constrain()

double JTOOLS::JRange< double, std::less<double> >::constrain ( argument_type x) const
inlineinherited

Constrain value to range.


This method returns the original value if it is in this range, else lower limit if value < lower limit or upper limit if value > upper limit.

Parameters
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 350 of file JRange.hh.

351 {
352 if (compare(x, getLowerLimit())) { return getLowerLimit(); }
353 if (compare(getUpperLimit(), x)) { return getUpperLimit(); }
354
355 return x;
356 }

◆ mod()

double JTOOLS::JRange< double, std::less<double> >::mod ( argument_type x) const
inlineinherited

Modulo value with respect to range.


Parameters
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 365 of file JRange.hh.

366 {
367 if (compare(x, getLowerLimit()))
368 return x + getLength() * floor((getUpperLimit() - x) / getLength());
369 else if (compare(getUpperLimit(), x))
370 return x - getLength() * floor((x - getLowerLimit()) / getLength());
371 else
372 return x;
373 }
double getLength() const
Definition JRange.hh:289

◆ overlap()

bool JTOOLS::JRange< double, std::less<double> >::overlap ( const range_type & range) const
inlineinherited

Test overlap with given range.


Parameters
rangerange
Returns
true if there is a non-zero overlap; else false

Definition at line 382 of file JRange.hh.

383 {
384 return (!compare(range.getUpperLimit(), getLowerLimit()) &&
385 !compare(getUpperLimit(), range.getLowerLimit()));
386 }

◆ include()

range_type & JTOOLS::JRange< double, std::less<double> >::include ( argument_type x)
inlineinherited

Include given value to range.


The new lower limit is the minimim of the original lower limit and given value and
the new upper limit is the maximum of the original upper limit and given value;

Parameters
xvalue
Returns
range

Definition at line 397 of file JRange.hh.

398 {
399 if (compare(x, getLowerLimit())) { setLowerLimit(x); }
400 if (compare(getUpperLimit(), x)) { setUpperLimit(x); }
401
402 return *this;
403 }

◆ join()

range_type & JTOOLS::JRange< double, std::less<double> >::join ( const range_type & range)
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).

Parameters
rangerange

Definition at line 415 of file JRange.hh.

416 {
417 if (compare(getLowerLimit(), range.getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
418 if (compare(range.getUpperLimit(), getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
419
420 return *this;
421 }

◆ combine()

range_type & JTOOLS::JRange< double, std::less<double> >::combine ( const range_type & range)
inlineinherited

Combine ranges.


The new lower limit is the minimim of the two lower limits and
the new upper limit is the maximum of the two upper limits.
This operation results in an equal or larger range.

Parameters
rangerange

Definition at line 432 of file JRange.hh.

433 {
434 if (compare(range.getLowerLimit(), getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
435 if (compare(getUpperLimit(), range.getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
436
437 return *this;
438 }

◆ add() [1/2]

range_type & JTOOLS::JRange< double, std::less<double> >::add ( argument_type x)
inlineinherited

Add offset.

Parameters
xoffset

Definition at line 446 of file JRange.hh.

447 {
448 this->first += x;
449 this->second += x;
450
451 return *this;
452 }

◆ add() [2/2]

range_type & JTOOLS::JRange< double, std::less<double> >::add ( const range_type & range)
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.

Parameters
rangeoffset

Definition at line 476 of file JRange.hh.

477 {
478 this->first += range.getLowerLimit();
479 this->second += range.getUpperLimit();
480
481 return *this;
482 }

◆ sub() [1/2]

range_type & JTOOLS::JRange< double, std::less<double> >::sub ( argument_type x)
inlineinherited

Subtract offset.

Parameters
xoffset

Definition at line 460 of file JRange.hh.

461 {
462 this->first -= x;
463 this->second -= x;
464
465 return *this;
466 }

◆ sub() [2/2]

range_type & JTOOLS::JRange< double, std::less<double> >::sub ( const range_type & range)
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.

Parameters
rangeoffset

Definition at line 492 of file JRange.hh.

493 {
494 this->first -= range.getLowerLimit();
495 this->second -= range.getUpperLimit();
496
497 return *this;
498 }

◆ mul() [1/2]

range_type & JTOOLS::JRange< double, std::less<double> >::mul ( const double factor)
inlineinherited

Multiply range.

Parameters
factorfactor

Definition at line 506 of file JRange.hh.

507 {
508 this->first *= factor;
509 this->second *= factor;
510
511 return *this;
512 }

◆ mul() [2/2]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }

◆ div()

range_type & JTOOLS::JRange< double, std::less<double> >::div ( const double factor)
inlineinherited

Divide range.

Parameters
factorfactor

Definition at line 520 of file JRange.hh.

521 {
522 this->first /= factor;
523 this->second /= factor;
524
525 return *this;
526 }

◆ getMinimum()

static double JTOOLS::JRange< double, std::less<double> >::getMinimum ( )
inlinestaticinherited

Get minimum possible value.

Returns
minimum possible value

Definition at line 534 of file JRange.hh.

535 {
536 return JMATH::JLimits<T>::min();
537 }
float min()
Get minimum possible value.
Definition JLimits.hh:96

◆ getMaximum()

static double JTOOLS::JRange< double, std::less<double> >::getMaximum ( )
inlinestaticinherited

Get maximum possible value.

Returns
maximum possible value

Definition at line 545 of file JRange.hh.

546 {
547 return JMATH::JLimits<T>::max();
548 }
TTimeStamp max()
Get maximum possible value.

◆ DEFAULT_RANGE()

static JRange< double, std::less<double> > JTOOLS::JRange< double, std::less<double> >::DEFAULT_RANGE ( )
inlinestaticinherited

Default range.

This range corresponds to an unphysical range.

Definition at line 555 of file JRange.hh.

◆ getKey()

const key_type & JTOOLS::JPair< double, double >::getKey ( ) const
inlineinherited

Definition at line 123 of file JPair.hh.

123{ return this->first; }

◆ getValue() [1/2]

const mapped_type & JTOOLS::JPair< double, double >::getValue ( ) const
inlineinherited

Definition at line 124 of file JPair.hh.

124{ return this->second; }

◆ getValue() [2/2]

mapped_type & JTOOLS::JPair< double, double >::getValue ( )
inlineinherited

Definition at line 126 of file JPair.hh.

126{ return this->second; }

Member Data Documentation

◆ Xmax

double JTOOLS::JQuantiles::Xmax
protected

Definition at line 353 of file JQuantiles.hh.

◆ Ymax

double JTOOLS::JQuantiles::Ymax
protected

Definition at line 354 of file JQuantiles.hh.

◆ fwhm

double JTOOLS::JQuantiles::fwhm
protected

Definition at line 355 of file JQuantiles.hh.

◆ sum

double JTOOLS::JQuantiles::sum
protected

Definition at line 356 of file JQuantiles.hh.

◆ compare

std::less<double> JTOOLS::JRange< double, std::less<double> >::compare
inherited

Function object for comparisons.

Definition at line 565 of file JRange.hh.

◆ first

double JTOOLS::JPair< double, double >::first
inherited

Definition at line 128 of file JPair.hh.

◆ second

double JTOOLS::JPair< double, double >::second
inherited

Definition at line 129 of file JPair.hh.


The documentation for this class was generated from the following file: