Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvChartCoordinateTransformer Class Referenceabstract

Class defining a transformation made of a logarithmic transformation to be applied to a coordinate. More...

#include <ilviews/charts/common.h>

Inheritance diagram for IlvChartCoordinateTransformer:
IlvCoordinateTransformer IlvValueInterface IlvAffineChartTransformer IlvSimpleChartTransformer

Public Member Functions

virtual void applyElementaryTransfo (IlDouble &val) const =0
 Applies the elementary transformation to a value. More...
 
virtual void applyInverseElementaryTransfo (IlDouble &val) const =0
 Applies the inverse of the elementary transformation to a value. More...
 
void applyInverseLogTransfo (IlDouble &val) const
 Applies the inverse of the logarithmic transformation. More...
 
void applyLogTransfo (IlDouble &val) const
 Applies the logarithmic transformation to a value. More...
 
virtual IlBoolean condToApplyElementaryTransfo () const =0
 Indicates whether the condition to apply the elementary transformation is verified. More...
 
virtual IlBoolean condToApplyInverseElementaryTransfo () const =0
 Indicates whether the condition to apply the inverse of the elementary transformation is verified. More...
 
IlUInt getLogBase () const
 Returns the logarithmic base. More...
 
virtual IlBoolean inverseTransformPoints (IlUInt pointsCount, IlvDoublePoint *points) const
 Applies the inverse transformation to points. More...
 
virtual IlBoolean inverseTransformValue (IlDouble &val) const
 Applies the inverse transformation to a value. More...
 
virtual IlBoolean inverseTransformValues (IlUInt valuesCount, IlDouble *values) const
 Applies the inverse transformation to values. More...
 
void setLogBase (IlUInt base)
 Sets the logarithmic base. More...
 
virtual IlBoolean transformPoints (IlUInt pointsCount, IlvDoublePoint *points) const
 Applies a transformation to data points. More...
 
virtual IlBoolean transformValue (IlDouble &val) const
 Applies a transformation to a data value. More...
 
virtual IlBoolean transformValues (IlUInt valuesCount, IlDouble *values) const
 Applies a transformation to data values. More...
 
virtual IlBoolean validateInterval (IlvCoordInterval &interval) const
 Validates an interval. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 
- Public Member Functions inherited from IlvCoordinateTransformer
virtual ~IlvCoordinateTransformer ()
 Destructor. More...
 
virtual IlvCoordinateTransformercopy () const =0
 Virtual copy constructor. More...
 
const IlvCoordinateInfogetOwner () const
 Returns the coordinate information that owns the current object. More...
 
virtual IlBoolean inverseTransformInterval (IlvCoordInterval &itvl) const
 Applies the inverse transformation to an interval. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
virtual IlBoolean transformInterval (IlvCoordInterval &itvl) const
 Applies a transformation to an interval. More...
 

Protected Member Functions

 IlvChartCoordinateTransformer (IlUInt logBase)
 Constructor. More...
 
 IlvChartCoordinateTransformer (const IlvChartCoordinateTransformer &t)
 Constructor. More...
 
 IlvChartCoordinateTransformer (IlvInputFile &file)
 Constructor. More...
 
- Protected Member Functions inherited from IlvCoordinateTransformer
 IlvCoordinateTransformer ()
 Constructor. More...
 
 IlvCoordinateTransformer (const IlvCoordinateTransformer &transfo)
 Constructor. More...
 
 IlvCoordinateTransformer (IlvInputFile &file)
 Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvCoordinateTransformer
static IlvCoordinateTransformerLoad (IlvInputFile &file)
 Reads a coordinate transformer object from a file. More...
 

Detailed Description

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.

Note
IlvChartCoordinateTransformer is an abstract class. Its constructors are defined as protected since it is not possible to create an instance of this class directly.
See also
IlvCoordinateTransformer, IlvSimpleChartTransformer, IlvAffineChartTransformer, IlvDoublePoint.

Constructor & Destructor Documentation

§ IlvChartCoordinateTransformer() [1/3]

IlvChartCoordinateTransformer::IlvChartCoordinateTransformer ( IlUInt  logBase)
protected

Constructor.

Initializes a new IlvChartCoordinateTransformer object.

Parameters
logBaseThe logarithmic base set for the current object.

§ IlvChartCoordinateTransformer() [2/3]

IlvChartCoordinateTransformer::IlvChartCoordinateTransformer ( const IlvChartCoordinateTransformer t)
protected

Constructor.

Initializes a new IlvChartCoordinateTransformer object which is a copy of transfo.

Parameters
tThe object used to initialize the current one.

§ IlvChartCoordinateTransformer() [3/3]

IlvChartCoordinateTransformer::IlvChartCoordinateTransformer ( IlvInputFile file)
protected

Constructor.

Initializes a new IlvChartCoordinateTransformer object from the description read in the input file named file.

Parameters
fileThe file used to initialize the current object.

Member Function Documentation

§ applyElementaryTransfo()

