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)

Arguments

var: variable for the added term.

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 PSD expression and a constant.

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.