14.2.17 Class LinearDomain¶
- mosek::fusion::LinearDomain¶
Represent a domain defined by linear constraints
- Members
LinearDomain.integral – Creates a domain of integral variables.
LinearDomain.sparse – Creates a domain exploiting sparsity.
LinearDomain.symmetric – Creates a symmetric domain
LinearDomain.withNamesOnAxis – Set index names in a specific axis.
LinearDomain.withShape – Set the shape of the domain.
- LinearDomain.integral¶
LinearDomain::t integral()
Modify a given domain restricting its elements to be integral.
- Return
- LinearDomain.sparse¶
LinearDomain::t sparse() LinearDomain::t sparse(shared_ptr<ndarray<int,1>> sparsity) LinearDomain::t sparse(shared_ptr<ndarray<int,2>> sparsity)
Creates a domain exploiting sparsity.
- Parameters
sparsity
(int
[])sparsity
(int
[][])
- Return
- LinearDomain.symmetric¶
SymmetricLinearDomain::t symmetric()
Creates a symmetric domain
- Return
- LinearDomain.withNamesOnAxis¶
LinearDomain::t withNamesOnAxis(shared_ptr<ndarray<string,1>> names, int axis)
Set index names in a specific axis.
- Parameters
names
(string
[]) – List of names, this must match the actual dimension on that axis.axis
(int
) – The axis to change names on.
- Return
- LinearDomain.withShape¶
LinearDomain::t withShape(shared_ptr<ndarray<int,1>> shp) LinearDomain::t withShape(int dim0) LinearDomain::t withShape(int dim0, int dim1) LinearDomain::t withShape(int dim0, int dim1, int dim2)
Set the shape of the domain.
- Parameters
shp
(int
[]) – The shape of the domaindim0
(int
) – First dimensiondim1
(int
) – Second dimensiondim2
(int
) – Third dimension
- Return