MConstr::MConstr()
Construct a MConstr object with the given shape, filling with the given constraint.
Synopsis
MConstr(const Shape<N> &shp, const Constraint &con)
Arguments
shp
: shape of MConstr.
con
: Constraint object.
MConstr::MConstr()
Construct a MConstr object with the given shape, filling with an array of constraints.
Synopsis
MConstr(const Shape<N> &shp, const ConstrArray &cons)
Arguments
shp
: shape of MConstr.
cons
: an array of constraints.
MConstr::Clone()
Clone MConstr object.
Synopsis
MConstr Clone()
Return
new MConstr object.
MConstr::Diagonal()
Get diagonals of MConstr object.
Synopsis
MConstr<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 MConstr.
axis2
: 2nd axis of MConstr.Return
(N-1)-dimensional diagonals.
MConstr::Expand()
Expand shape of MConstr object.
Synopsis
MConstr<N + 1> Expand(int axis)
Arguments
axis
: axis of MConstr.Return
MConstr object of (N+1)-dimensional shape.
MConstr::Flatten()
Flatten a MConstr object to a 1-dimensional shape.
Synopsis
MConstr<1> Flatten()
Return
a MConstr object collapsed into one dimension.
MConstr::Get()
Get values of information associated with constraints in MConstr object.
Synopsis
NdArray<double, N> Get(const char *szInfo)
Arguments
szInfo
: name of information.Return
multi-dimensional array of information of constraints.
MConstr::GetBasis()
Get basis of constraints in MConstr object.
Synopsis
NdArray<int, N> GetBasis()
Return
multi-dimensional array of basis of constraints.
MConstr::GetDim()
Get i-th dimension of MConstr object.
Synopsis
size_t GetDim(int i)
Arguments
i
: index of dimensionReturn
i-th dimension.
MConstr::GetIdx()
Get index of constraints in MConstr object.
Synopsis
NdArray<int, N> GetIdx()
Return
multi-dimensional array of indexes of constraints.
MConstr::GetLowerIIS()
Get IIS status of lower bound of constraints in MConstr object.
Synopsis
NdArray<int, N> GetLowerIIS()
Return
multi-dimensional array of IIS status of lower bounds of constraints.
MConstr::GetND()
Get number of dimensions of MConstr object.
Synopsis
int GetND()
Return
number of dimensions.
MConstr::GetShape()
Get shape of MConstr object.
Synopsis
Shape<N> GetShape()
Return
shape object.
MConstr::GetSize()
Get size of MConstr object.
Synopsis
size_t GetSize()
Return
number of constraints.
MConstr::GetUpperIIS()
Get IIS status of upper bound of constraints in MConstr object.
Synopsis
NdArray<int, N> GetUpperIIS()
Return
multi-dimensional array of IIS status of upper bounds of constraints.
MConstr::Item()
Get constraint of given index from MConstr object.
Synopsis
Constraint &Item(size_t idx)
Arguments
idx
: index of constraint.Return
Constraint object.
MConstr::operator[]()
Get constraint of given index from MConstr object.
Synopsis
Constraint &operator[](size_t idx)
Arguments
idx
: index of constraint.Return
Constraint object.
MConstr::operator[]()
Get constraints of given view from MConstr object.
Synopsis
MConstr operator[](const View &view)
Arguments
view
: view of multi-dimensional array.Return
new MConstr object.
MConstr::Represent()
String representation of MConstr object.
Synopsis
std::string Represent(size_t maxlen)
Arguments
maxlen
: max length of representation.Return
string object.
MConstr::Reshape()
Reshape MConstr object to new shape.
Synopsis
template <int M> MConstr<M> Reshape(const Shape<M> &shape)
Arguments
shape
: new shape of M-dimensions.Return
M-dimensional MConstr object.
MConstr::Set()
Set values of information associated with constraints in MConstr object.
Synopsis
void Set(const char *szInfo, double val)
Arguments
szInfo
: name of information.
val
: value of information.
MConstr::Set()
Set values of information associated with constraints in MConstr 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.
MConstr::SetItem()
Set constraint of given index to MConstr object.
Synopsis
void SetItem(size_t idx, const Constraint &con)
Arguments
idx
: index of element.
con
: constraint object.
MConstr::Squeeze()
Remove axis of length 1 from shape of MConstr object.
Synopsis
MConstr<N - 1> Squeeze(int axis)
Arguments
axis
: axis of MConstr, where the length is 1.Return
MConstr object of (N-1)-dimensional shape.
MConstr::Transpose()
Perform matrix transpose of MConstr object.
Synopsis
MConstr<N> Transpose()
Return
transposed MConstr object.