PsdExpr::PsdExpr()
Constructor of a PSD expression with a constant.
Synopsis
PsdExpr(double constant)
Arguments
constant
: constant value in PSD expression object.
PsdExpr::PsdExpr()
Constructor of a PSD expression with one term.
Synopsis
PsdExpr(const Var &var, double coeff)
Arguments
var
: variable for the added term.
coeff
: coefficent for the added term.
PsdExpr::PsdExpr()
Constructor of a PSD expression with a linear expression.
Synopsis
PsdExpr(const Expr &expr)
Arguments
expr
: input linear expression.
PsdExpr::PsdExpr()
Constructor of a PSD expression with a MExpression object.
Synopsis
PsdExpr(const MExpression &expr)
Arguments
expr
: input MExpression object.
PsdExpr::PsdExpr()
Constructor of a PSD expression with one term.
Synopsis
PsdExpr(const PsdVar &var, const SymMatrix &mat)
Arguments
var
: PSD variable for the added term.
mat
: coefficient matrix for the added term.
PsdExpr::PsdExpr()
Constructor of a PSD expression with one term.
Synopsis
PsdExpr(const PsdVar &var, const SymMatExpr &expr)
Arguments
var
: PSD variable for the added term.
expr
: coefficient expression of symmetric matrices for the added term.
PsdExpr::AddConstant()
Add constant to the PSD expression.
Synopsis
void AddConstant(double constant)
Arguments
constant
: value to be added.
PsdExpr::AddLinExpr()
Add a linear expression to self.
Synopsis
void AddLinExpr(const Expr &expr, double mult)
Arguments
expr
: linear expression to be added.
mult
: optional, constant multiplier, default value is 1.0.
PsdExpr::AddMExpr()
Add MExpression to PsdExpr object.
Synopsis
void AddMExpr(const MExpression &expr, double mult)
Arguments
expr
: MExpression object.
mult
: the multiplier of MExpression, default value is 1.0.
PsdExpr::AddPsdExpr()
Add a PSD expression to self.
Synopsis
void AddPsdExpr(const PsdExpr &expr, double mult)
Arguments
expr
: PSD expression to be added.
mult
: optional, constant multiplier, default value is 1.0.
PsdExpr::AddTerm()
Add a linear term to PSD expression object.
Synopsis
void AddTerm(const Var &var, double coeff)
Arguments
var
: variable of new linear term.
coeff
: coefficient of new linear term.
PsdExpr::AddTerm()
Add a PSD term to PSD expression object.
Synopsis
void AddTerm(const PsdVar &var, const SymMatrix &mat)
Arguments
var
: PSD variable of new PSD term.
mat
: coefficient matrix of new PSD term.
PsdExpr::AddTerm()
Add a PSD term to PSD expression object.
Synopsis
void AddTerm(const PsdVar &var, const SymMatExpr &expr)
Arguments
var
: PSD variable of new PSD term.
expr
: coefficient expression of symmetric matrices of new PSD term.
PsdExpr::AddTerms()
Add linear terms to PSD expression object.
Synopsis
int AddTerms(
const VarArray &vars,
double *pCoeff,
int len)
Arguments
vars
: variables for added linear terms.
pCoeff
: coefficient array for added linear terms.
len
: length of coefficient array.Return
number of added linear terms.
PsdExpr::AddTerms()
Add PSD terms to PSD expression object.
Synopsis
int AddTerms(const PsdVarArray &vars, const SymMatrixArray &mats)
Arguments
vars
: PSD variables for added PSD terms.
mats
: coefficient matrixes for added PSD terms.Return
number of added PSD terms.
PsdExpr::Clone()
Deep copy PSD expression object.
Synopsis
PsdExpr Clone()
Return
cloned PSD expression object.
PsdExpr::Evaluate()
evaluate PSD expression after solving
Synopsis
double Evaluate()
Return
value of PSD expression
PsdExpr::GetCoeff()
Get coefficient from the i-th term in PSD expression.
Synopsis
SymMatExpr &GetCoeff(int i)
Arguments
i
: index of the PSD term.Return
coefficient of the i-th PSD term in PSD expression object.
PsdExpr::GetConstant()
Get constant in PSD expression.
Synopsis
double GetConstant()
Return
constant in PSD expression.
PsdExpr::GetLinExpr()
Get linear expression in PSD expression.
Synopsis
Expr &GetLinExpr()
Return
linear expression object.
PsdExpr::GetPsdVar()
Get the PSD variable from the i-th term in PSD expression.
Synopsis
PsdVar &GetPsdVar(int i)
Arguments
i
: index of the term.Return
the first variable of the i-th term in PSD expression object.
PsdExpr::operator*=()
Multiply a constant to self.
Synopsis
void operator*=(double c)
Arguments
c
: constant multiplier.
PsdExpr::operator*()
Multiply constant and return new expression.
Synopsis
PsdExpr operator*(double c)
Arguments
c
: constant multiplier.Return
result expression.
PsdExpr::operator+=()
Add an expression to self.
Synopsis
void operator+=(const PsdExpr &expr)
Arguments
expr
: expression to be added.
PsdExpr::operator+()
Add expression and return new expression.
Synopsis
PsdExpr operator+(const PsdExpr &other)
Arguments
other
: other expression to add.Return
result expression.
PsdExpr::operator-=()
Substract an expression from self.
Synopsis
void operator-=(const PsdExpr &expr)
Arguments
expr
: expression to be substracted.
PsdExpr::operator-()
Substract expression and return new expression.
Synopsis
PsdExpr operator-(const PsdExpr &other)
Arguments
other
: other expression to substract.Return
result expression.
PsdExpr::Remove()
Remove i-th term from PSD expression object.
Synopsis
void Remove(int idx)
Arguments
idx
: index of the term to be removed.
PsdExpr::Remove()
Remove the term associated with variable from PSD expression.
Synopsis
void Remove(const Var &var)
Arguments
var
: a variable whose term should be removed.
PsdExpr::Remove()
Remove the term associated with PSD variable from PSD expression.
Synopsis
void Remove(const PsdVar &var)
Arguments
var
: a PSD variable whose term should be removed.
PsdExpr::Reserve()
Reserve capacity to contain at least n items.
Synopsis
void Reserve(size_t n)
Arguments
n
: minimum capacity for PSD expression object.
PsdExpr::SetCoeff()
Set coefficient matrix of the i-th term in PSD expression.
Synopsis
void SetCoeff(int i, const SymMatrix &mat)
Arguments
i
: index of the PSD term.
mat
: coefficient matrix of the term.
PsdExpr::SetConstant()
Set constant for the PSD expression.
Synopsis
void SetConstant(double constant)
Arguments
constant
: the value of the constant.
PsdExpr::Size()
Get number of PSD terms in expression.
Synopsis
size_t Size()
Return
number of PSD terms.