MQConstr::MQConstr()

Construct a MQConstr object with the given shape, filling with the given quadratic constraint.

Synopsis

MQConstr(const Shape<N> &shp, const QConstraint &con)

Arguments

shp: shape of MQConstr.

con: Quadratic constraint object.

MQConstr::MQConstr()

Construct a MQConstr object with the given shape, filling with an array of quadratic constraints.

Synopsis

MQConstr(const Shape<N> &shp, const QConstrArray &cons)

Arguments

shp: shape of MQConstr.

cons: an array of quadratic constraints.

MQConstr::Clone()

Clone MQConstr object.

Synopsis

MQConstr Clone()

Return

new MQConstr object.

MQConstr::Diagonal()

Get diagonals of MQConstr object.

Synopsis

MQConstr<N - 1> Diagonal(

int offset,

int axis1,

int axis2)

Arguments

offset: offset of the diagonal from the main diagonal. Can be positive or negative.

axis1: 1st axis of MQConstr.

axis2: 2nd axis of MQConstr.

Return

(N-1)-dimensional diagonals.

MQConstr::Expand()

Expand shape of MQConstr object.

Synopsis

MQConstr<N + 1> Expand(int axis)

Arguments

axis: axis of MQConstr.

Return

MQConstr object of (N+1)-dimensional shape.

MQConstr::Flatten()

Flatten a MQConstr object to a 1-dimensional shape.

Synopsis

MQConstr<1> Flatten()

Return

a MQConstr object collapsed into one dimension.

MQConstr::Get()

Get values of information associated with quadratic constraints in MQConstr object.

Synopsis

NdArray<double, N> Get(const char *szInfo)

Arguments

szInfo: name of information.

Return

multi-dimensional array of information of quadratic constraints.

MQConstr::GetDim()

Get i-th dimension of MQConstr object.

Synopsis

size_t GetDim(int i)

Arguments

i: index of dimension

Return

i-th dimension.

MQConstr::GetIdx()

Get index of quadratic constraints in MQConstr object.

Synopsis

NdArray<int, N> GetIdx()

Return

multi-dimensional array of indexes of quadratic constraints.

MQConstr::GetND()

Get number of dimensions of MQConstr object.

Synopsis

int GetND()

Return

number of dimensions.

MQConstr::GetRhs()

Get RHS of quadratic constraints in MQConstr object.

Synopsis

NdArray<double, N> GetRhs()

Return

multi-dimensional array of RHS of quadratic constraints.

MQConstr::GetSense()

Get senses of quadratic constraints in MQConstr object.

Synopsis

NdArray<char, N> GetSense()

Return

multi-dimensional array of senses of quadratic constraints.

MQConstr::GetShape()

Get shape of MQConstr object.

Synopsis

Shape<N> GetShape()

Return

shape object.

MQConstr::GetSize()

Get size of MQConstr object.

Synopsis

size_t GetSize()

Return

number of QConstraints

MQConstr::Item()

Get quadratic constraint of given index from MQConstr object.

Synopsis

QConstraint &Item(size_t idx)

Arguments

idx: index of quadratic constraint.

Return

QConstraint object.

MQConstr::operator[]()

Get quadratic constraint of given index from MQConstr object.

Synopsis

QConstraint &operator[](size_t idx)

Arguments

idx: index of quadratic constraint.

Return

QConstraint object.

MQConstr::operator[]()

Get constraints of given view from MQConstr object.

Synopsis

MQConstr operator[](const View &view)

Arguments

view: view of multi-dimensional array.

Return

new MQConstr object.

MQConstr::Pick()

Given a list of indexes, get quadratic constraints from MQConstr object.

Synopsis

MQConstr<1> Pick(const NdArray<int, 1> &indexes)

Arguments

indexes: indexes of elements.

Return

one-dimensional array of desired quadratic constraints.

MQConstr::Pick()

Given a list of indexes, get quadratic constraints from MQConstr object.

Synopsis

MQConstr<1> Pick(const NdArray<int, 2> &idxrows)

Arguments

idxrows: indexes in format of 2-dimensional array, where each row is position of element.

Return

one-dimensional array of desired quadratic constraints.

MQConstr::Represent()

String representation of MQConstr object.

Synopsis

std::string Represent(size_t maxlen)

Arguments

maxlen: max length of representation.

Return

string object.

MQConstr::Reshape()

Reshape MQConstr object to new shape.

Synopsis

template <int M> MQConstr<M> Reshape(const Shape<M> &shape)

Arguments

shape: new shape of M-dimensions.

Return

M-dimensional MQConstr object.

MQConstr::Set()

Set values of information associated with quadratic constraints in MQConstr object.

Synopsis

void Set(const char *szInfo, double val)

Arguments

szInfo: name of information.

val: value of information.

MQConstr::Set()

Set values of information associated with quadratic constraints in MQConstr object.

Synopsis

void Set(const char *szInfo, const NdArray<double, N> &vals)

Arguments

szInfo: name of information.

vals: multi-dimensional array of values of information.

MQConstr::SetItem()

Set quadratic constraint of given index to MQConstr object.

Synopsis

void SetItem(size_t idx, const QConstraint &con)

Arguments

idx: index of element.

con: quadratic constraint object.

MQConstr::Squeeze()

Remove axis of length 1 from shape of MQConstr object.

Synopsis

MQConstr<N - 1> Squeeze(int axis)

Arguments

axis: axis of MQConstr, where the length is 1.

Return

MQConstr object of (N-1)-dimensional shape.

MQConstr::Stack()

Stack with other MQConstr object along given axis.

Synopsis

MQConstr<N> Stack(const MQConstr<N> &other, int axis)

Arguments

other: a MQConstr object.

axis: an axis of MQConstr.

Return

the result MQConstr object.

MQConstr::Transpose()

Perform matrix transpose of MQConstr object.

Synopsis

MQConstr<N> Transpose()

Return

transposed MQConstr object.