doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
idPolynomial Class Reference

#include <Polynomial.h>

Public Member Functions

 idPolynomial (void)
 
 idPolynomial (int d)
 
 idPolynomial (float a, float b)
 
 idPolynomial (float a, float b, float c)
 
 idPolynomial (float a, float b, float c, float d)
 
 idPolynomial (float a, float b, float c, float d, float e)
 
float operator[] (int index) const
 
floatoperator[] (int index)
 
idPolynomial operator- () const
 
idPolynomialoperator= (const idPolynomial &p)
 
idPolynomial operator+ (const idPolynomial &p) const
 
idPolynomial operator- (const idPolynomial &p) const
 
idPolynomial operator* (const float s) const
 
idPolynomial operator/ (const float s) const
 
idPolynomialoperator+= (const idPolynomial &p)
 
idPolynomialoperator-= (const idPolynomial &p)
 
idPolynomialoperator*= (const float s)
 
idPolynomialoperator/= (const float s)
 
bool Compare (const idPolynomial &p) const
 
bool Compare (const idPolynomial &p, const float epsilon) const
 
bool operator== (const idPolynomial &p) const
 
bool operator!= (const idPolynomial &p) const
 
void Zero (void)
 
void Zero (int d)
 
int GetDimension (void) const
 
int GetDegree (void) const
 
float GetValue (const float x) const
 
idComplex GetValue (const idComplex &x) const
 
idPolynomial GetDerivative (void) const
 
idPolynomial GetAntiDerivative (void) const
 
int GetRoots (idComplex *roots) const
 
int GetRoots (float *roots) const
 
const floatToFloatPtr (void) const
 
floatToFloatPtr (void)
 
const char * ToString (int precision=2) const
 

Static Public Member Functions

static int GetRoots1 (float a, float b, float *roots)
 
static int GetRoots2 (float a, float b, float c, float *roots)
 
static int GetRoots3 (float a, float b, float c, float d, float *roots)
 
static int GetRoots4 (float a, float b, float c, float d, float e, float *roots)
 
static void Test (void)
 

Private Member Functions

void Resize (int d, bool keep)
 
int Laguer (const idComplex *coef, const int degree, idComplex &r) const
 

Private Attributes

int degree
 
int allocated
 
floatcoefficient
 

Detailed Description

Definition at line 41 of file Polynomial.h.

Constructor & Destructor Documentation

ID_INLINE idPolynomial::idPolynomial ( void  )

Definition at line 104 of file Polynomial.h.

ID_INLINE idPolynomial::idPolynomial ( int  d)
explicit

Definition at line 110 of file Polynomial.h.

ID_INLINE idPolynomial::idPolynomial ( float  a,
float  b 
)
explicit

Definition at line 117 of file Polynomial.h.

ID_INLINE idPolynomial::idPolynomial ( float  a,
float  b,
float  c 
)
explicit

Definition at line 126 of file Polynomial.h.

ID_INLINE idPolynomial::idPolynomial ( float  a,
float  b,
float  c,
float  d 
)
explicit

Definition at line 136 of file Polynomial.h.

ID_INLINE idPolynomial::idPolynomial ( float  a,
float  b,
float  c,
float  d,
float  e 
)
explicit

Definition at line 147 of file Polynomial.h.

Member Function Documentation

ID_INLINE bool idPolynomial::Compare ( const idPolynomial p) const

Definition at line 359 of file Polynomial.h.

ID_INLINE bool idPolynomial::Compare ( const idPolynomial p,
const float  epsilon 
) const

Definition at line 371 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::GetAntiDerivative ( void  ) const

Definition at line 445 of file Polynomial.h.

ID_INLINE int idPolynomial::GetDegree ( void  ) const

Definition at line 406 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::GetDerivative ( void  ) const

Definition at line 432 of file Polynomial.h.

ID_INLINE int idPolynomial::GetDimension ( void  ) const

Definition at line 402 of file Polynomial.h.

