My Project
Métodos públicos | Métodos públicos estáticos | Atributos públicos | Atributos públicos estáticos | Lista de todos los miembros
Referencia de la Clase QCPRange

Represents the range an axis is encompassing. Más...

Métodos públicos

 QCPRange ()
 
 QCPRange (double lower, double upper)
 
double size () const
 
double center () const
 
void normalize ()
 
void expand (const QCPRange &otherRange)
 
QCPRange expanded (const QCPRange &otherRange) const
 
QCPRange sanitizedForLogScale () const
 
QCPRange sanitizedForLinScale () const
 
bool contains (double value) const
 

Métodos públicos estáticos

static bool validRange (double lower, double upper)
 
static bool validRange (const QCPRange &range)
 

Atributos públicos

double lower
 
double upper
 

Atributos públicos estáticos

static const double minRange = 1e-280
 
static const double maxRange = 1e250
 

Descripción detallada

Represents the range an axis is encompassing.

contains a lower and upper double value and provides convenience input, output and modification functions.

Ver también
QCPAxis::setRange

Documentación del constructor y destructor

QCPRange::QCPRange ( )

Constructs a range with lower and upper set to zero.

QCPRange::QCPRange ( double  lower,
double  upper 
)

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Constructs a range with the specified lower and upper values.

Documentación de las funciones miembro

double QCPRange::center ( ) const

Returns the center of the range, i.e. (upper+lower)*0.5

bool QCPRange::contains ( double  value) const

Returns true when value lies within or exactly on the borders of the range.

void QCPRange::expand ( const QCPRange otherRange)

Expands this range such that otherRange is contained in the new range. It is assumed that both this range and otherRange are normalized (see normalize).

If otherRange is already inside the current range, this function does nothing.

Ver también
expanded
QCPRange QCPRange::expanded ( const QCPRange otherRange) const

Returns an expanded range that contains this and otherRange. It is assumed that both this range and otherRange are normalized (see normalize).

Ver también
expand
void QCPRange::normalize ( )

Makes sure lower is numerically smaller than upper. If this is not the case, the values are swapped.

QCPRange QCPRange::sanitizedForLinScale ( ) const

Returns a sanitized version of the range. Sanitized means for linear scales, that lower will always be numerically smaller (or equal) to upper.

QCPRange QCPRange::sanitizedForLogScale ( ) const

Returns a sanitized version of the range. Sanitized means for logarithmic scales, that the range won't span the positive and negative sign domain, i.e. contain zero. Further lower will always be numerically smaller (or equal) to upper.

If the original range does span positive and negative sign domains or contains zero, the returned range will try to approximate the original range as good as possible. If the positive interval of the original range is wider than the negative interval, the returned range will only contain the positive interval, with lower bound set to rangeFac or rangeFac *upper, whichever is closer to zero. Same procedure is used if the negative interval is wider than the positive interval, this time by changing the upper bound.

double QCPRange::size ( ) const

Returns the size of the range, i.e. upper-lower

bool QCPRange::validRange ( double  lower,
double  upper 
)
static

Checks, whether the specified range is within valid bounds, which are defined as QCPRange::maxRange and QCPRange::minRange. A valid range means:

  • range bounds within -maxRange and maxRange
  • range size above minRange
  • range size below maxRange
bool QCPRange::validRange ( const QCPRange range)
static

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Checks, whether the specified range is within valid bounds, which are defined as QCPRange::maxRange and QCPRange::minRange. A valid range means:

  • range bounds within -maxRange and maxRange
  • range size above minRange
  • range size below maxRange

Documentación de los datos miembro

const double QCPRange::maxRange = 1e250
static

Maximum values (negative and positive) the range will accept in range-changing functions. Larger absolute values would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a maximum magnitude of roughly 1e308. Since the number of planck-volumes in the entire visible universe is only ~1e183, this should be enough.

Ver también
validRange, minRange
const double QCPRange::minRange = 1e-280
static

Minimum range size (upper - lower) the range changing functions will accept. Smaller intervals would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a minimum magnitude of roughly 1e-308.

Ver también
validRange, maxRange

La documentación para esta clase fue generada a partir de los siguientes ficheros: