Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvAffineChartTransformer 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 IlvAffineChartTransformer:
IlvChartCoordinateTransformer IlvCoordinateTransformer IlvValueInterface

Public Member Functions

 IlvAffineChartTransformer (IlDouble multCoeff, IlDouble constCoeff, IlUInt logBase=0)
 Constructor. More...
 
virtual void applyElementaryTransfo (IlDouble &val) const
 Applies the elementary transformation to a value. More...
 
virtual void applyInverseElementaryTransfo (IlDouble &val) const
 Applies the inverse of the elementary transformation to a value. More...
 
virtual IlBoolean condToApplyElementaryTransfo () const
 Indicates whether the elementary transformation can be applied. More...
 
virtual IlBoolean condToApplyInverseElementaryTransfo () const
 Indicates whether the inverse of the elementary transformation can be applied. More...
 
IlDouble getConstCoeff () const
 Returns the constant coefficient. More...
 
IlDouble getMultCoeff () const
 Returns the multiplicative coefficient. More...
 
void setConstCoeff (IlDouble d)
 Sets the constant coefficient. More...
 
void setMultCoeff (IlDouble d)
 Sets the multiplicative coefficient. More...
 
- Public Member Functions inherited from IlvChartCoordinateTransformer
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...
 
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvCoordinateTransformer
static IlvCoordinateTransformerLoad (IlvInputFile &file)
 Reads a coordinate transformer object from a file. More...
 
- Protected Member Functions inherited from IlvChartCoordinateTransformer
 IlvChartCoordinateTransformer (const IlvChartCoordinateTransformer &t)
 Constructor. More...
 
 IlvChartCoordinateTransformer (IlUInt logBase)
 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...
 

Detailed Description

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

Library: ilvcharts

This class is a subclass of IlvChartCoordinateTransformer with an affine transformation as the elementary transformation. This means that an affine transformation is applied to the coordinate, followed by a logarithmic transformation if the logarithmic base is greater than 1.

The affine transformation is defined as follows:

c_transformed = mult * c + const,

where c is the initial coordinate, mult is the multiplicative coefficient, const is the constant coefficient, and c_transformed is the coordinate transformed with the affine transformation.

See also
IlvChartCoordinateTransformer.

Constructor & Destructor Documentation

◆ IlvAffineChartTransformer()

IlvAffineChartTransformer::IlvAffineChartTransformer ( IlDouble  multCoeff,
IlDouble  constCoeff,
IlUInt  logBase = 0 
)

Constructor.

Initializes a new IlvAffineChartTransformer object.

Parameters
multCoeffThe multiplicative coefficient set for the affine transformation.
constCoeffThe constant coefficient set for the affine transformation.
logBaseThe logarithmic base set for the current object.

Member Function Documentation

◆ applyElementaryTransfo()

virtual void IlvAffineChartTransformer::applyElementaryTransfo ( IlDouble val) const
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 met.

The transformation applied is the following:

c_transformed = mult * c + const,

where c is the initial coordinate, mult is the multiplicative coefficient, const is the constant coefficient, and c_transformed is the coordinate transformed with the affine transformation.

Implements IlvChartCoordinateTransformer.

◆ applyInverseElementaryTransfo()

virtual void IlvAffineChartTransformer::applyInverseElementaryTransfo ( IlDouble val) const
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 met.

The inverse transformation applied is the following:

c = (c_tranformed - const) / mult,

where c_transformed is the transformed coordinate, mult the multiplicative coefficient, const the constant coefficient, and c is the inversely transformed coordinate (that is, the value before the affine transformation).

Implements IlvChartCoordinateTransformer.

◆ condToApplyElementaryTransfo()

virtual IlBoolean IlvAffineChartTransformer::condToApplyElementaryTransfo ( ) const
virtual

Indicates whether the elementary transformation can be applied.

Returns
IlTrue by default, since the elementary transformation is an affine transformation and, therefore, can always be applied.

Implements IlvChartCoordinateTransformer.

◆ condToApplyInverseElementaryTransfo()

virtual IlBoolean IlvAffineChartTransformer::condToApplyInverseElementaryTransfo ( ) const
virtual

Indicates whether the inverse of the elementary transformation can be applied.

Returns
IlTrue if the multiplicative coefficient is a value other than 0, and IlFalse otherwise.

Implements IlvChartCoordinateTransformer.

◆ getConstCoeff()

IlDouble IlvAffineChartTransformer::getConstCoeff ( ) const

Returns the constant coefficient.

Returns
The constant coefficient defined for the affine transformation.

◆ getMultCoeff()

IlDouble IlvAffineChartTransformer::getMultCoeff ( ) const

Returns the multiplicative coefficient.

Returns
The multiplicative coefficient defined for the affine transformation.

◆ setConstCoeff()

void IlvAffineChartTransformer::setConstCoeff ( IlDouble  d)

Sets the constant coefficient.

Parameters
dThe constant coefficient set for the affine transformation.

◆ setMultCoeff()

void IlvAffineChartTransformer::setMultCoeff ( IlDouble  d)

Sets the multiplicative coefficient.

Parameters
dThe multiplicative coefficient set for the affine transformation.
Note
The multiplicative coefficient must be a value other than 0, otherwise the inverse of the affine transformation is not defined.