#include <LogRange.h>

Static Public Member Functions

static double map (double value, double thresh=-10)
 Map a value onto a logarithmic range. More...
 
static double unmap (double value)
 Map a value from the logarithmic range back again. More...
 
static void mapRange (double &min, double &max, double thresh=-10)
 Map a linear range onto a logarithmic range. More...
 
static bool shouldUseLogScale (std::vector< double > values)
 Estimate whether a set of values would be more properly shown using a logarithmic than a linear scale. More...
 

Detailed Description

Definition at line 22 of file LogRange.h.

Member Function Documentation

double LogRange::map ( double  value,
double  thresh = -10 
)
static

Map a value onto a logarithmic range.

This just means taking the base-10 log of the absolute value, or using the threshold value if the absolute value is zero.

Definition at line 64 of file LogRange.cpp.

double LogRange::unmap ( double  value)
static

Map a value from the logarithmic range back again.

This just means taking the value'th power of ten.

Definition at line 71 of file LogRange.cpp.

void LogRange::mapRange ( double &  min,
double &  max,
double  thresh = -10 
)
static

Map a linear range onto a logarithmic range.

min and max are passed as the extents of the linear range and returned as the extents of the logarithmic range. thresh is the minimum value for the log range, to be used if the linear range spans zero.

Definition at line 24 of file LogRange.cpp.

Referenced by ScaleTickIntervals::logarithmic().

bool LogRange::shouldUseLogScale ( std::vector< double >  values)
static

Estimate whether a set of values would be more properly shown using a logarithmic than a linear scale.

This is only ever going to be a rough guess.

Definition at line 93 of file LogRange.cpp.

References sd(), and SVDEBUG.

Referenced by EditableDenseThreeDimensionalModel::shouldUseLogValueScale(), and BasicCompressedDenseThreeDimensionalModel::shouldUseLogValueScale().


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