PsdExpr.PsdExpr()

Constructor of a PSD expression with default constant value 0.

Synopsis

PsdExpr(double constant)

Arguments

constant: optional, constant value in PSD expression object.

PsdExpr.PsdExpr()

Constructor of a PSD expression with one term.

Synopsis

PsdExpr(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(Expr expr)

Arguments

expr: input linear expression.

PsdExpr.PsdExpr()

Constructor of a PSD expression with one term.

Synopsis

PsdExpr(PsdVar var, 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(PsdVar var, SymMatExpr expr)

Arguments

var: PSD variable for the added term.

expr: coefficient expression of symmetric matrices of new PSD 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 PSD expression object.

Synopsis

void AddLinExpr(Expr expr)

Arguments

expr: linear expression to be added.

PsdExpr.AddLinExpr()

Add a linear expression to PSD expression object.

Synopsis

void AddLinExpr(Expr expr, double mult)

Arguments

expr: linear expression to be added.

mult: multiplier constant.

PsdExpr.AddPsdExpr()

Add a PSD expression to self.

Synopsis

void AddPsdExpr(PsdExpr expr)

Arguments

expr: PSD expression to be added.

PsdExpr.AddPsdExpr()

Add a PSD expression to self.

Synopsis

void AddPsdExpr(PsdExpr expr, double mult)

Arguments

expr: PSD expression to be added.

mult: multiplier constant.

PsdExpr.AddTerm()

Add a linear term to PSD expression object.

Synopsis

void AddTerm(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(PsdVar var, 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(PsdVar var, 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

void AddTerms(Var[] vars, double coeff)

Arguments

vars: variables of added linear terms.

coeff: one coefficient for added linear terms.

PsdExpr.AddTerms()

Add linear terms to PSD expression object.

Synopsis

void AddTerms(Var[] vars, double[] coeffs)

Arguments

vars: variables for added linear terms.

coeffs: coefficient array for added linear terms.

PsdExpr.AddTerms()

Add linear terms to PSD expression object.

Synopsis

void AddTerms(VarArray vars, double coeff)

Arguments

vars: variables of added linear terms.

coeff: one coefficient for added linear terms.

PsdExpr.AddTerms()

Add linear terms to PSD expression object.

Synopsis

void AddTerms(VarArray vars, double[] coeffs)

Arguments

vars: variables of added terms.

coeffs: coefficients of added terms.

PsdExpr.AddTerms()

Add PSD terms to PSD expression object.

Synopsis

void AddTerms(PsdVarArray vars, SymMatrixArray mats)

Arguments

vars: PSD variables for added PSD terms.

mats: coefficient matrixes for added PSD terms.

PsdExpr.AddTerms()

Add PSD terms to PSD expression object.

Synopsis

void AddTerms(PsdVar[] vars, SymMatrix[] mats)

Arguments

vars: PSD variables for added PSD terms.

mats: coefficient matrixes for 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 expression of the i-th PSD term.

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.Multiply()

Multiply a constant by itself.

Synopsis

void Multiply(double c)

Arguments

c: constant operand.

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(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(PsdVar var)

Arguments

var: a PSD variable whose term should be removed.

PsdExpr.SetCoeff()

Set coefficient matrix of the i-th term in PSD expression.

Synopsis

void SetCoeff(int i, 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

long Size()

Return

number of PSD terms.