A library for working with phylogenetic and population genetic data.
v0.32.0
ColorNormalizationLogarithmic Class Reference

#include <genesis/utils/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 (ColorNormalizationLogarithmic &&)=default
 
 ColorNormalizationLogarithmic (ColorNormalizationLogarithmic const &)=default
 
 ColorNormalizationLogarithmic (double min, double max)
 Constructor that sets min() and max() to the provided values. 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 (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...
 
virtual ~ColorNormalizationLogarithmic () override=default
 
double base () const
 
ColorNormalizationLogarithmicbase (double value)
 
bool exponential_labels () const
 
ColorNormalizationLogarithmicexponential_labels (bool value)
 
ColorNormalizationLogarithmicoperator= (ColorNormalizationLogarithmic &&)=default
 
ColorNormalizationLogarithmicoperator= (ColorNormalizationLogarithmic const &)=default
 
- Public Member Functions inherited from ColorNormalizationLinear
 ColorNormalizationLinear ()=default
 Constructor that sets min == 0.0 and max == 1.0. More...
 
 ColorNormalizationLinear (ColorNormalizationLinear &&)=default
 
 ColorNormalizationLinear (ColorNormalizationLinear const &)=default
 
 ColorNormalizationLinear (double min, double max)
 Constructor that sets min() and max() to 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 (std::vector< double > const &values)
 Constructor that sets min() and max() to the min and max of the provided values. More...
 
virtual ~ColorNormalizationLinear () override=default
 
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 (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_max (std::vector< double > const &values)
 
template<class ForwardIterator >
ColorNormalizationLinearautoscale_min (ForwardIterator first, ForwardIterator last)
 Same as autoscale(), but only updates the min_value(). More...
 
ColorNormalizationLinearautoscale_min (std::vector< double > const &values)
 
double max_value () const
 Minimum value, that is, where to end the color scale. More...
 
ColorNormalizationLinearmax_value (double value)
 Minimum value, that is, where to end the color scale. More...
 
double min_value () const
 Minimum value, that is, where to begin the color scale. More...
 
ColorNormalizationLinearmin_value (double value)
 Minimum value, that is, where to begin the color scale. More...
 
ColorNormalizationLinearoperator= (ColorNormalizationLinear &&)=default
 
ColorNormalizationLinearoperator= (ColorNormalizationLinear const &)=default
 
ColorNormalizationLinearscale (double min, double max)
 
- Public Member Functions inherited from ColorNormalization
 ColorNormalization ()=default
 
 ColorNormalization (ColorNormalization &&)=default
 
 ColorNormalization (ColorNormalization const &)=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...
 
template<class ForwardIterator >
std::vector< double > operator() (ForwardIterator first, ForwardIterator last) const
 Return the normalized values for a range of values. More...
 
std::vector< double > operator() (std::vector< double > const &values) const
 Return the normalized values for a vector of values. More...
 
ColorNormalizationoperator= (ColorNormalization &&)=default
 
ColorNormalizationoperator= (ColorNormalization const &)=default
 

Protected Member Functions

virtual bool is_valid_ () const override
 Return whether the ranges are correct. More...
 
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
template<class ForwardIterator >
ColorNormalizationLinearautoscale_ (ForwardIterator first, ForwardIterator last, bool set_min, bool set_max)
 
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

◆ ColorNormalizationLogarithmic() [1/6]

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

Definition at line 64 of file norm_logarithmic.hpp.

◆ ColorNormalizationLogarithmic() [2/6]

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() [3/6]

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

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() [4/6]

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.

◆ ~ColorNormalizationLogarithmic()

virtual ~ColorNormalizationLogarithmic ( )
overridevirtualdefault

◆ ColorNormalizationLogarithmic() [5/6]

◆ ColorNormalizationLogarithmic() [6/6]

Member Function Documentation

◆ base() [1/2]

double base ( ) const
inline

Definition at line 106 of file norm_logarithmic.hpp.

◆ base() [2/2]

ColorNormalizationLogarithmic& base ( double  value)
inline

Definition at line 111 of file norm_logarithmic.hpp.

◆ exponential_labels() [1/2]

bool exponential_labels ( ) const
inline

Definition at line 117 of file norm_logarithmic.hpp.

◆ exponential_labels() [2/2]

ColorNormalizationLogarithmic& exponential_labels ( bool  value)
inline

Definition at line 122 of file norm_logarithmic.hpp.

◆ is_valid_()

virtual bool is_valid_ ( ) const
inlineoverrideprotectedvirtual

Return whether the ranges are correct.

Reimplemented from ColorNormalizationLinear.

Definition at line 137 of file norm_logarithmic.hpp.

◆ is_valid_or_throw_()

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.

◆ normalize_()

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.

◆ operator=() [1/2]

◆ operator=() [2/2]


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