PeriodicResponseCurve Class Template Reference

#include <C:/Work/specialnumbers_svn/NumberLib/NumbersLib/PeriodicResponseCurve.h>

Inheritance diagram for PeriodicResponseCurve:

AbstractFunction

List of all members.


Detailed Description

template<class T, unsigned int n>
class PeriodicResponseCurve< T, n >

This class is useful for implementing arbitrary periodic functions.

It works exactly like ResponseCurve, except that the input is wrapped so that it is always between the inputMin and the inputMax. Note that the value returned for inputMax is the same as the output at inputMin.

Definition at line 16 of file PeriodicResponseCurve.h.


Public Member Functions

getInputMax () const
 Returns the outputMin for this PeriodicResponseCurve (the value passed to the constructor).
getInputMin () const
 Returns the inputMin for this PeriodicResponseCurve (the value pass to the constructor).
operator() (const T input) const
 A new inputValue is calculated so that.
 PeriodicResponseCurve (T inputMin, T inputMax, T outputSamples[n])
 Constructs a new Periodic response curve.

Private Attributes

ResponseCurve< T, n > mResponseCurve

Constructor & Destructor Documentation

PeriodicResponseCurve ( inputMin,
inputMax,
outputSamples[n] 
) [inline]

Constructs a new Periodic response curve.

Parameters:
inputMin The minimum value an input can be.
inputMax The maximum value an input can be.
outputSamples Samples of outputs.

Definition at line 71 of file PeriodicResponseCurve.h.


Member Function Documentation

T getInputMax (  )  const [inline]

Returns the outputMin for this PeriodicResponseCurve (the value passed to the constructor).

Definition at line 90 of file PeriodicResponseCurve.h.

References mResponseCurve.

Referenced by operator()().

T getInputMin (  )  const [inline]

Returns the inputMin for this PeriodicResponseCurve (the value pass to the constructor).

Definition at line 84 of file PeriodicResponseCurve.h.

References mResponseCurve.

Referenced by operator()().

T operator() ( const T  input  )  const [inline]

A new inputValue is calculated so that.

         newInputValue = (inPutValue) + m * (inputMax - inputMin)

for some integer m such that

         inputMin < newInputValue < inputMax

Then an index is calculated for this input value, and the output is interpolated between outputSample[index] and outputSample[index + 1].

Parameters:
input The input for which output is sought.

Definition at line 76 of file PeriodicResponseCurve.h.

References getInputMax(), getInputMin(), luma::numbers::mod(), and mResponseCurve.


Member Data Documentation

ResponseCurve<T, n> mResponseCurve [private]

Definition at line 66 of file PeriodicResponseCurve.h.

Referenced by getInputMax(), getInputMin(), and operator()().


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

Generated on Sun Sep 21 20:49:08 2008 for Numbers by  doxygen 1.5.6