Wondercoll
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions
cxmathfuncs.cpp File Reference
#include "_cxcore.h"

Classes

union  DBLINT
 

Macros

#define ICV_MATH_BLOCK_SIZE   256
 
#define _CV_SQRT_MAGIC   0xbe6f0000
 
#define _CV_SQRT_MAGIC_DBL   CV_BIG_UINT(0xbfcd460000000000)
 
#define _CV_ATAN_CF0   (-15.8131890796f)
 
#define _CV_ATAN_CF1   (61.0941945596f)
 
#define _CV_ATAN_CF2   0.f /*(-0.140500406322f)*/
 
#define ICV_DEF_SQR_MAGNITUDE_FUNC(flavor, arrtype, magtype)
 
#define EXPTAB_SCALE   6
 
#define EXPTAB_MASK   ((1 << EXPTAB_SCALE) - 1)
 
#define EXPPOLY_32F_A0   .9670371139572337719125840413672004409288e-2
 
#define EXPPOLY(x)   (((((x) + EXPPOLY_32F_A1)*(x) + EXPPOLY_32F_A2)*(x) + EXPPOLY_32F_A3)*(x) + EXPPOLY_32F_A4)
 
#define EXPPOLY(x)   (((((A0*(x) + A1)*(x) + A2)*(x) + A3)*(x) + A4)*(x) + A5)
 
#define LOGTAB_SCALE   8
 
#define LOGTAB_MASK   ((1 << LOGTAB_SCALE) - 1)
 
#define LOGTAB_MASK2   ((1 << (20 - LOGTAB_SCALE)) - 1)
 
#define LOGTAB_MASK2_32F   ((1 << (23 - LOGTAB_SCALE)) - 1)
 
#define LOGTAB_TRANSLATE(x, h)   (((x) - 1.)*icvLogTab[(h)+1])
 
#define LOGPOLY(x, k)   ((x)+=shift[k],((A0*(x) + A1)*(x) + A2)*(x))
 
#define LOGPOLY(x, k)
 
#define ICV_DEF_IPOW_OP(flavor, arrtype, worktype, cast_macro)
 
#define icvIPow_8s   0
 

Typedefs

typedef CvStatus(CV_STDCALLCvIPowFunc )(const void *src, void *dst, int len, int power)
 
typedef CvStatus(CV_STDCALLCvSqrtFunc )(const void *src, void *dst, int len)
 

Functions

CV_IMPL float cvFastArctan (float y, float x)
 
 IPCVAPI_IMPL (CvStatus, icvFastArctan_32f,(const float *__y, const float *__x, float *angle, int len),(__y, __x, angle, len))
 
CV_IMPL float cvCbrt (float value)
 
 IPCVAPI_IMPL (CvStatus, icvInvSqrt_32f,(const float *src, float *dst, int len),(src, dst, len))
 
 IPCVAPI_IMPL (CvStatus, icvSqrt_32f,(const float *src, float *dst, int len),(src, dst, len))
 
 IPCVAPI_IMPL (CvStatus, icvSqrt_64f,(const double *src, double *dst, int len),(src, dst, len))
 
 IPCVAPI_IMPL (CvStatus, icvInvSqrt_64f,(const double *src, double *dst, int len),(src, dst, len))
 
CV_IMPL void cvCartToPolar (const CvArr *xarr, const CvArr *yarr, CvArr *magarr, CvArr *anglearr, int angle_in_degrees)
 
CV_IMPL void cvPolarToCart (const CvArr *magarr, const CvArr *anglearr, CvArr *xarr, CvArr *yarr, int angle_in_degrees)
 
 IPCVAPI_IMPL (CvStatus, icvExp_32f,(const float *_x, float *y, int n),(_x, y, n))
 
 IPCVAPI_IMPL (CvStatus, icvExp_64f,(const double *_x, double *y, int n),(_x, y, n))
 
CV_IMPL void cvExp (const CvArr *srcarr, CvArr *dstarr)
 
 IPCVAPI_IMPL (CvStatus, icvLog_32f,(const float *_x, float *y, int n),(_x, y, n))
 
 IPCVAPI_IMPL (CvStatus, icvLog_64f,(const double *x, double *y, int n),(x, y, n))
 
CV_IMPL void cvLog (const CvArr *srcarr, CvArr *dstarr)
 
CV_IMPL void cvPow (const CvArr *srcarr, CvArr *dstarr, double power)
 
 IPCVAPI_IMPL (CvStatus, icvCheckArray_32f_C1R,(const float *src, int srcstep, CvSize size, int flags, double min_val, double max_val),(src, srcstep, size, flags, min_val, max_val))
 
 IPCVAPI_IMPL (CvStatus, icvCheckArray_64f_C1R,(const double *src, int srcstep, CvSize size, int flags, double min_val, double max_val),(src, srcstep, size, flags, min_val, max_val))
 
CV_IMPL int cvCheckArr (const CvArr *arr, int flags, double minVal, double maxVal)
 

Macro Definition Documentation

