14.2.30 Class RangeDomain

mosek.fusion.RangeDomain

The RangeDomain object is never instantiated directly: Instead use the relevant methods in Domain.

Members:

RangeDomain.integral – Creates a domain of integral variables.

RangeDomain.sparse – Creates a domain exploiting sparsity.

RangeDomain.symmetric – Creates a symmetric domain.

RangeDomain.withNamesOnAxis – Set index names in a specific axis.

RangeDomain.withShape – Set the shape of the domain.

Implemented by:

SymmetricRangeDomain

RangeDomain.integral
integral() -> RangeDomain

Modify a given domain restricting its elements to be integral.

Return:

(RangeDomain)

RangeDomain.sparse
sparse() -> RangeDomain
sparse(int[] sparsity) -> RangeDomain
sparse(int[][] sparsity) -> RangeDomain

Creates a domain exploiting sparsity.

Parameters:
  • sparsity (int[])

  • sparsity (int[][])

Return:

(RangeDomain)

RangeDomain.symmetric
symmetric() -> SymmetricRangeDomain

Creates a symmetric domain.

Return:

(SymmetricRangeDomain)

RangeDomain.withNamesOnAxis
withNamesOnAxis(str[] names, int axis) -> RangeDomain

Set index names in a specific axis.

Parameters:
  • names (str[]) – List of names, this must match the actual dimension on that axis.

  • axis (int) – The axis to change names on.

Return:

(RangeDomain)

RangeDomain.withShape
withShape(int[] shp) -> RangeDomain
withShape(int dim0) -> RangeDomain
withShape(int dim0, int dim1) -> RangeDomain
withShape(int dim0, int dim1, int dim2) -> RangeDomain

Set the shape of the domain.

Parameters:
  • shp (int[]) – The shape of the domain

  • dim0 (int) – First dimension

  • dim1 (int) – Second dimension

  • dim2 (int) – Third dimension

Return:

(RangeDomain)