Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Friends
Matrix Class Reference

#include <matrix.h>

List of all members.

Public Member Functions

FLOAT det ()
Matrix extractCols (std::vector< int > idx)
void eye ()
void getData (FLOAT *val_, int32_t i1=0, int32_t j1=0, int32_t i2=-1, int32_t j2=-1)
Matrix getMat (int32_t i1, int32_t j1, int32_t i2=-1, int32_t j2=-1)
bool inv ()
FLOAT l2norm ()
bool lu (int32_t *idx, FLOAT &d, FLOAT eps=1e-20)
 Matrix ()
 Matrix (const int32_t m, const int32_t n)
 Matrix (const int32_t m, const int32_t n, const FLOAT *val_)
 Matrix (const Matrix &M)
FLOAT mean ()
Matrix operator* (const Matrix &M)
Matrix operator* (const FLOAT &s)
Matrix operator+ (const Matrix &M)
Matrix operator- (const Matrix &M)
Matrix operator- ()
Matrix operator/ (const Matrix &M)
Matrix operator/ (const FLOAT &s)
Matrixoperator= (const Matrix &M)
Matrix operator~ ()
void setDiag (FLOAT s, int32_t i1=0, int32_t i2=-1)
void setMat (const Matrix &M, const int32_t i, const int32_t j)
void setVal (FLOAT s, int32_t i1=0, int32_t j1=0, int32_t i2=-1, int32_t j2=-1)
bool solve (const Matrix &M, FLOAT eps=1e-20)
void svd (Matrix &U, Matrix &W, Matrix &V)
void zero ()
 ~Matrix ()

Static Public Member Functions

static Matrix cross (const Matrix &a, const Matrix &b)
static Matrix diag (const Matrix &M)
static Matrix eye (const int32_t m)
static Matrix inv (const Matrix &M)
static Matrix reshape (const Matrix &M, int32_t m, int32_t n)
static Matrix rotMatX (const FLOAT &angle)
static Matrix rotMatY (const FLOAT &angle)
static Matrix rotMatZ (const FLOAT &angle)

Public Attributes

int32_t m
int32_t n
FLOAT ** val

Private Member Functions

void allocateMemory (const int32_t m_, const int32_t n_)
FLOAT pythag (FLOAT a, FLOAT b)
void releaseMemory ()

Friends

std::ostream & operator<< (std::ostream &out, const Matrix &M)

Detailed Description

Definition at line 49 of file matrix.h.


Constructor & Destructor Documentation

Definition at line 37 of file matrix.cpp.

Matrix::Matrix ( const int32_t  m,
const int32_t  n 
)

Definition at line 43 of file matrix.cpp.

Matrix::Matrix ( const int32_t  m,
const int32_t  n,
const FLOAT val_ 
)

Definition at line 47 of file matrix.cpp.

Matrix::Matrix ( const Matrix M)

Definition at line 55 of file matrix.cpp.

Definition at line 61 of file matrix.cpp.


Member Function Documentation

void Matrix::allocateMemory ( const int32_t  m_,
const int32_t  n_ 
) [private]

Definition at line 823 of file matrix.cpp.

Matrix Matrix::cross ( const Matrix a,
const Matrix b 
) [static]

Definition at line 363 of file matrix.cpp.

Definition at line 397 of file matrix.cpp.

Matrix Matrix::diag ( const Matrix M) [static]

Definition at line 161 of file matrix.cpp.

Matrix Matrix::extractCols ( std::vector< int >  idx)

Definition at line 137 of file matrix.cpp.

Matrix Matrix::eye ( const int32_t  m) [static]

Definition at line 146 of file matrix.cpp.

void Matrix::eye ( )

Definition at line 153 of file matrix.cpp.

void Matrix::getData ( FLOAT val_,
int32_t  i1 = 0,
int32_t  j1 = 0,
int32_t  i2 = -1,
int32_t  j2 = -1 
)

Definition at line 78 of file matrix.cpp.

Matrix Matrix::getMat ( int32_t  i1,
int32_t  j1,
int32_t  i2 = -1,
int32_t  j2 = -1 
)

Definition at line 87 of file matrix.cpp.

Matrix Matrix::inv ( const Matrix M) [static]

Definition at line 375 of file matrix.cpp.

bool Matrix::inv ( )

Definition at line 386 of file matrix.cpp.

Definition at line 347 of file matrix.cpp.

bool Matrix::lu ( int32_t *  idx,
FLOAT d,
FLOAT  eps = 1e-20 
)

Definition at line 511 of file matrix.cpp.

Definition at line 355 of file matrix.cpp.

Matrix Matrix::operator* ( const Matrix M)

Definition at line 260 of file matrix.cpp.

Matrix Matrix::operator* ( const FLOAT s)

Definition at line 276 of file matrix.cpp.

Matrix Matrix::operator+ ( const Matrix M)

Definition at line 230 of file matrix.cpp.

Matrix Matrix::operator- ( const Matrix M)

Definition at line 245 of file matrix.cpp.

Matrix Matrix::operator- ( )

Definition at line 331 of file matrix.cpp.

Matrix Matrix::operator/ ( const Matrix M)

Definition at line 284 of file matrix.cpp.

Matrix Matrix::operator/ ( const FLOAT s)

Definition at line 319 of file matrix.cpp.

Matrix & Matrix::operator= ( const Matrix M)

Definition at line 65 of file matrix.cpp.

Definition at line 339 of file matrix.cpp.

FLOAT Matrix::pythag ( FLOAT  a,
FLOAT  b 
) [inline, private]

Definition at line 842 of file matrix.cpp.

void Matrix::releaseMemory ( ) [private]

Definition at line 835 of file matrix.cpp.

Matrix Matrix::reshape ( const Matrix M,
int32_t  m,
int32_t  n 
) [static]

Definition at line 177 of file matrix.cpp.

Matrix Matrix::rotMatX ( const FLOAT angle) [static]

Definition at line 194 of file matrix.cpp.

Matrix Matrix::rotMatY ( const FLOAT angle) [static]

Definition at line 206 of file matrix.cpp.

Matrix Matrix::rotMatZ ( const FLOAT angle) [static]

Definition at line 218 of file matrix.cpp.

void Matrix::setDiag ( FLOAT  s,
int32_t  i1 = 0,
int32_t  i2 = -1 
)

Definition at line 127 of file matrix.cpp.

void Matrix::setMat ( const Matrix M,
const int32_t  i,
const int32_t  j 
)

Definition at line 103 of file matrix.cpp.

void Matrix::setVal ( FLOAT  s,
int32_t  i1 = 0,
int32_t  j1 = 0,
int32_t  i2 = -1,
int32_t  j2 = -1 
)

Definition at line 115 of file matrix.cpp.

bool Matrix::solve ( const Matrix M,
FLOAT  eps = 1e-20 
)

Definition at line 414 of file matrix.cpp.

void Matrix::svd ( Matrix U,
Matrix W,
Matrix V 
)

Definition at line 576 of file matrix.cpp.

void Matrix::zero ( )

Definition at line 133 of file matrix.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Matrix M 
) [friend]

Member Data Documentation

int32_t Matrix::m

Definition at line 123 of file matrix.h.

int32_t Matrix::n

Definition at line 123 of file matrix.h.

Definition at line 122 of file matrix.h.


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


dlut_libvo
Author(s): Zhuang Yan
autogenerated on Thu Jun 6 2019 20:03:29