virtual void IlvChartCoordinateTransformer::applyElementaryTransfo ( IlDouble val) const
pure virtual

Applies the elementary transformation to a value.

Parameters
valThis parameter stores the value to transform and is also used to return the transformed value.
Note
This method must be called only if the condition needed to apply the elementary transformation is verified.

Implemented in IlvAffineChartTransformer, and IlvSimpleChartTransformer.

§ applyInverseElementaryTransfo()

virtual void IlvChartCoordinateTransformer::applyInverseElementaryTransfo ( IlDouble val) const
pure virtual

Applies the inverse of the elementary transformation to a value.

Parameters
valThis parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed.
Note
This method must be called only if the condition needed to apply the inverse of the elementary transformation is verified.

Implemented in IlvAffineChartTransformer, and IlvSimpleChartTransformer.

§ applyInverseLogTransfo()

void IlvChartCoordinateTransformer::applyInverseLogTransfo ( IlDouble val) const

Applies the inverse of the logarithmic transformation.

Parameters
valThis 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).

Note
This method must be called only if the condition needed to apply the inverse of the logarithmic transformation is verified, that is, if the logarithmic base is greater than 1.

§ applyLogTransfo()

void IlvChartCoordinateTransformer::applyLogTransfo ( IlDouble val) const

Applies the logarithmic transformation to a value.

Parameters
valThis 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.

Note
This method must be called only if the condition needed to apply the logarithmic transformation is verified, that is, if the logarithmic base is greater than 1.

§ condToApplyElementaryTransfo()

virtual IlBoolean IlvChartCoordinateTransformer::condToApplyElementaryTransfo ( ) const
pure virtual

Indicates whether the condition to apply the elementary transformation is verified.

Returns
IlTrue if the condition needed to apply the elementary transformation is verified and IlFalse otherwise.

Implemented in IlvAffineChartTransformer, and IlvSimpleChartTransformer.

§ condToApplyInverseElementaryTransfo()

virtual IlBoolean IlvChartCoordinateTransformer::condToApplyInverseElementaryTransfo ( ) const
pure virtual

Indicates whether the condition to apply the inverse of the elementary transformation is verified.

Returns
IlTrue if the condition needed to apply the inverse of the elementary transformation is verified and IlFalse otherwise.

Implemented in IlvAffineChartTransformer, and IlvSimpleChartTransformer.

§ getLogBase()

IlUInt IlvChartCoordinateTransformer::getLogBase ( ) const

Returns the logarithmic base.

Returns
The logarithmic base defined for the current object.

§ inverseTransformPoints()

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.

Parameters
pointsCountThe number of points to which the inverse transformation is applied.
pointsThis parameter stores the points to transform inversely and is also used to return the points once they have been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied to all the points and IlFalse otherwise.
Note
The inverse transformation is applied only to one coordinate of the points, since the transformation is defined for one coordinate (x, y, theta, or rho) represented by a given scale.

Reimplemented from IlvCoordinateTransformer.

§ inverseTransformValue()

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.

Parameters
valThis parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied to the value and IlFalse otherwise.

Implements IlvCoordinateTransformer.

§ inverseTransformValues()

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.

Parameters
valuesCountThe number of values to which the inverse transformation is applied.
valuesThis parameter stores the values to transform inversely and is also used to return the values once they have been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied to all the values and IlFalse otherwise.

Reimplemented from IlvCoordinateTransformer.

§ setLogBase()

void IlvChartCoordinateTransformer::setLogBase ( IlUInt  base)

Sets the logarithmic base.

Parameters
baseThe 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 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.

§ transformPoints()

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.

Parameters
pointsCountThe number of points to which the transformation is applied.
pointsThis parameter stores the points to transform and is also used to return the transformed points.
Returns
IlTrue if all the data points have been successfully transformed and IlFalse otherwise.
Note
The transformation is applied only to one coordinate of the points since the transformation is defined for one coordinate (x, y, theta, or rho) represented by a given scale.

Reimplemented from IlvCoordinateTransformer.

§ transformValue()

virtual IlBoolean IlvChartCoordinateTransformer::transformValue ( IlDouble val) const
virtual

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.

Parameters
valThis parameter stores the value to transform and is also used to return the transformed value.
Returns
IlTrue if the data value has been successfully transformed and IlFalse otherwise.

Implements IlvCoordinateTransformer.

§ transformValues()

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.

Parameters
valuesCountThe number of values to which the transformation is applied.
valuesThis parameter stores the values to transform and is also used to return the transformed values.
Returns
IlTrue if the all the data values have been successfully transformed and IlFalse otherwise.

Reimplemented from IlvCoordinateTransformer.

§ validateInterval()

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.

Parameters
intervalThe interval to validate.
Returns
A Boolean value indicating whether the interval has been modified.

Reimplemented from IlvCoordinateTransformer.

§ write()

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.

Parameters
fileThe file where the attributes of the current object are written.

Reimplemented from IlvCoordinateTransformer.


© Copyright 2018, 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.