Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

Util.h File Reference


Detailed Description

Numerical Utilities.

Author:
James R. Bruce (Creator)
  =======================================================================
    Util.h
  -----------------------------------------------------------------------
    Numerical utility functions
  -----------------------------------------------------------------------
    Copyright 1999, 2000, 2001 James R. Bruce
    School of Computer Science, Carnegie Mellon University
  -----------------------------------------------------------------------
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to: Free Software Foundation,
    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
		=======================================================================
 * 

Author
ejt
Name
tekkotsu-1_4_1
Revision
1.4
State
Exp
Date
2003/01/23 18:14:11

Definition in file Util.h.

#include <math.h>
#include <string.h>

Include dependency graph for Util.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

template<class num1, class num2> num1 bound (num1 x, num2 low, num2 high)
template<class num> num max3 (num a, num b, num c)
template<class num> num min3 (num a, num b, num c)
template<class num> void sort (num &a, num &b, num &c)
template<class real> real fmodt (real x, real m)
template<class num1, class num2> num1 setbits (num1 val, num2 bits)
template<class num1, class num2> num1 clearbits (num1 val, num2 bits)
template<class real> real saw (real t)
template<class data> int mcopy (data *dest, data *src, int num)
template<class data> data mset (data *dest, data val, int num)
template<class data> void mzero (data &d)
template<class node> int list_length (node *list)
double norm_angle (double angle)
void angle_wrap (double &angle)
double avg_angle (double left, double right)
double atan2a (double y, double x)
double atan2b (double y, double x)
template<class num> int sign (num n)
double gaussian_with_min (double x, double min_value)
double gaussian_prob (double x, double mean, double sigma)

Variables

const double TODEG = (180.0 / M_PI)
const double gaussian_constant = sqrt(2*M_PI)


Function Documentation

void angle_wrap double &  angle  )  [inline]
 

Definition at line 177 of file Util.h.

double atan2a double  y,
double  x
[inline]
 

Definition at line 199 of file Util.h.

double atan2b double  y,
double  x
[inline]
 

Definition at line 209 of file Util.h.

double avg_angle double  left,
double  right
[inline]
 

Definition at line 185 of file Util.h.

template<class num1, class num2>
num1 bound num1  x,
num2  low,
num2  high
[inline]
 

Definition at line 61 of file Util.h.

template<class num1, class num2>
num1 clearbits num1  val,
num2  bits
[inline]
 

Definition at line 111 of file Util.h.

template<class real>
real fmodt real  x,
real  m
 

Definition at line 97 of file Util.h.

double gaussian_prob double  x,
double  mean,
double  sigma
[inline]
 

Definition at line 241 of file Util.h.

References gaussian_constant.

double gaussian_with_min double  x,
double  min_value
[inline]
 

Definition at line 227 of file Util.h.

template<class node>
int list_length node *  list  ) 
 

Definition at line 151 of file Util.h.

template<class num>
num max3 num  a,
num  b,
num  c
[inline]
 

Definition at line 69 of file Util.h.

template<class data>
int mcopy data *  dest,
data *  src,
int  num
[inline]
 

Definition at line 124 of file Util.h.

template<class num>
num min3 num  a,
num  b,
num  c
[inline]
 

Definition at line 79 of file Util.h.

template<class data>
data mset data *  dest,
data  val,
int  num
[inline]
 

Definition at line 134 of file Util.h.

template<class data>
void mzero data &  d  )  [inline]
 

Definition at line 144 of file Util.h.

double norm_angle double  angle  )  [inline]
 

Definition at line 166 of file Util.h.

template<class real>
real saw real  t  ) 
 

Definition at line 117 of file Util.h.

template<class num1, class num2>
num1 setbits num1  val,
num2  bits
[inline]
 

Definition at line 105 of file Util.h.

template<class num>
int sign num  n  )  [inline]
 

Definition at line 219 of file Util.h.

template<class num>
void sort num &  a,
num &  b,
num &  c
[inline]
 

Definition at line 89 of file Util.h.


Variable Documentation

const double gaussian_constant = sqrt(2*M_PI)
 

Definition at line 239 of file Util.h.

const double TODEG = (180.0 / M_PI)
 

Definition at line 31 of file Util.h.


Tekkotsu v1.4
Generated Sat Jul 19 00:08:28 2003 by Doxygen 1.3.2