Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class defining a transformation made of a logarithmic transformation to be applied to a coordinate. More...
#include <ilviews/charts/common.h>
Public Member Functions | |
virtual void | applyElementaryTransfo (IlDouble &val) const =0 |
Applies the elementary transformation to a value. | |
virtual void | applyInverseElementaryTransfo (IlDouble &val) const =0 |
Applies the inverse of the elementary transformation to a value. | |
void | applyInverseLogTransfo (IlDouble &val) const |
Applies the inverse of the logarithmic transformation. | |
void | applyLogTransfo (IlDouble &val) const |
Applies the logarithmic transformation to a value. | |
virtual IlBoolean | condToApplyElementaryTransfo () const =0 |
Indicates whether the condition to apply the elementary transformation is verified. | |
virtual IlBoolean | condToApplyInverseElementaryTransfo () const =0 |
Indicates whether the condition to apply the inverse of the elementary transformation is verified. | |
IlUInt | getLogBase () const |
Returns the logarithmic base. | |
virtual IlBoolean | inverseTransformPoints (IlUInt pointsCount, IlvDoublePoint *points) const |
Applies the inverse transformation to points. | |
virtual IlBoolean | inverseTransformValue (IlDouble &val) const |
Applies the inverse transformation to a value. | |
virtual IlBoolean | inverseTransformValues (IlUInt valuesCount, IlDouble *values) const |
Applies the inverse transformation to values. | |
void | setLogBase (IlUInt base) |
Sets the logarithmic base. | |
virtual IlBoolean | transformPoints (IlUInt pointsCount, IlvDoublePoint *points) const |
Applies a transformation to data points. | |
virtual IlBoolean | transformValue (IlDouble &val) const |
Applies a transformation to a data value. | |
virtual IlBoolean | transformValues (IlUInt valuesCount, IlDouble *values) const |
Applies a transformation to data values. | |
virtual IlBoolean | validateInterval (IlvCoordInterval &interval) const |
Validates an interval. | |
virtual void | write (IlvOutputFile &file) const |
Writes the attributes of the current object in a file. | |
Protected Member Functions | |
IlvChartCoordinateTransformer (IlvInputFile &file) | |
Constructor. | |
IlvChartCoordinateTransformer (const IlvChartCoordinateTransformer &t) | |
Constructor. | |
IlvChartCoordinateTransformer (IlUInt logBase) | |
Constructor. |
Class defining a transformation made of a logarithmic transformation to be applied to a coordinate.
Library: ilvcharts
This is an abstract subclass of IlvCoordinateTransformer
that allows you to define a transformation to apply to a given data coordinate (x, y, theta, or rho). This transformation is composed of an elementary transformation, possibly followed by a logarithmic transformation.
The applied logarithmic transformation depends on the defined logarithmic base. If the logarithmic base is equal to 0
or 1
, no logarithmic transformation is applied. Otherwise, the following transformation is applied:
c_transformed = log(c) / log(base),
where c
is the initial coordinate, base
is the logarithmic base, log
is the natural logarithm, and c_transformed
is the coordinate transformed using the logarithmic transformation.
IlvChartCoordinateTransformer
is an abstract class. Its constructors are defined as protected since it is not possible to create an instance of this class directly.IlvCoordinateTransformer
, IlvSimpleChartTransformer
, IlvAffineChartTransformer
, IlvDoublePoint
. IlvChartCoordinateTransformer::IlvChartCoordinateTransformer | ( | IlUInt | logBase | ) | [protected] |
Constructor.
Initializes a new IlvChartCoordinateTransformer
object.
logBase | The logarithmic base set for the current object. |
IlvChartCoordinateTransformer::IlvChartCoordinateTransformer | ( | const IlvChartCoordinateTransformer & | t | ) | [protected] |
Constructor.
Initializes a new IlvChartCoordinateTransformer
object which is a copy of transfo.
t | The object used to initialize the current one. |
IlvChartCoordinateTransformer::IlvChartCoordinateTransformer | ( | IlvInputFile & | file | ) | [protected] |
Constructor.
Initializes a new IlvChartCoordinateTransformer
object from the description read in the input file named file.
file | The file used to initialize the current object. |
virtual void IlvChartCoordinateTransformer::applyElementaryTransfo | ( | IlDouble & | val | ) | const [pure virtual] |
Applies the elementary transformation to a value.
val | This parameter stores the value to transform and is also used to return the transformed value. |
Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.
virtual void IlvChartCoordinateTransformer::applyInverseElementaryTransfo | ( | IlDouble & | val | ) | const [pure virtual] |
Applies the inverse of the elementary transformation to a value.
val | This parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed. |
Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.
void IlvChartCoordinateTransformer::applyInverseLogTransfo | ( | IlDouble & | val | ) | const |
Applies the inverse of the logarithmic transformation.
val | This parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed. |
The applied inverse transformation is the following:
c = exp(c_transformed * log(base)),
where c_transformed
is the transformed coordinate, base
is the logarithmic base, log
is the natural logarithm, exp
the exponential function, and c
is the inversely transformed coordinate (that is, the value before the logarithmic transformation).
1
. void IlvChartCoordinateTransformer::applyLogTransfo | ( | IlDouble & | val | ) | const |
Applies the logarithmic transformation to a value.
val | This parameter stores the value to transform and is also used to return the transformed value. |
The applied transformation is the following:
c_transformed = log(c) / log(base),
where c
is the initial coordinate, base
is the logarithmic base, log
is the natural logarithm, and c_transformed
is the coordinate transformed using the logarithmic transformation.
1
. virtual IlBoolean IlvChartCoordinateTransformer::condToApplyElementaryTransfo | ( | ) | const [pure virtual] |
Indicates whether the condition to apply the elementary transformation is verified.
IlTrue
if the condition needed to apply the elementary transformation is verified and IlFalse
otherwise. Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.
virtual IlBoolean IlvChartCoordinateTransformer::condToApplyInverseElementaryTransfo | ( | ) | const [pure virtual] |
Indicates whether the condition to apply the inverse of the elementary transformation is verified.
IlTrue
if the condition needed to apply the inverse of the elementary transformation is verified and IlFalse
otherwise. Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.
IlUInt IlvChartCoordinateTransformer::getLogBase | ( | ) | const |
Returns the logarithmic base.
virtual IlBoolean IlvChartCoordinateTransformer::inverseTransformPoints | ( | IlUInt | pointsCount, | |
IlvDoublePoint * | points | |||
) | const [virtual] |
Applies the inverse transformation to points.
The inverse of the logarithmic transformation is applied first if the logarithmic base is greater than 1
, followed by the inverse of the elementary transformation.
pointsCount | The number of points to which the inverse transformation is applied. | |
points | This parameter stores the points to transform inversely and is also used to return the points once they have been inversely transformed. |
IlTrue
if the inverse transformation has been successfully applied to all the points and IlFalse
otherwise.Reimplemented from IlvCoordinateTransformer.
virtual IlBoolean IlvChartCoordinateTransformer::inverseTransformValue | ( | IlDouble & | val | ) | const [virtual] |
Applies the inverse transformation to a value.
The inverse of the logarithmic transformation is applied first if the logarithmic base is greater than 1
, followed by the inverse of the elementary transformation.
val | This parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed. |
IlTrue
if the inverse transformation has been successfully applied to the value and IlFalse
otherwise. Implements IlvCoordinateTransformer.
virtual IlBoolean IlvChartCoordinateTransformer::inverseTransformValues | ( | IlUInt | valuesCount, | |
IlDouble * | values | |||
) | const [virtual] |
Applies the inverse transformation to values.
The inverse of the logarithmic transformation is applied first if the logarithmic base is greater than 1
, followed by the inverse of the elementary transformation.
valuesCount | The number of values to which the inverse transformation is applied. | |
values | This parameter stores the values to transform inversely and is also used to return the values once they have been inversely transformed. |
IlTrue
if the inverse transformation has been successfully applied to all the values and IlFalse
otherwise. Reimplemented from IlvCoordinateTransformer.
void IlvChartCoordinateTransformer::setLogBase | ( | IlUInt | base | ) |
Sets the logarithmic base.
base | The new logarithmic base. If base is equal to 0 or 1 , no logarithmic transformation will be applied. Otherwise, the following transformation is applied:
c_transformed = log(c) / log(base), where |
virtual IlBoolean IlvChartCoordinateTransformer::transformPoints | ( | IlUInt | pointsCount, | |
IlvDoublePoint * | points | |||
) | const [virtual] |
Applies a transformation to data points.
The elementary transformation is applied first, followed by the logarithmic transformation if the logarithmic base is greater than 1
.
pointsCount | The number of points to which the transformation is applied. | |
points | This parameter stores the points to transform and is also used to return the transformed points. |
IlTrue
if all the data points have been successfully transformed and IlFalse
otherwise.Reimplemented from IlvCoordinateTransformer.
Applies a transformation to a data value.
The elementary transformation is applied first, followed by the logarithmic transformation if the logarithmic base is greater than 1
.
val | This parameter stores the value to transform and is also used to return the transformed value. |
IlTrue
if the data value has been successfully transformed and IlFalse
otherwise. Implements IlvCoordinateTransformer.
virtual IlBoolean IlvChartCoordinateTransformer::transformValues | ( | IlUInt | valuesCount, | |
IlDouble * | values | |||
) | const [virtual] |
Applies a transformation to data values.
The elementary transformation is applied first, followed by the logarithmic transformation if the logarithmic base is greater than 1
.
valuesCount | The number of values to which the transformation is applied. | |
values | This parameter stores the values to transform and is also used to return the transformed values. |
IlTrue
if the all the data values have been successfully transformed and IlFalse
otherwise. Reimplemented from IlvCoordinateTransformer.
virtual IlBoolean IlvChartCoordinateTransformer::validateInterval | ( | IlvCoordInterval & | interval | ) | const [virtual] |
Validates an interval.
Changes the interval interval so that it becomes consistent with the definition domain of the transformer. The default implementation does nothing and returns IlFalse
, which indicates that the interval has not been modified.
interval | The interval to validate. |
Reimplemented from IlvCoordinateTransformer.
virtual void IlvChartCoordinateTransformer::write | ( | IlvOutputFile & | file | ) | const [virtual] |
Writes the attributes of the current object in a file.
Called by the IlvCoordinateTransformer::save
method. This method can be overloaded in subclasses that define new attributes. The information written by the write
method is read by the IO constructor, which takes an IlvInputFile
as its only argument. Both this method and the IO constructor can be automatically declared by using the DeclareCoordinateTransformerTypeInfo
macro within the class declaration.
file | The file where the attributes of the current object are written. |
Reimplemented from IlvCoordinateTransformer.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.