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

Macros

#define ICV_DEF_TRANSP_INP_CASE_C1(arrtype, len)
 
#define ICV_DEF_TRANSP_INP_CASE_C3(arrtype, len)
 
#define ICV_DEF_TRANSP_INP_CASE_C4(arrtype, len)
 
#define ICV_DEF_TRANSP_CASE_C1(arrtype)
 
#define ICV_DEF_TRANSP_CASE_C3(arrtype)
 
#define ICV_DEF_TRANSP_CASE_C4(arrtype)
 
#define ICV_DEF_TRANSP_INP_FUNC(flavor, arrtype, cn)
 
#define ICV_DEF_TRANSP_FUNC(flavor, arrtype, cn)
 
#define arrtype   float
 
#define temptype   double
 
#define ICV_DEF_LU_DECOMP_FUNC(flavor, arrtype)
 
#define ICV_DEF_LU_BACK_FUNC(flavor, arrtype)
 
#define det2(m)   (m(0,0)*m(1,1) - m(0,1)*m(1,0))
 
#define det3(m)
 
#define Mf(y, x)   ((float*)(m + y*step))[x]
 
#define Md(y, x)   ((double*)(m + y*step))[x]
 
#define Sf(y, x)   ((float*)(srcdata + y*srcstep))[x]
 
#define Sd(y, x)   ((double*)(srcdata + y*srcstep))[x]
 
#define Df(y, x)   ((float*)(dstdata + y*dststep))[x]
 
#define Dd(y, x)   ((double*)(dstdata + y*dststep))[x]
 
#define bf(y)   ((float*)(bdata + y*src2step))[0]
 
#define bd(y)   ((double*)(bdata + y*src2step))[0]
 

Typedefs

typedef CvStatus(CV_STDCALLCvLUDecompFunc )(double *A, int stepA, CvSize sizeA, void *B, int stepB, CvSize sizeB, double *det)
 
typedef CvStatus(CV_STDCALLCvLUBackFunc )(double *A, int stepA, CvSize sizeA, void *B, int stepB, CvSize sizeB)
 

Functions

CV_IMPL void cvSetIdentity (CvArr *array, CvScalar value)
 
CV_IMPL CvScalar cvTrace (const CvArr *array)
 
CV_IMPL void cvTranspose (const CvArr *srcarr, CvArr *dstarr)
 
CV_IMPL void cvCompleteSymm (CvMat *matrix, int LtoR)
 
CV_IMPL double cvDet (const CvArr *arr)
 
CV_IMPL double cvInvert (const CvArr *srcarr, CvArr *dstarr, int method)
 
CV_IMPL int cvSolve (const CvArr *A, const CvArr *b, CvArr *x, int method)
 
CV_IMPL void cvCrossProduct (const CvArr *srcAarr, const CvArr *srcBarr, CvArr *dstarr)
 
CV_IMPL void cvCalcPCA (const CvArr *data_arr, CvArr *avg_arr, CvArr *eigenvals, CvArr *eigenvects, int flags)
 
CV_IMPL void cvProjectPCA (const CvArr *data_arr, const CvArr *avg_arr, const CvArr *eigenvects, CvArr *result_arr)
 
CV_IMPL void cvBackProjectPCA (const CvArr *proj_arr, const CvArr *avg_arr, const CvArr *eigenvects, CvArr *result_arr)
 

Macro Definition Documentation

