rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvChartCoordinateTransformer Class Reference

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 IlvAffineChartTransformer IlvSimpleChartTransformer

List of all members.

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.

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.

Warning:
[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::IlvChartCoordinateTransformer ( IlUInt  logBase  )  [protected]

Constructor.

Initializes a new IlvChartCoordinateTransformer object.

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

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

Parameters:
file The file used to initialize the current object.

Member Function Documentation

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

Applies the elementary transformation to a value.

Parameters:
val This parameter stores the value to transform and is also used to return the transformed value.
Warning:
[note] This method must be called only if the condition needed to apply the elementary transformation is verified.

Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.

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

Applies the inverse of the elementary transformation to a value.

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

Implemented in IlvSimpleChartTransformer, and IlvAffineChartTransformer.

void IlvChartCoordinateTransformer::applyInverseLogTransfo ( IlDouble val  )  const

Applies the inverse of the logarithmic transformation.

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

Warning:
[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.
void IlvChartCoordinateTransformer::applyLogTransfo ( IlDouble val  )  const

Applies the logarithmic transformation to a value.

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

Warning:
[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.
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 IlvSimpleChartTransformer, and IlvAffineChartTransformer.

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 IlvSimpleChartTransformer, and IlvAffineChartTransformer.

IlUInt IlvChartCoordinateTransformer::getLogBase (  )  const

Returns the logarithmic base.

Returns:
The logarithmic base defined for the current object.
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:
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.
Returns:
IlTrue if the inverse transformation has been successfully applied to all the points and IlFalse otherwise.
Warning:
[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.

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:
val This 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.

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:
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.
Returns:
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.

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

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:
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.
Returns:
IlTrue if all the data points have been successfully transformed and IlFalse otherwise.
Warning:
[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.

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:
val This 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.

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:
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.
Returns:
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.

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

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.

Parameters:
file The file where the attributes of the current object are written.

Reimplemented from IlvCoordinateTransformer.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.