SymMatExpr::SymMatExpr()
Constructor of a symmetric matrix expression.
Synopsis
SymMatExpr()
SymMatExpr::SymMatExpr()
Constructor of a symmetric matrix expression with one term.
Synopsis
SymMatExpr(const SymMatrix &mat, double coeff)
Arguments
mat
: symmetric matrix of the added term.
coeff
: optional, coefficent for the added term. Its default value is 1.0.
SymMatExpr::AddSymMatExpr()
Add a symmetric matrix expression to self.
Synopsis
void AddSymMatExpr(const SymMatExpr &expr, double mult)
Arguments
expr
: symmetric matrix expression to be added.
mult
: optional, constant multiplier, default value is 1.0.
SymMatExpr::AddTerm()
Add a term to symmetric matrix expression object.
Synopsis
bool AddTerm(const SymMatrix &mat, double coeff)
Arguments
mat
: symmetric matrix of the new term.
coeff
: coefficient of the new term.Return
True if the term is added successfully.
SymMatExpr::AddTerms()
Add multiple terms to expression object.
Synopsis
int AddTerms(
const SymMatrixArray &mats,
double *pCoeff,
int len)
Arguments
mats
: symmetric matrix array object for added terms.
pCoeff
: coefficient array for added terms.
len
: length of coefficient array.Return
Number of added terms. If negative, fail to add one of terms.
SymMatExpr::Clone()
Deep copy symmetric matrix expression object.
Synopsis
SymMatExpr Clone()
Return
cloned expression object.
SymMatExpr::GetCoeff()
Get coefficient of the i-th term in expression object.
Synopsis
double GetCoeff(int i)
Arguments
i
: index of the term.Return
coefficient of the i-th term.
SymMatExpr::GetDim()
Get dimension of symmetric matrix in expression.
Synopsis
int GetDim()
Return
dimension of symmetric matrix.
SymMatExpr::GetSymMat()
Get symmetric matrix of the i-th term in expression object.
Synopsis
SymMatrix &GetSymMat(int i)
Arguments
i
: index of the term.Return
the symmetric matrix of the i-th term.
SymMatExpr::operator*=()
Multiply a constant to self.
Synopsis
void operator*=(double c)
Arguments
c
: constant multiplier.
SymMatExpr::operator*()
Multiply constant and return new expression.
Synopsis
SymMatExpr operator*(double c)
Arguments
c
: constant multiplier.Return
result expression.
SymMatExpr::operator+=()
Add a symmetric matrix expression to self.
Synopsis
void operator+=(const SymMatExpr &expr)
Arguments
expr
: symmetric matrix expression to be added.
SymMatExpr::operator+()
Add expression and return new expression.
Synopsis
SymMatExpr operator+(const SymMatExpr &other)
Arguments
other
: other expression to add.Return
result expression.
SymMatExpr::operator-=()
Substract a symmetric matrix expression from self.
Synopsis
void operator-=(const SymMatExpr &expr)
Arguments
expr
: symmetric matrix to be substracted.
SymMatExpr::operator-()
Substract expression and return new expression.
Synopsis
SymMatExpr operator-(const SymMatExpr &other)
Arguments
other
: other expression to substract.Return
result expression.
SymMatExpr::Remove()
Remove i-th term from expression object.
Synopsis
void Remove(int idx)
Arguments
idx
: index of the term to be removed.
SymMatExpr::Remove()
Remove the term associated with the symmetric matrix.
Synopsis
void Remove(const SymMatrix &mat)
Arguments
mat
: a symmetric matrix whose term should be removed.
SymMatExpr::Reserve()
Reserve capacity to contain at least n items.
Synopsis
void Reserve(size_t n)
Arguments
n
: minimum capacity for expression object.
SymMatExpr::SetCoeff()
Set coefficient for the i-th term in expression object.
Synopsis
void SetCoeff(int i, double val)
Arguments
i
: index of the term.
val
: coefficient of the term.
SymMatExpr::Size()
Get number of terms in expression.
Synopsis
size_t Size()
Return
number of terms.