#define _CV_ATAN_CF0   (-15.8131890796f)
#define _CV_ATAN_CF1   (61.0941945596f)
#define _CV_ATAN_CF2   0.f /*(-0.140500406322f)*/
#define _CV_SQRT_MAGIC   0xbe6f0000
#define _CV_SQRT_MAGIC_DBL   CV_BIG_UINT(0xbfcd460000000000)
#define EXPPOLY (   x)    (((((x) + EXPPOLY_32F_A1)*(x) + EXPPOLY_32F_A2)*(x) + EXPPOLY_32F_A3)*(x) + EXPPOLY_32F_A4)
#define EXPPOLY (   x)    (((((A0*(x) + A1)*(x) + A2)*(x) + A3)*(x) + A4)*(x) + A5)
#define EXPPOLY_32F_A0   .9670371139572337719125840413672004409288e-2
#define EXPTAB_MASK   ((1 << EXPTAB_SCALE) - 1)
#define EXPTAB_SCALE   6
#define ICV_DEF_IPOW_OP (   flavor,
  arrtype,
  worktype,
  cast_macro 
)
Value:
static CvStatus CV_STDCALL \
icvIPow_##flavor( const arrtype* src, arrtype* dst, int len, int power ) \
{ \
int i; \
for( i = 0; i < len; i++ ) \
{ \
worktype a = 1, b = src[i]; \
int p = power; \
while( p > 1 ) \
{ \
if( p & 1 ) \
a *= b; \
b *= b; \
p >>= 1; \
} \
\
a *= b; \
dst[i] = cast_macro(a); \
} \
\
return CV_OK; \
}
#define ICV_DEF_SQR_MAGNITUDE_FUNC (   flavor,
  arrtype,
  magtype 
)
#define ICV_MATH_BLOCK_SIZE   256
#define icvIPow_8s   0
#define LOGPOLY (   x,
  k 
)    ((x)+=shift[k],((A0*(x) + A1)*(x) + A2)*(x))
#define LOGPOLY (   x,
  k 
)
Value:
((x)+=shift[k], (xq) = (x)*(x),\
((A0*(xq) + A2)*(xq) + A4)*(xq) + ((A1*(xq) + A3)*(xq) + A5)*(x))
#define LOGTAB_MASK   ((1 << LOGTAB_SCALE) - 1)
#define LOGTAB_MASK2   ((1 << (20 - LOGTAB_SCALE)) - 1)
#define LOGTAB_MASK2_32F   ((1 << (23 - LOGTAB_SCALE)) - 1)
#define LOGTAB_SCALE   8
#define LOGTAB_TRANSLATE (   x,
 
)    (((x) - 1.)*icvLogTab[(h)+1])

Typedef Documentation

typedef CvStatus(CV_STDCALL * CvIPowFunc)(const void *src, void *dst, int len, int power)
typedef CvStatus(CV_STDCALL * CvSqrtFunc)(const void *src, void *dst, int len)

Function Documentation

CV_IMPL void cvCartToPolar ( const CvArr xarr,
const CvArr yarr,
CvArr magarr,
CvArr anglearr,
int  angle_in_degrees 
)
CV_IMPL float cvCbrt ( float  value)
CV_IMPL int cvCheckArr ( const CvArr arr,
int  flags,
double  minVal,
double  maxVal 
)
CV_IMPL void cvExp ( const CvArr srcarr,
CvArr dstarr 
)
CV_IMPL float cvFastArctan ( float  y,
float  x 
)
CV_IMPL void cvLog ( const CvArr srcarr,
CvArr dstarr 
)
CV_IMPL void cvPolarToCart ( const CvArr magarr,
const CvArr anglearr,
CvArr xarr,
CvArr yarr,
int  angle_in_degrees 
)
CV_IMPL void cvPow ( const CvArr srcarr,
CvArr dstarr,
double  power 
)
IPCVAPI_IMPL ( CvStatus  ,
icvFastArctan_32f  ,
(const float *__y, const float *__x, float *angle, int len ,
(__y, __x, angle, len  
)
IPCVAPI_IMPL ( CvStatus  ,
icvInvSqrt_32f  ,
(const float *src, float *dst, int len ,
(src, dst, len  
)
IPCVAPI_IMPL ( CvStatus  ,
icvSqrt_32f  ,
(const float *src, float *dst, int len ,
(src, dst, len  
)
IPCVAPI_IMPL ( CvStatus  ,
icvSqrt_64f  ,
(const double *src, double *dst, int len ,
(src, dst, len  
)
IPCVAPI_IMPL ( CvStatus  ,
icvInvSqrt_64f  ,
(const double *src, double *dst, int len ,
(src, dst, len  
)
IPCVAPI_IMPL ( CvStatus  ,
icvExp_32f  ,
(const float *_x, float *y, int n ,
(_x, y, n  
)
IPCVAPI_IMPL ( CvStatus  ,
icvExp_64f  ,
(const double *_x, double *y, int n ,
(_x, y, n  
)
IPCVAPI_IMPL ( CvStatus  ,
icvLog_32f  ,
(const float *_x, float *y, int n ,
(_x, y, n  
)
IPCVAPI_IMPL ( CvStatus  ,
icvLog_64f  ,
(const double *x, double *y, int n ,
(x, y, n  
)
IPCVAPI_IMPL ( CvStatus  ,
icvCheckArray_32f_C1R  ,
(const float *src, int srcstep, CvSize size, int flags, double min_val, double max_val ,
(src, srcstep, size, flags, min_val, max_val  
)