Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

LinearTransform Class Reference

#include <LinearTransform.h>

Inheritance diagram for LinearTransform:

Inheritance graph
[legend]
Collaboration diagram for LinearTransform:

Collaboration graph
[legend]
List of all members.

Detailed Description

A transform on one axis whose output is equal to the input.

That is, it does not change the input values.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 27 of file LinearTransform.h.

Public Member Functions

virtual const RangeadjustValues (AxisModelBase &axis, const Range &limit)
 Sets the range of given axis to be a new "nice" within the limits given.
virtual double aspectRatio () const
 Get the aspect ratio.
virtual LinearTransformclone () const
 Creates a new Transform object by copying an existing one.
virtual void inverseTransform (double &x) const
 Inverse transforms the coordinate x.
bool isLinear () const
virtual const Rangelimits () const
 Returns a Range whose values are the limits on the coordinate.
 LinearTransform (const LinearTransform &)
 The copy constructor.
 LinearTransform ()
 The default constructor.
const std::stringname () const
 Returns the name of the Transform.
virtual const std::vector<
AxisTick > & 
setTicks (AxisModelBase &axis)
 Sets the vector of ticks along the axis to which this Linear transform is applied.
virtual void transform (std::vector< double > &x) const
 Transforms each element of the vector.
virtual void transform (double &x) const
 Transforms the coordinate @ x.
virtual void validate (Range &) const
 The following function validates the range.
virtual ~LinearTransform ()
 The virtual destructor.

Protected Attributes

const Range m_limits
 The valid Range of the transform.
std::string m_name
 Name of the Transform.

Private Member Functions

const std::vector< AxisTick > & genTicks (AxisModelBase &)
void setFirstTick (AxisModelBase &)
void setTickStep (AxisModelBase &)

Private Attributes

std::vector< AxisTickm_ticks
 The ticks generated by this transform.


Constructor & Destructor Documentation

LinearTransform::LinearTransform  ) 
 

The default constructor.

Sets the function name to "nil". Should be overriden by derived class. If function name is "nil", then that indicated error condition that default constructor was called directly.

Definition at line 28 of file LinearTransform.cxx.

References TransformBase::m_name.

LinearTransform::LinearTransform const LinearTransform  ) 
 

The copy constructor.

Definition at line 38 of file LinearTransform.cxx.

LinearTransform::~LinearTransform  )  [virtual]
 

The virtual destructor.

Definition at line 34 of file LinearTransform.cxx.


Member Function Documentation

const Range & LinearTransform::adjustValues AxisModelBase axis,
const Range limit
[virtual]
 

Sets the range of given axis to be a new "nice" within the limits given.

Implements UnaryTransform.

Definition at line 286 of file LinearTransform.cxx.

References AxisModelBase::getRange(), Range::high(), std::log10(), Range::low(), Range::pos(), std::pow(), AxisModelBase::setIntersectRange(), and AxisModelBase::setRange().

double TransformBase::aspectRatio  )  const [virtual, inherited]
 

Get the aspect ratio.

Reimplemented in BinaryTransform, HammerAito, Lambert, and XYTransform.

Definition at line 48 of file TransformBase.cxx.

Referenced by CompositePlotter::getAspectRatio().

LinearTransform * LinearTransform::clone  )  const [virtual]
 

Creates a new Transform object by copying an existing one.

Implements UnaryTransform.

Definition at line 46 of file LinearTransform.cxx.

const vector< AxisTick > & LinearTransform::genTicks AxisModelBase axis  )  [private]
 

Todo:
Handle too many ticks better, rather than doing nothing.
See more detailed comment in code.

Definition at line 172 of file LinearTransform.cxx.

References std::abs(), AxisModelBase::getFirstTick(), AxisModelBase::getMaxTicks(), AxisModelBase::getPMag(), AxisModelBase::getRange(), AxisModelBase::getRMag(), AxisModelBase::getScaleFactor(), AxisModelBase::getTickStep(), Range::high(), m_ticks, std::pow(), and AxisModelBase::setUsePMag().

Referenced by setTicks().

void LinearTransform::inverseTransform double &  x  )  const [virtual]
 

Inverse transforms the coordinate x.

Implements UnaryTransform.

Definition at line 63 of file LinearTransform.cxx.

bool LinearTransform::isLinear  )  const [virtual]
 

Implements UnaryTransform.

Definition at line 54 of file LinearTransform.cxx.

const Range & UnaryTransform::limits  )  const [virtual, inherited]
 

Returns a Range whose values are the limits on the coordinate.

Definition at line 25 of file UnaryTransform.cxx.

References UnaryTransform::m_limits.

Referenced by XYZTransform::limitX(), XYTransform::limitX(), XYZTransform::limitY(), XYTransform::limitY(), XYZTransform::limitZ(), and BinaryTransform::limitZ().

const string & TransformBase::name  )  const [inherited]
 

Returns the name of the Transform.

Definition at line 43 of file TransformBase.cxx.

References TransformBase::m_name.

Referenced by BinaryTransform::BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), and XYTransform::XYTransform().

void LinearTransform::setFirstTick AxisModelBase  )  [private]
 

Definition at line 154 of file LinearTransform.cxx.

References AxisModelBase::getRange(), AxisModelBase::getTickStep(), Range::low(), and AxisModelBase::setFirstTick().

Referenced by setTicks().

const vector< AxisTick > & LinearTransform::setTicks AxisModelBase axis  )  [virtual]
 

Sets the vector of ticks along the axis to which this Linear transform is applied.

Implements UnaryTransform.

Definition at line 81 of file LinearTransform.cxx.

References genTicks(), setFirstTick(), and setTickStep().

void LinearTransform::setTickStep AxisModelBase  )  [private]
 

Definition at line 94 of file LinearTransform.cxx.

References std::abs(), AxisModelBase::getRange(), AxisModelBase::getScaleFactor(), Range::high(), Range::length(), std::log10(), Range::low(), std::max(), std::pow(), AxisModelBase::setPMag(), AxisModelBase::setRMag(), and AxisModelBase::setTickStep().

Referenced by setTicks().

void LinearTransform::transform std::vector< double > &  x  )  const [virtual]
 

Transforms each element of the vector.

Implements UnaryTransform.

Definition at line 69 of file LinearTransform.cxx.

void LinearTransform::transform double &  x  )  const [virtual]
 

Transforms the coordinate @ x.

Implements UnaryTransform.

Definition at line 59 of file LinearTransform.cxx.

void LinearTransform::validate Range  )  const [virtual]
 

The following function validates the range.

It returns a copy of the argument Range since all values are valid for a linear transform.

Implements UnaryTransform.

Definition at line 74 of file LinearTransform.cxx.


Member Data Documentation

const Range UnaryTransform::m_limits [protected, inherited]
 

The valid Range of the transform.

Definition at line 39 of file UnaryTransform.h.

Referenced by UnaryTransform::limits().

std::string TransformBase::m_name [protected, inherited]
 

Name of the Transform.

Definition at line 39 of file TransformBase.h.

Referenced by BinaryTransform::BinaryTransform(), HammerAito::HammerAito(), Lambert::Lambert(), LinearTransform(), LogTransform::LogTransform(), TransformBase::name(), TransformBase::TransformBase(), XYTransform::XYTransform(), XYZTransform::XYZTransform(), and XYZTransformBase::XYZTransformBase().

std::vector< AxisTick > LinearTransform::m_ticks [private]
 

The ticks generated by this transform.

Definition at line 33 of file LinearTransform.h.

Referenced by genTicks().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3