8.7.11. MDOColumn

MDOColumn

Represent columns in a constraint matrix in a MindOpt application

Properties

Size

Retrieve the number of terms contained in column

Size

Retrieve the number of terms contained in column.

Methods

AddTerm

Add a term to this column

AddTerms

Add terms to this column

AddTerms

Add terms to this column at the specified index of the input

Clear

Clear all items contained in this column

GetCoeff

Retrieve the ith coefficient associated to this column

GetConstr

Retrieve the ith constraint associated to this column

MDOColumn

Initialize a MDOColumn

MDOColumn

Initialize a MDOColumn with an existing MDOColumn

Remove

Remove the ith term from this column

Remove

Remove all terms containing a specified constraint

void AddTerm(double coeff, MDOConstr constr)

Add a term to this column.

Parameters
  • double coeff – The coefficient of term to be added.

  • MDOConstr constr – The constraint of term to be added.

void AddTerms(double[] coeff, MDOConstr[] constr)

Add terms to this column.

Parameters
  • double[] coeff – The coefficients of terms to be added.

  • MDOConstr[] constr – The constraints of terms to be added.

void AddTerms(double[] coeff, MDOConstr[] constr, int start, int len)

Add terms to this column at the specified index of the input.

Parameters
  • double[] coeff – The coefficients of terms to be added.

  • MDOConstr[] constr – The constraints of terms to be added.

  • int start – The starting index

  • int len – The number of items to add

void Clear()

Clear all items contained in this column

double GetCoeff(int i)

Retrieve the ith coefficient associated to this column.

Parameters

int i – The index of coefficient to be retrieved.

Returns

The ith coefficient associated to this column.

MDOConstr GetConstr(int i)

Retrieve the ith constraint associated to this column.

Parameters

int i – The index of constraint to be retrieved.

Returns

The ith constraint associated to this column.

MDOColumn()

Initialize a MDOColumn

MDOColumn(MDOColumn col)

Initialize a MDOColumn with an existing MDOColumn

Parameters

MDOColumn col – Initial MDOColumn

void Remove(int i)

Remove the ith term from this column.

Parameters

int i – The index of term to be removed.

bool Remove(MDOConstr c)

Remove all terms containing a specified constraint.

Parameters

MDOConstr c – The constraint contained to be removed.

Returns

True if at least 1 term was removed.