MorphoGraphX  2.0-1-227
Classes | Public Member Functions | List of all members
mgx::Function Class Reference

A utility class for functions. More...

#include <function.hpp>

Public Member Functions

 Function ()
 
 Function (const QString &filename)
 
 Function (const Function &copy)
 
Functionoperator= (const Function &)
 
double operator() (double x)
 
const Vector< 2, double > & getMax () const
 
const Vector< 2, double > & getMin () const
 
void reRead ()
 
bool setFile (const QString &file)
 
void setSamples (size_t n)
 
bool error ()
 
QString fileName ()
 
void scaleX (double s)
 Scale the x axis by s. More...
 
void scaleY (double s)
 Scale the y axis by s. More...
 
double scaleX () const
 Get the current x scaling. More...
 
double scaleY () const
 Get the current y scaling. More...
 
void shiftX (double s)
 Shift the x axis by s. More...
 
void shiftY (double s)
 Shift the y axis by s. More...
 
double shiftX () const
 Get the current x axis shift. More...
 
double shiftY () const
 Get the current y axis shift. More...
 
void normalizeY (bool shift=true)
 
void normalizeX (bool shift=true)
 

Detailed Description

A utility class for functions.

This class is a function object that encapsulates functions in the VLAB function formats (original and fver 1 1).

Definition at line 26 of file Function.hpp.

Constructor & Destructor Documentation

◆ Function() [1/3]

mgx::Function::Function ( )

◆ Function() [2/3]

mgx::Function::Function ( const QString &  filename)

◆ Function() [3/3]

mgx::Function::Function ( const Function copy)

Member Function Documentation

◆ error()

bool mgx::Function::error ( )

◆ fileName()

QString mgx::Function::fileName ( )
inline

Definition at line 44 of file Function.hpp.

◆ getMax()

const Vector<2,double>& mgx::Function::getMax ( ) const

◆ getMin()

const Vector<2,double>& mgx::Function::getMin ( ) const

◆ normalizeX()

void mgx::Function::normalizeX ( bool  shift = true)

◆ normalizeY()

void mgx::Function::normalizeY ( bool  shift = true)

◆ operator()()

double mgx::Function::operator() ( double  x)

◆ operator=()

Function& mgx::Function::operator= ( const Function )

◆ reRead()

void mgx::Function::reRead ( )

◆ scaleX() [1/2]

double mgx::Function::scaleX ( ) const
inline

Get the current x scaling.

Definition at line 56 of file Function.hpp.

◆ scaleX() [2/2]

void mgx::Function::scaleX ( double  s)
inline

Scale the x axis by s.

Parameters
sScaling factor to apply to the axis

Definition at line 49 of file Function.hpp.

◆ scaleY() [1/2]

double mgx::Function::scaleY ( ) const
inline

Get the current y scaling.

Definition at line 58 of file Function.hpp.

◆ scaleY() [2/2]

void mgx::Function::scaleY ( double  s)
inline

Scale the y axis by s.

Parameters
sScaling factor to apply to the axis

Definition at line 54 of file Function.hpp.

◆ setFile()

bool mgx::Function::setFile ( const QString &  file)

◆ setSamples()

void mgx::Function::setSamples ( size_t  n)

◆ shiftX() [1/2]

double mgx::Function::shiftX ( ) const
inline

Get the current x axis shift.

Definition at line 76 of file Function.hpp.

◆ shiftX() [2/2]

void mgx::Function::shiftX ( double  s)
inline

Shift the x axis by s.

Parameters
sShift of the axis

Note that the shift happens after the scaling, so it should be written in the scaled reference system.

Definition at line 66 of file Function.hpp.

◆ shiftY() [1/2]

double mgx::Function::shiftY ( ) const
inline

Get the current y axis shift.

Definition at line 78 of file Function.hpp.

◆ shiftY() [2/2]

void mgx::Function::shiftY ( double  s)
inline

Shift the y axis by s.

Parameters
sShift of the axis

Note that the shift happens after the scaling, so it should be written in the scaled reference system.

Definition at line 74 of file Function.hpp.


The documentation for this class was generated from the following file: