14.2.34 Class Set¶
- mosek::fusion::Set¶
This class contains static methods for creating and manipulating shape specifications.
- Static members:
Set.make – Creates a shape.
Set.scalar – Create a shape of size 1.
Set.strides – Compute the strides from a shape.
- Set.make¶
shared_ptr<ndarray<int,1>> Set::make(shared_ptr<ndarray<string,1>> names) shared_ptr<ndarray<int,1>> Set::make(int sz) shared_ptr<ndarray<int,1>> Set::make(int s1, int s2) shared_ptr<ndarray<int,1>> Set::make(int s1, int s2, int s3) shared_ptr<ndarray<int,1>> Set::make(shared_ptr<ndarray<int,1>> sizes) shared_ptr<ndarray<int,1>> Set::make(shared_ptr<ndarray<int,1>> set1, shared_ptr<ndarray<int,1>> set2)
This static method is a factory for different kind of set objects:
A (multi-dimensional) set of integers (shape).
A set whose elements are strings.
A set obtained as Cartesian product of sets given in a list.
- Parameters:
names
(string
[]) – A list of strings for a set of strings.sz
(int
) – The size of a one-dimensional set of integers.s1
(int
) – Size of the first dimension.s2
(int
) – Size of the second dimension.s3
(int
) – Size of the third dimension.sizes
(int
[]) – The sizes of dimensions for a multi-dimensional integer set.set1
(int
[]) – First factor in a Cartesian product.set2
(int
[]) – Second factor in a Cartesian product.
- Return:
(
int
[])
- Set.scalar¶
shared_ptr<ndarray<int,1>> Set::scalar()
Create a shape of size 1.
- Return:
(
int
[])
- Set.strides¶
shared_ptr<ndarray<long long,1>> Set::strides(shared_ptr<ndarray<int,1>> shape)
Compute the strides from a shape.
- Parameters:
shape
(int
[])- Return:
(
long long
[])