#define arrtype   float
#define bd (   y)    ((double*)(bdata + y*src2step))[0]
#define bf (   y)    ((float*)(bdata + y*src2step))[0]
#define Dd (   y,
  x 
)    ((double*)(dstdata + y*dststep))[x]
#define det2 (   m)    (m(0,0)*m(1,1) - m(0,1)*m(1,0))
#define det3 (   m)
Value:
(m(0,0)*(m(1,1)*m(2,2) - m(1,2)*m(2,1)) - \
m(0,1)*(m(1,0)*m(2,2) - m(1,2)*m(2,0)) + \
m(0,2)*(m(1,0)*m(2,1) - m(1,1)*m(2,0)))
#define Df (   y,
  x 
)    ((float*)(dstdata + y*dststep))[x]
#define ICV_DEF_LU_BACK_FUNC (   flavor,
  arrtype 
)
#define ICV_DEF_LU_DECOMP_FUNC (   flavor,
  arrtype 
)
#define ICV_DEF_TRANSP_CASE_C1 (   arrtype)
#define ICV_DEF_TRANSP_CASE_C3 (   arrtype)
Value:
{ \
size.width *= 3; \
srcstep /= sizeof(src[0]); \
dststep /= sizeof(dst[0]); \
for( ; size.height--; src+=srcstep, dst+=3 )\
{ \
int x; \
arrtype* dst1 = dst; \
for( x = 0; x < size.width; x += 3, \
dst1 += dststep ) \
{ \
arrtype t0 = src[x]; \
arrtype t1 = src[x + 1]; \
arrtype t2 = src[x + 2]; \
\
dst1[0] = t0; \
dst1[1] = t1; \
dst1[2] = t2; \
} \
} \
}
#define ICV_DEF_TRANSP_CASE_C4 (   arrtype)
Value:
{ \
size.width *= 4; \
srcstep /= sizeof(src[0]); \
dststep /= sizeof(dst[0]); \
for( ; size.height--; src+=srcstep, dst+=4 )\
{ \
int x; \
arrtype* dst1 = dst; \
for( x = 0; x < size.width; x += 4, \
dst1 += dststep ) \
{ \
arrtype t0 = src[x]; \
arrtype t1 = src[x + 1]; \
\
dst1[0] = t0; \
dst1[1] = t1; \
\
t0 = src[x + 2]; \
t1 = src[x + 3]; \
\
dst1[2] = t0; \
dst1[3] = t1; \
} \
} \
}
#define ICV_DEF_TRANSP_FUNC (   flavor,
  arrtype,
  cn 
)
Value:
static CvStatus CV_STDCALL \
icvTranspose_##flavor( const arrtype* src, int srcstep, \
{ \
ICV_DEF_TRANSP_CASE_C##cn( arrtype ) \
return CV_OK; \
}
#define ICV_DEF_TRANSP_INP_CASE_C1 (   arrtype,
  len 
)
Value:
{ \
arrtype* arr1 = arr; \
step /= sizeof(arr[0]); \
\
while( --len ) \
{ \
arr += step, arr1++; \
arrtype* arr2 = arr; \
arrtype* arr3 = arr1; \
\
do \
{ \
arrtype t0 = arr2[0]; \
arrtype t1 = arr3[0]; \
arr2[0] = t1; \
arr3[0] = t0; \
\
arr2++; \
arr3 += step; \
} \
while( arr2 != arr3 ); \
} \
}
#define ICV_DEF_TRANSP_INP_CASE_C3 (   arrtype,
  len 
)
Value:
{ \
arrtype* arr1 = arr; \
int y; \
step /= sizeof(arr[0]); \
for( y = 1; y < len; y++ ) \
{ \
arr += step, arr1 += 3; \
arrtype* arr2 = arr; \
arrtype* arr3 = arr1; \
for( ; arr2!=arr3; arr2+=3, \
arr3+=step )\
{ \
arrtype t0 = arr2[0]; \
arrtype t1 = arr3[0]; \
arr2[0] = t1; \
arr3[0] = t0; \
t0 = arr2[1]; \
t1 = arr3[1]; \
arr2[1] = t1; \
arr3[1] = t0; \
t0 = arr2[2]; \
t1 = arr3[2]; \
arr2[2] = t1; \
arr3[2] = t0; \
} \
} \
}
#define ICV_DEF_TRANSP_INP_CASE_C4 (   arrtype,
  len 
)
#define ICV_DEF_TRANSP_INP_FUNC (   flavor,
  arrtype,
  cn 
)
Value:
static CvStatus CV_STDCALL \
icvTranspose_##flavor( arrtype* arr, int step, CvSize size )\
{ \
assert( size.width == size.height ); \
\
ICV_DEF_TRANSP_INP_CASE_C##cn( arrtype, size.width ) \
return CV_OK; \
}
#define Md (   y,
  x 
)    ((double*)(m + y*step))[x]
#define Mf (   y,
  x 
)    ((float*)(m + y*step))[x]
#define Sd (   y,
  x 
)    ((double*)(srcdata + y*srcstep))[x]
#define Sf (   y,
  x 
)    ((float*)(srcdata + y*srcstep))[x]
#define temptype   double

Typedef Documentation

typedef CvStatus(CV_STDCALL * CvLUBackFunc)(double *A, int stepA, CvSize sizeA, void *B, int stepB, CvSize sizeB)
typedef CvStatus(CV_STDCALL * CvLUDecompFunc)(double *A, int stepA, CvSize sizeA, void *B, int stepB, CvSize sizeB, double *det)

Function Documentation

CV_IMPL void cvBackProjectPCA ( const CvArr proj_arr,
const CvArr avg_arr,
const CvArr eigenvects,
CvArr result_arr 
)
CV_IMPL void cvCalcPCA ( const CvArr data_arr,
CvArr avg_arr,
CvArr eigenvals,
CvArr eigenvects,
int  flags 
)
CV_IMPL void cvCompleteSymm ( CvMat matrix,
int  LtoR 
)
CV_IMPL void cvCrossProduct ( const CvArr srcAarr,
const CvArr srcBarr,
CvArr dstarr 
)
CV_IMPL double cvDet ( const CvArr arr)
CV_IMPL double cvInvert ( const CvArr srcarr,
CvArr dstarr,
int  method 
)
CV_IMPL void cvProjectPCA ( const CvArr data_arr,
const CvArr avg_arr,
const CvArr eigenvects,
CvArr result_arr 
)
CV_IMPL void cvSetIdentity ( CvArr array,
CvScalar  value 
)
CV_IMPL int cvSolve ( const CvArr A,
const CvArr b,
CvArr x,
int  method 
)
CV_IMPL CvScalar cvTrace ( const CvArr array)
CV_IMPL void cvTranspose ( const CvArr srcarr,
CvArr dstarr 
)