Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
ValWrap< T > Class Template Reference

A value wrapped to an interval [min, max) More...

#include <Types.h>

Inheritance diagram for ValWrap< T >:
Interval< T >

List of all members.

Public Member Functions

ValWrapoperator= (const T &v)
 Set value.
ValWrapoperator+= (const T &v)
 Add value.
ValWrapoperator-= (const T &v)
 Subtract value.
ValWrapoperator*= (const T &v)
 Multiply value.
ValWrapoperator/= (const T &v)
 Divide value.
ValWrap operator++ (int)
 Postfix increment value.
ValWrap operator-- (int)
 Postfix decrement value.
ValWrapoperator++ ()
 Prefix increment value.
ValWrapoperator-- ()
 Prefix decrement value.
ValWrapendpoints (const T &min, const T &max)
 Set wrapping interval.
ValWrapmax (const T &v)
 Set maximum endpoint.
ValWrapmin (const T &v)
 Set minimum endpoint.
double fraction () const
 Returns positive unit fractional position in interval.
center () const
 Returns center point.
Intervalcenter (const T &v)
 Set center point preserving diameter.
bool contains (const T &v) const
 Test is point is contained exclusively within interval.
bool degenerate () const
 Returns true if diameter is zero.
diameter () const
 Returns absolute difference of endpoints.
Intervaldiameter (const T &v)
 Set diameter (width) preserving center.
const T & max () const
 Get maximum endpoint.
const T & min () const
 Get minimum endpoint.
bool proper () const
 Returns true if diameter is non-zero.
radius () const
 Returns one-half the diameter.
toUnit (const T &v) const
 Linearly map point in interval to point in the unit interval.
IntervalcenterDiameter (const T &c, const T &d)
 Set center and diameter.
Intervaltranslate (const T &v)
 Translate interval by fixed amount.

Detailed Description

template<class T>
class gam::ValWrap< T >

A value wrapped to an interval [min, max)

Mathematical correctness is strongly enforced. The value will always lie in the specified interval.


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