A UnaryTransform which takes the log of the coordinate. More...
#include <LogTransform.h>
Public Member Functions | |
const Range & | adjustValues (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 LogTransform * | clone () const |
Creates a new Transform object by copying an existing one. | |
virtual void | inverseTransform (double &x) const |
Inverse transforms the coordinate x. | |
virtual bool | isLinear () const |
virtual const Range & | limits () const |
Returns a Range whose values are the limits on the coordinate. | |
LogTransform () | |
The default constructor. | |
LogTransform (const LogTransform &) | |
The copy constructor. | |
const std::string & | name () 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 Log transform is applied. | |
virtual void | transform (double &x) const |
Transforms the coordinate @ x. | |
virtual void | transform (std::vector< double > &x) const |
Transforms each element of the vector x. | |
virtual void | validate (Range &) const |
Validates the Range, and adjusts the argument Range so that the values are positive. | |
virtual | ~LogTransform () |
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 Range & | adjustLogValues (AxisModelBase &axis) |
const std::vector< AxisTick > & | genTicks (AxisModelBase &) |
double | nextStep (double current, AxisModelBase &axis) |
double | prevStep (double current, AxisModelBase &axis) |
void | setFirstTick (AxisModelBase &) |
void | setTickStep (AxisModelBase &) |
Private Attributes | |
std::vector< AxisTick > | m_ticks |
The ticks generated by this transform. |
A UnaryTransform which takes the log of the coordinate.
Definition at line 28 of file LogTransform.h.
LogTransform | ( | ) |
The default constructor.
Definition at line 41 of file LogTransform.cxx.
References TransformBase::m_name.
LogTransform | ( | const LogTransform & | lt | ) |
The copy constructor.
Definition at line 51 of file LogTransform.cxx.
|
virtual |
The virtual destructor.
Definition at line 47 of file LogTransform.cxx.
|
private |
Definition at line 459 of file LogTransform.cxx.
References AxisModelBase::getRange(), Range::high(), Range::low(), Range::pos(), and AxisModelBase::setRange().
Referenced by LogTransform::adjustValues().
|
virtual |
Sets the range of given axis to be a new "nice" within the limits given.
Implements UnaryTransform.
Definition at line 372 of file LogTransform.cxx.
References LogTransform::adjustLogValues(), AxisModelBase::getPMag(), AxisModelBase::getRange(), AxisModelBase::getScaleFactor(), Range::high(), Range::length(), Range::low(), LogTransform::nextStep(), Range::pos(), LogTransform::prevStep(), AxisModelBase::setIntersectRange(), and LogTransform::setTickStep().
|
virtualinherited |
Get the aspect ratio.
Reimplemented in BinaryTransform, XYTransform, HammerAito2, HammerAito, Mercator, Mercator2, AIR, AIR2, ARC, ARC2, Cartesian, Cartesian2, GlobalSinusoidal, GlobalSinusoidal2, Lambert, Lambert2, SIN, SIN2, STG, STG2, TAN, and TAN2.
Definition at line 50 of file TransformBase.cxx.
Referenced by CompositePlotter::getAspectRatio().
|
virtual |
Creates a new Transform object by copying an existing one.
Implements UnaryTransform.
Definition at line 59 of file LogTransform.cxx.
|
private |
This is an ugly way to display scientific notation. Can we improve it?
Use C++ stringstream insted of sprintf().
Definition at line 183 of file LogTransform.cxx.
References hippodraw::FLT_EQUAL(), AxisModelBase::getFirstTick(), AxisModelBase::getMaxTicks(), AxisModelBase::getRange(), AxisModelBase::getScaleFactor(), AxisModelBase::getTickStep(), Range::high(), Range::low(), LogTransform::m_ticks, and LogTransform::nextStep().
Referenced by LogTransform::setTicks().
|
virtual |
Inverse transforms the coordinate x.
Implements UnaryTransform.
Definition at line 77 of file LogTransform.cxx.
|
virtual |
Implements UnaryTransform.
Definition at line 67 of file LogTransform.cxx.
|
virtualinherited |
Returns a Range whose values are the limits on the coordinate.
Definition at line 28 of file UnaryTransform.cxx.
References UnaryTransform::m_limits.
Referenced by XYZTransform::limitX(), XYTransform::limitX(), XYZTransform::limitY(), XYTransform::limitY(), XYZTransform::limitZ(), and BinaryTransform::limitZ().
|
inherited |
Returns the name of the Transform.
Definition at line 45 of file TransformBase.cxx.
References TransformBase::m_name.
Referenced by BinaryTransform::BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), Inspector::updateTransformTab(), and XYTransform::XYTransform().
|
private |
Definition at line 293 of file LogTransform.cxx.
References AxisModelBase::getTickStep().
Referenced by LogTransform::adjustValues(), and LogTransform::genTicks().
|
private |
Definition at line 335 of file LogTransform.cxx.
References AxisModelBase::getTickStep().
Referenced by LogTransform::adjustValues(), and LogTransform::setFirstTick().
|
private |
Definition at line 150 of file LogTransform.cxx.
References AxisModelBase::getPMag(), AxisModelBase::getRange(), Range::low(), LogTransform::prevStep(), and AxisModelBase::setFirstTick().
Referenced by LogTransform::setTicks().
|
virtual |
Sets the vector of ticks along the axis to which this Log transform is applied.
Implements UnaryTransform.
Definition at line 117 of file LogTransform.cxx.
References LogTransform::genTicks(), LogTransform::setFirstTick(), and LogTransform::setTickStep().
|
private |
Definition at line 125 of file LogTransform.cxx.
References AxisModelBase::getRange(), Range::high(), Range::low(), AxisModelBase::setPMag(), AxisModelBase::setRMag(), and AxisModelBase::setTickStep().
Referenced by LogTransform::adjustValues(), and LogTransform::setTicks().
|
virtual |
Transforms the coordinate @ x.
If the coordinate is non-positive, it is transformed to -DBL_MAX
as defined in float.h.
Implements UnaryTransform.
Definition at line 72 of file LogTransform.cxx.
|
virtual |
Transforms each element of the vector x.
If any element is non positive, it is transformed to -DBL_MAX
.
Implements UnaryTransform.
Definition at line 84 of file LogTransform.cxx.
|
virtual |
Validates the Range, and adjusts the argument Range so that the values are positive.
Implements UnaryTransform.
Definition at line 101 of file LogTransform.cxx.
References Range::high(), Range::low(), Range::pos(), Range::setHigh(), and Range::setLow().
|
protectedinherited |
The valid Range of the transform.
Definition at line 41 of file UnaryTransform.h.
Referenced by UnaryTransform::limits().
|
protectedinherited |
Name of the Transform.
Definition at line 42 of file TransformBase.h.
Referenced by AIR::AIR(), AIR2::AIR2(), ARC::ARC(), ARC2::ARC2(), BinaryTransform::BinaryTransform(), Cartesian::Cartesian(), Cartesian2::Cartesian2(), GlobalSinusoidal::GlobalSinusoidal(), GlobalSinusoidal2::GlobalSinusoidal2(), HammerAito::HammerAito(), HammerAito2::HammerAito2(), Lambert::Lambert(), Lambert2::Lambert2(), LinearTransform::LinearTransform(), LogTransform::LogTransform(), Mercator::Mercator(), Mercator2::Mercator2(), TransformBase::name(), SIN::SIN(), SIN2::SIN2(), STG::STG(), STG2::STG2(), TAN::TAN(), TAN2::TAN2(), TransformBase::TransformBase(), XYTransform::XYTransform(), XYZTransform::XYZTransform(), and XYZTransformBase::XYZTransformBase().
|
private |
The ticks generated by this transform.
Definition at line 34 of file LogTransform.h.
Referenced by LogTransform::genTicks().