A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ColorNormalizationLogarithmic Class Reference

#include <genesis/utils/tools/color/norm_logarithmic.hpp>

Inherits ColorNormalizationLinear.

Detailed Description

Color normalization for a logarithmic scale.

Definition at line 52 of file norm_logarithmic.hpp.

Public Member Functions

 ColorNormalizationLogarithmic ()
 Constructor that sets min == 1.0 and max == 100.0. More...
 
 ColorNormalizationLogarithmic (double min, double max)
 Constructor that sets min() and max() to the provided values. More...
 
 ColorNormalizationLogarithmic (std::vector< double > const &values)
 Constructor that sets min() and max() to the min and max of the provided values, and mid() to their midpoint. More...
 
template<class ForwardIterator >
 ColorNormalizationLogarithmic (ForwardIterator first, ForwardIterator last)
 Constructor that sets min() and max() to the min and max of the provided range, and mid() to their midpoint. More...
 
 ColorNormalizationLogarithmic (ColorNormalizationLogarithmic const &)=default
 
 ColorNormalizationLogarithmic (ColorNormalizationLogarithmic &&)=default
 
virtual ~ColorNormalizationLogarithmic ()=default
 
double base () const
 
ColorNormalizationLogarithmicbase (double value)
 
bool exponential_labels () const
 
ColorNormalizationLogarithmicexponential_labels (bool value)
 
virtual bool is_valid_ () const override
 Return whether the ranges are correct. More...
 
ColorNormalizationLogarithmicoperator= (ColorNormalizationLogarithmic const &)=default
 
ColorNormalizationLogarithmicoperator= (ColorNormalizationLogarithmic &&)=default
 
- Public Member Functions inherited from ColorNormalizationLinear
 ColorNormalizationLinear ()=default
 Constructor that sets min == 0.0 and max == 1.0. More...
 
 ColorNormalizationLinear (double min, double max)
 Constructor that sets min() and max() to the provided values. More...
 
 ColorNormalizationLinear (std::vector< double > const &values)
 Constructor that sets min() and max() to the min and max of the provided values. More...
 
template<class ForwardIterator >
 ColorNormalizationLinear (ForwardIterator first, ForwardIterator last)
 Constructor that sets min() and max() to the min and max of the provided range. More...
 
 ColorNormalizationLinear (ColorNormalizationLinear const &)=default
 
 ColorNormalizationLinear (ColorNormalizationLinear &&)=default
 
virtual ~ColorNormalizationLinear ()=default
 
ColorNormalizationLinearautoscale (std::vector< double > const &values)
 
template<class ForwardIterator >
ColorNormalizationLinearautoscale (ForwardIterator first, ForwardIterator last)
 Set the min and max of the Palette so that they reflect the min and max valid values that are found in the range [ first, last ). More...
 
ColorNormalizationLinearautoscale_max (std::vector< double > const &values)
 
template<class ForwardIterator >
ColorNormalizationLinearautoscale_max (ForwardIterator first, ForwardIterator last)
 Same as autoscale(), but only updates the max_value(). More...
 
ColorNormalizationLinearautoscale_min (std::vector< double > const &values)
 
template<class ForwardIterator >
ColorNormalizationLinearautoscale_min (ForwardIterator first, ForwardIterator last)
 Same as autoscale(), but only updates the min_value(). More...
 
double max_value () const
 Minimum value, that is, where to end the color scale. More...
 
ColorNormalizationLinearmax_value (double value)
 
double min_value () const
 Minimum value, that is, where to begin the color scale. More...
 
ColorNormalizationLinearmin_value (double value)
 
ColorNormalizationLinearoperator= (ColorNormalizationLinear const &)=default
 
ColorNormalizationLinearoperator= (ColorNormalizationLinear &&)=default
 
ColorNormalizationLinearscale (double min, double max)
 
- Public Member Functions inherited from ColorNormalization
 ColorNormalization ()=default
 
 ColorNormalization (ColorNormalization const &)=default
 
 ColorNormalization (ColorNormalization &&)=default
 
virtual ~ColorNormalization ()=default
 
bool is_valid () const
 Return whether ranges and other values are correct. More...
 
double mask_value () const
 Mask value that identifies invalid values. More...
 
ColorNormalizationmask_value (double value)
 Mask value that identifies invalid values. More...
 
double operator() (double value) const
 Normalize a value into range [ 0.0, 1.0 ]. More...
 
std::vector< double > operator() (std::vector< double > const &values) const
 Return the normalized values for a vector of values. More...
 
template<class ForwardIterator >
std::vector< double > operator() (ForwardIterator first, ForwardIterator last) const
 Return the normalized values for a range of values. More...
 
ColorNormalizationoperator= (ColorNormalization const &)=default
 
ColorNormalizationoperator= (ColorNormalization &&)=default
 

Protected Member Functions

virtual void is_valid_or_throw_ () const override
 Throw if the ranges are incorrect. More...
 
virtual double normalize_ (double value) const override
 Normalization function. More...
 
- Protected Member Functions inherited from ColorNormalizationLinear
virtual void update_hook_ (double min, double max)
 Called whenever the min and max are set automatically. Gives derived classes a chance to update their values. More...
 

Constructor & Destructor Documentation

Constructor that sets min == 1.0 and max == 100.0.

Definition at line 64 of file norm_logarithmic.hpp.

ColorNormalizationLogarithmic ( double  min,
double  max 
)
inline

Constructor that sets min() and max() to the provided values.

Definition at line 71 of file norm_logarithmic.hpp.

ColorNormalizationLogarithmic ( std::vector< double > const &  values)
inline

Constructor that sets min() and max() to the min and max of the provided values, and mid() to their midpoint.

Definition at line 79 of file norm_logarithmic.hpp.

ColorNormalizationLogarithmic ( ForwardIterator  first,
ForwardIterator  last 
)
inline

Constructor that sets min() and max() to the min and max of the provided range, and mid() to their midpoint.

Definition at line 89 of file norm_logarithmic.hpp.

virtual ~ColorNormalizationLogarithmic ( )
virtualdefault

Member Function Documentation

double base ( ) const
inline

Definition at line 106 of file norm_logarithmic.hpp.

ColorNormalizationLogarithmic& base ( double  value)
inline

Definition at line 111 of file norm_logarithmic.hpp.

bool exponential_labels ( ) const
inline

Definition at line 117 of file norm_logarithmic.hpp.

ColorNormalizationLogarithmic& exponential_labels ( bool  value)
inline

Definition at line 122 of file norm_logarithmic.hpp.

virtual bool is_valid_ ( ) const
inlineoverridevirtual

Return whether the ranges are correct.

Reimplemented from ColorNormalizationLinear.

Definition at line 135 of file norm_logarithmic.hpp.

virtual void is_valid_or_throw_ ( ) const
inlineoverrideprotectedvirtual

Throw if the ranges are incorrect.

Reimplemented from ColorNormalizationLinear.

Definition at line 145 of file norm_logarithmic.hpp.

virtual double normalize_ ( double  value) const
inlineoverrideprotectedvirtual

Normalization function.

Return a value in range [ 0.0, 1.0 ]. Derived classes can override this to provide their specific normalization.

Reimplemented from ColorNormalizationLinear.

Definition at line 155 of file norm_logarithmic.hpp.


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