neic-glass3  1.4.6
Public Member Functions | Public Attributes | List of all members
glass3::util::Taper Class Reference

glassutil taper class More...

#include <taper.h>

Collaboration diagram for glass3::util::Taper:
Collaboration graph

Public Member Functions

 Taper ()
 Taper constructor. More...
 
 Taper (double x1, double x2, double x3, double x4)
 Taper constructor. More...
 
 Taper (const Taper &taper)
 Taper copy constructor. More...
 
 ~Taper ()
 Taper destructor. More...
 
double calculateValue (double x)
 Calculate the value of the function Calculate the value of the function for a given value. More...
 

Public Attributes

double m_dX1
 A double value representing the start point of the averaging function and cosine ramp up. More...
 
double m_dX2
 A double value representing the end of the cosine ramp up. More...
 
double m_dX3
 A double value representing the start of the cosine ramp down. More...
 
double m_dX4
 A double value representing the end point of the averaging function and cosine ramp down. More...
 

Detailed Description

glassutil taper class

The Taper class represents a simple function used for averaging over an interval. It uses a cosine based ramp up and ramp down at both ends for stability.

Constructor & Destructor Documentation

glass3::util::Taper::Taper ( )

Taper constructor.

The constructor for the Taper class. Initializes members to default values.

glass3::util::Taper::Taper ( double  x1,
double  x2,
double  x3,
double  x4 
)

Taper constructor.

The constructor for the Taper class. Initializes members to provided values.

Parameters
x1- A double value representing the start point of the averaging function
x2- A double value representing the end of the cosine ramp up
x3- A double value representing the start of the cosine ramp down
x4- A double value representing the end point of the averaging function
glass3::util::Taper::Taper ( const Taper taper)

Taper copy constructor.

The copy constructor for the Taper class.

glass3::util::Taper::~Taper ( )

Taper destructor.

The destructor for the Taper class.

Member Function Documentation

double glass3::util::Taper::calculateValue ( double  x)

Calculate the value of the function Calculate the value of the function for a given value.

Values less than dX1 evaluate to 0.0. Between dX1 and dX2 the value ramps up to 1.0 with a cosine taper, then is constant at 1.0 from dX2 to dX3 whence it ramps back down to 0.0 again with a cosine taper in reverse. Values greater than dX4 evaluate to 0.0.

Parameters
x- A double value to calculate the taper value from.
Returns
Returns a double value containing the calculated taper value.

Member Data Documentation

double glass3::util::Taper::m_dX1

A double value representing the start point of the averaging function and cosine ramp up.

double glass3::util::Taper::m_dX2

A double value representing the end of the cosine ramp up.

double glass3::util::Taper::m_dX3

A double value representing the start of the cosine ramp down.

double glass3::util::Taper::m_dX4

A double value representing the end point of the averaging function and cosine ramp down.


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