#include <gul_types.h>
Static Public Methods | |
| float | epsilon () |
| float | epsilon_inv () |
| float | zero_tol () |
| size_t | mantissa_length () |
| float | maximum () |
| float | minimum () |
| float | pi () |
| float | pi_180 () |
| float | pi_180_inv () |
| float | root2_2 () |
| float | root2_3 () |
| float | golden_r () |
| float | golden_c () |
| float | tiny () |
| float | giant () |
| float | zero () |
| float | one () |
| void | InitBinCoeff (const int Pmax) |
| void | ExitBinCoeff () |
| float | BinCoeff (const int p, const int k) |
| float | floor (const float a) |
| float | ceil (const float a) |
| float | fabs (const float a) |
| float | sqrt (const float a) |
| float | sin (const float a) |
| float | cos (const float a) |
| float | acos (const float a) |
| int | ilogb (const float a) |
| float | scalbn (const float x, int n) |
| float | rad (const float d) |
| float | deg (const float r) |
| int | cmp (const float a, const float b) |
| int | id () |
Static Public Attributes | |
| float ** | m_BinCoeff = 0 |
| int | m_BinCoeff_Pmax = -1 |
|
|
Definition at line 208 of file gul_types.h.
00208 { return ::acosf(a); }
|
|
||||||||||||
|
Definition at line 194 of file gul_types.h.
00195 {
00196 if( (k > p) || (k < 0) || (p < 0) ) return 0.0;
00197 if( p > m_BinCoeff_Pmax ) InitBinCoeff( p );
00198 return m_BinCoeff[p][k];
00199 }
|
|
|
Definition at line 203 of file gul_types.h.
00203 { return ::ceilf(a); }
|
|
||||||||||||
|
Definition at line 228 of file gul_types.h.
00228 { return compare<float>(a,b);}
|
|
|
Definition at line 207 of file gul_types.h.
00207 { return ::cosf(a); }
|
|
|
Definition at line 227 of file gul_types.h.
00227 { return r * pi_180_inv(); }
|
|
|
Definition at line 165 of file gul_types.h.
00165 { return FLT_EPSILON; }
|
|
|
Definition at line 166 of file gul_types.h.
00166 { return 1.0f/FLT_EPSILON; }
|
|
|
Definition at line 84 of file guar_bincoeff.cpp.
00085 {
00086 int i;
00087
00088 if( m_BinCoeff == 0 )
00089 return;
00090
00091 for( i = 0; i <= m_BinCoeff_Pmax; i++ )
00092 free( m_BinCoeff[i] );
00093
00094 free( m_BinCoeff );
00095
00096 m_BinCoeff = 0;
00097 m_BinCoeff_Pmax = -1;
00098 }
|
|
|
Definition at line 204 of file gul_types.h.
00204 { return ::fabsf(a); }
|
|
|
Definition at line 202 of file gul_types.h.
00202 { return ::floorf(a); }
|
|
|
Definition at line 181 of file gul_types.h.
00181 { return 1.0f/tiny(); }
|
|
|
Definition at line 177 of file gul_types.h.
00177 { return 1.0f-golden_r(); }
|
|
|
Definition at line 176 of file gul_types.h.
00176 { return 0.61803399f; }
|
|
|
Definition at line 230 of file gul_types.h.
00230 { return(1); }
|
|
|
Definition at line 210 of file gul_types.h.
00210 { return ::ilogbf(a); }
|
|
|
Definition at line 41 of file guar_bincoeff.cpp.
00042 {
00043 float s1,s2;
00044 int p,k;
00045
00046 if( Pmax <= m_BinCoeff_Pmax )
00047 return;
00048
00049 m_BinCoeff = (float **)realloc( m_BinCoeff, sizeof(float *) * (Pmax+1) );
00050 if( m_BinCoeff == NULL ) { throw AllocError(); }
00051
00052 for( p = m_BinCoeff_Pmax+1; p <= Pmax; p++ )
00053 {
00054 m_BinCoeff[p] = (float *)malloc( sizeof(float) * (p+1) );
00055 if( m_BinCoeff[p] == 0 ) { throw AllocError(); }
00056
00057 if( p == 0 )
00058 {
00059 m_BinCoeff[0][0] = 1;
00060 continue;
00061 }
00062 for( k = 0; k <= p; k++ )
00063 {
00064 if( k == 0 )
00065 s1 = 0;
00066 else
00067 s1 = m_BinCoeff[p-1][k-1];
00068
00069 if( k > p-1 )
00070 s2 = 0;
00071 else
00072 s2 = m_BinCoeff[p-1][k];
00073
00074 m_BinCoeff[p][k] = s1 + s2;
00075 }
00076 }
00077 m_BinCoeff_Pmax = Pmax;
00078 }
|
|
|
Definition at line 168 of file gul_types.h.
00168 { return 4; } // in multiples of 4
|
|
|
Definition at line 169 of file gul_types.h.
00169 { return FLT_MAX; }
|
|
|
Definition at line 170 of file gul_types.h.
00170 { return FLT_MIN; }
|
|
|
Definition at line 188 of file gul_types.h.
00188 { return 1.0f; }
|
|
|
Definition at line 171 of file gul_types.h.
00171 { return 3.14159265358979323846f; }
|
|
|
Definition at line 172 of file gul_types.h.
00172 { return 3.14159265358979323846f/180.0f; }
|
|
|
Definition at line 173 of file gul_types.h.
00173 { return 180.0f/3.14159265358979323846f; }
|
|
|
Definition at line 226 of file gul_types.h.
00226 { return d * pi_180(); }
|
|
|
Definition at line 174 of file gul_types.h.
00174 { return 1.41421356237309514547f; }
|
|
|
Definition at line 175 of file gul_types.h.
00175 { return 1.7320508076887719318f; }
|
|
||||||||||||
|
Definition at line 211 of file gul_types.h.
00211 { return ::scalbnf(x,n); }
|
|
|
Definition at line 206 of file gul_types.h.
00206 { return ::sinf(a); }
|
|
|
Definition at line 205 of file gul_types.h.
00205 { return ::sqrtf(a); }
|
|
|
Definition at line 180 of file gul_types.h.
00180 { return 1e-20f; }
|
|
|
Definition at line 187 of file gul_types.h.
00187 { return 0.0f; }
|
|
|
Definition at line 167 of file gul_types.h.
00167 { return 1.e-4f; }
|
|
|
Definition at line 25 of file guar_bincoeff.cpp. |
|
|
Definition at line 26 of file guar_bincoeff.cpp. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001