int idPolynomial::GetRoots ( idComplex roots) const

Definition at line 94 of file Polynomial.cpp.

int idPolynomial::GetRoots ( float roots) const

Definition at line 144 of file Polynomial.cpp.

ID_INLINE int idPolynomial::GetRoots1 ( float  a,
float  b,
float roots 
)
static

Definition at line 459 of file Polynomial.h.

ID_INLINE int idPolynomial::GetRoots2 ( float  a,
float  b,
float  c,
float roots 
)
static

Definition at line 465 of file Polynomial.h.

ID_INLINE int idPolynomial::GetRoots3 ( float  a,
float  b,
float  c,
float  d,
float roots 
)
static

Definition at line 488 of file Polynomial.h.

ID_INLINE int idPolynomial::GetRoots4 ( float  a,
float  b,
float  c,
float  d,
float  e,
float roots 
)
static

Definition at line 543 of file Polynomial.h.

ID_INLINE float idPolynomial::GetValue ( const float  x) const

Definition at line 410 of file Polynomial.h.

ID_INLINE idComplex idPolynomial::GetValue ( const idComplex x) const

Definition at line 421 of file Polynomial.h.

int idPolynomial::Laguer ( const idComplex coef,
const int  degree,
idComplex r 
) const
private

Definition at line 39 of file Polynomial.cpp.

ID_INLINE bool idPolynomial::operator!= ( const idPolynomial p) const

Definition at line 387 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::operator* ( const float  s) const

Definition at line 258 of file Polynomial.h.

ID_INLINE idPolynomial & idPolynomial::operator*= ( const float  s)

Definition at line 337 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::operator+ ( const idPolynomial p) const

Definition at line 188 of file Polynomial.h.

ID_INLINE idPolynomial & idPolynomial::operator+= ( const idPolynomial p)

Definition at line 285 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::operator- ( ) const

Definition at line 169 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::operator- ( const idPolynomial p) const

Definition at line 223 of file Polynomial.h.

ID_INLINE idPolynomial & idPolynomial::operator-= ( const idPolynomial p)

Definition at line 311 of file Polynomial.h.

ID_INLINE idPolynomial idPolynomial::operator/ ( const float  s) const

Definition at line 272 of file Polynomial.h.

ID_INLINE idPolynomial & idPolynomial::operator/= ( const float  s)

Definition at line 348 of file Polynomial.h.

ID_INLINE idPolynomial & idPolynomial::operator= ( const idPolynomial p)

Definition at line 180 of file Polynomial.h.

ID_INLINE bool idPolynomial::operator== ( const idPolynomial p) const

Definition at line 383 of file Polynomial.h.

ID_INLINE float idPolynomial::operator[] ( int  index) const

Definition at line 159 of file Polynomial.h.

ID_INLINE float & idPolynomial::operator[] ( int  index)

Definition at line 164 of file Polynomial.h.

ID_INLINE void idPolynomial::Resize ( int  d,
bool  keep 
)
private

Definition at line 611 of file Polynomial.h.

void idPolynomial::Test ( void  )
static

Definition at line 188 of file Polynomial.cpp.

ID_INLINE const float * idPolynomial::ToFloatPtr ( void  ) const

Definition at line 603 of file Polynomial.h.

ID_INLINE float * idPolynomial::ToFloatPtr ( void  )

Definition at line 607 of file Polynomial.h.

const char * idPolynomial::ToString ( int  precision = 2) const

Definition at line 179 of file Polynomial.cpp.

ID_INLINE void idPolynomial::Zero ( void  )

Definition at line 391 of file Polynomial.h.

ID_INLINE void idPolynomial::Zero ( int  d)

Definition at line 395 of file Polynomial.h.

Member Data Documentation

int idPolynomial::allocated
private

Definition at line 97 of file Polynomial.h.

float* idPolynomial::coefficient
private

Definition at line 98 of file Polynomial.h.

int idPolynomial::degree
private

Definition at line 96 of file Polynomial.h.


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