qwt_math.h(3)

NAME
qwt_math.h - A set of mathematical routines.

SYNOPSIS

  Defines
#define LOG10_2 0.30102999566398119802
#define LOG10_3 0.47712125471966243540
#define LOG10_5 0.69897000433601885749
#define M_2PI 6.28318530717958623200
#define LOG_MIN 1.0e-100
#define LOG_MAX 1.0e100

  Functions
double qwtCeil125 (double x)
double qwtFloor125 (double x)
double qwtGetMin (double *array, int size)
double qwtGetMax (double *array, int size)
void qwtTwistArray (double *array, int size)
int qwtChkMono (double *array, int size)
void qwtLinSpace (double *array, int size, double xmin, double xmax)
void qwtLogSpace (double *array, int size, double xmin, double xmax)
template<class T> const T & qwtMax (const T &x, const T &y)
template<class T> const T & qwtMin (const T &x, const T &y)
template<class T> T qwtAbs (const T &x)
template<class T> int qwtSign (const T &x)
template<class T> T qwtSqr (const T &x)
template<class T> void qwtCopyArray (T *dest, T *src, int n)
template<class T> void qwtShiftArray (T *arr, int size, int di)
template<class T> void qwtSwap (T &x1, T &x2)
int qwtInt (double x)
template<class T> void qwtSort (const T &x1, const T &x2, T &xmin, T &xmax)
template<class T> void qwtSort (T &x1, T &x2)
template<class T> T qwtLim (const T &x, const T &x1, const T &x2)

DETAILED DESCRIPTION

A set of mathematical routines.

FUNCTION DOCUMENTATION

  template<class T> T qwtAbs (const T & x)

Return the absolute value.

  double qwtCeil125 (double x)

Find the smallest value out of {1,2,5}*10^n with an integer number n which is greater than or equal to x.

Parameters:

x   Input value

  int qwtChkMono (double * array, int size)

Checks if an array is a strictly monotonic sequence.

Parameters:

array
    Pointer to an array

size
    Size of the array

Returns:

0   sequence is not strictly monotonic

1   sequence is strictly monotonically increasing

-1  sequence is strictly monotonically decreasing

  template<class T> void qwtCopyArray (T * dest, T * src, int n)

Copy an array into another.

Parameters:

dest
    Destination

src Source

n   Number of elements

  double qwtFloor125 (double x)

Find the largest value out of {1,2,5}*10^n with an integer number n which is smaller than or equal to x.

Parameters:

x   Input value

  double qwtGetMax (double * array, int size)

Find the largest value in an array.

Parameters:

array
    Pointer to an array

size
    Array size

  double qwtGetMin (double * array, int size)

Find the smallest value in an array.

Parameters:

array
    Pointer to an array

size
    Array size

  int qwtInt (double x)

Round a number to the nearest integer.

  template<class T> T qwtLim (const T & x, const T & x1, const T & x2)

Limit a value to fit into a specified interval.

Parameters:

x   Input value

x1  First interval boundary

x2  Second interval boundary

  void qwtLinSpace (double * array, int size, double xmin, double xmax)

Create an array of equally spaced values.

Parameters:

array
    Where to put the values

size
    Size of the array

xmin
    Value associated with index 0

xmax
    Value associated with index (size-1)

  void qwtLogSpace (double * array, int size, double xmin, double xmax)

Create an array of logarithmically equally spaced values.

Parameters:

array
    Where to put the values

size
    Size of the array

xmin
    Value associated with index 0

xmax
    Value associated with index (size-1)

  template<class T> const T& qwtMax (const T & x, const T & y)

Return the largest of two values.

  template<class T> const T& qwtMin (const T & x, const T & y)

Return the smallest of two values.

  template<class T> void qwtShiftArray (T * arr, int size, int di)

Shift an array by a specified number of positions.

Parameters:

arr Pointer to an array

size
    Number of elements

di  Number of positions. A positive number shifts right, a negative number shifts left.

  template<class T> int qwtSign (const T & x)

Return the sign.

  template<class T> void qwtSort (T & x1, T & x2)

Sort two values in ascending order.

  template<class T> void qwtSort (const T & x1, const T & x2, T & xmin, T & xmax)

Sort two values in ascending order.

Parameters:

x1  First input value

x2  Second input value

xmax
    Greater value

xmin
    Smaller value

  template<class T> T qwtSqr (const T & x)

Return the square of a number.

  template<class T> void qwtSwap (T & x1, T & x2)

Swap two values.

  void qwtTwistArray (double * array, int size)

Invert the order of array elements.

Parameters:

array
    Pointer to an array

size
    Size of the array

AUTHOR

Generated automatically by Doxygen for Qwt User's Guide from the source code.