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