rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvAffineChartTransformer (IlDouble multCoeff, IlDouble constCoeff, IlUInt logBase=0)
 Constructor.
virtual void applyElementaryTransfo (IlDouble &val) const
 Applies the elementary transformation to a value.
virtual void applyInverseElementaryTransfo (IlDouble &val) const
 Applies the inverse of the elementary transformation to a value.
virtual IlBoolean condToApplyElementaryTransfo () const
 Indicates whether the elementary transformation can be applied.
virtual IlBoolean condToApplyInverseElementaryTransfo () const
 Indicates whether the inverse of the elementary transformation can be applied.
IlDouble getConstCoeff () const
 Returns the constant coefficient.
IlDouble getMultCoeff () const
 Returns the multiplicative coefficient.
void setConstCoeff (IlDouble d)
 Sets the constant coefficient.
void setMultCoeff (IlDouble d)
 Sets the multiplicative coefficient.

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 ( IlDouble  multCoeff,
IlDouble  constCoeff,
IlUInt  logBase = 0 
)

Constructor.

Initializes a new IlvAffineChartTransformer object.

Parameters:
multCoeff The multiplicative coefficient set for the affine transformation.
constCoeff The constant coefficient set for the affine transformation.
logBase The logarithmic base set for the current object.

Member Function Documentation

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

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

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.

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.

IlDouble IlvAffineChartTransformer::getConstCoeff (  )  const

Returns the constant coefficient.

Returns:
The constant coefficient defined for the affine transformation.
IlDouble IlvAffineChartTransformer::getMultCoeff (  )  const

Returns the multiplicative coefficient.

Returns:
The multiplicative coefficient defined for the affine transformation.
void IlvAffineChartTransformer::setConstCoeff ( IlDouble  d  ) 

Sets the constant coefficient.

Parameters:
d The constant coefficient set for the affine transformation.
void IlvAffineChartTransformer::setMultCoeff ( IlDouble  d  ) 

Sets the multiplicative coefficient.

Parameters:
d The multiplicative coefficient set for the affine transformation.
Warning:
[note] The multiplicative coefficient must be a value other than 0, otherwise the inverse of the affine transformation is not defined.
 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.