Ocean
Ocean::Tracking::Solver3::RelativeThreshold Class Reference

Definition of a class allowing to define a relative threshold with lower and upper boundary for individual reference values. More...

Public Member Functions

 RelativeThreshold (const unsigned int lowerBoundary, const Scalar factor, const unsigned int upperBoundary)
 Creates a new threshold object. More...
 
unsigned int lowerBoundary () const
 Returns the lower boundary of this object. More...
 
Scalar factor () const
 Returns the factor of this object. More...
 
unsigned int upperBoundary () const
 Returns the upper boundary of this object. More...
 
unsigned int threshold (const unsigned int value) const
 Returns the relative threshold for a given reference value. More...
 
bool hasValidThreshold (const unsigned int value, unsigned int *threshold=nullptr) const
 Returns whether for a given reference value a valid relative threshold can be determined. More...
 
template<unsigned int tLowerBoundary>
bool hasValidThreshold (const unsigned int value, unsigned int *threshold=nullptr) const
 Returns whether for a given reference value a valid relative threshold can be determined. More...
 

Protected Attributes

unsigned int thresholdLowerBoundary
 The lower boundary of the relative threshold. More...
 
Scalar thresholdFactor
 The factor defining the relative threshold. More...
 
unsigned int thresholdUpperBoundary
 The upper boundary of the relative threshold. More...
 

Detailed Description

Definition of a class allowing to define a relative threshold with lower and upper boundary for individual reference values.

Constructor & Destructor Documentation

◆ RelativeThreshold()

Ocean::Tracking::Solver3::RelativeThreshold::RelativeThreshold ( const unsigned int  lowerBoundary,
const Scalar  factor,
const unsigned int  upperBoundary 
)
inline

Creates a new threshold object.

Parameters
lowerBoundaryThe lower boundary of the resulting threshold value
factorThe factor which will be applied to an external reference values to defined an individual threshold
upperBoundaryThe upper boundary of the resulting threshold value

Member Function Documentation

◆ factor()

Scalar Ocean::Tracking::Solver3::RelativeThreshold::factor ( ) const
inline

Returns the factor of this object.

Returns
Relative factor

◆ hasValidThreshold() [1/2]

bool Ocean::Tracking::Solver3::RelativeThreshold::hasValidThreshold ( const unsigned int  value,
unsigned int *  threshold = nullptr 
) const
inline

Returns whether for a given reference value a valid relative threshold can be determined.

Parameters
valueThe reference value which will be checked
thresholdOptional resulting relative threshold for the given reference value: min[minmax(lowerBoundary(), value * factor(), upperBoundary()), value]
Returns
True, if value >= lowerBoundary()

◆ hasValidThreshold() [2/2]

template<unsigned int tLowerBoundary>
bool Ocean::Tracking::Solver3::RelativeThreshold::hasValidThreshold ( const unsigned int  value,
unsigned int *  threshold = nullptr 
) const
inline

Returns whether for a given reference value a valid relative threshold can be determined.

Parameters
valueThe reference value which will be checked
thresholdOptional resulting relative threshold for the given reference value: min[minmax(max[lowerBoundary(), tLowerBoundary], value * factor(), upperBoundary()), value]
Returns
True, if value >= max(lowerBoundary(), tLowerBoundary)
Template Parameters
tLowerBoundaryAn explicit lower boundary which is checked in parallel to the internal lower boundary

◆ lowerBoundary()

unsigned int Ocean::Tracking::Solver3::RelativeThreshold::lowerBoundary ( ) const
inline

Returns the lower boundary of this object.

Returns
Lower boundary

◆ threshold()

unsigned int Ocean::Tracking::Solver3::RelativeThreshold::threshold ( const unsigned int  value) const
inline

Returns the relative threshold for a given reference value.

Parameters
valueThe reference value for which the individual threshold will be determined
Returns
The relative threshold: min[minmax(lowerBoundary(), value * factor(), upperBoundary()), value]

◆ upperBoundary()

unsigned int Ocean::Tracking::Solver3::RelativeThreshold::upperBoundary ( ) const
inline

Returns the upper boundary of this object.

Returns
Upper boundary

Field Documentation

◆ thresholdFactor

Scalar Ocean::Tracking::Solver3::RelativeThreshold::thresholdFactor
protected

The factor defining the relative threshold.

◆ thresholdLowerBoundary

unsigned int Ocean::Tracking::Solver3::RelativeThreshold::thresholdLowerBoundary
protected

The lower boundary of the relative threshold.

◆ thresholdUpperBoundary

unsigned int Ocean::Tracking::Solver3::RelativeThreshold::thresholdUpperBoundary
protected

The upper boundary of the relative threshold.


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