]>
gitweb.michael.orlitzky.com - sage.d.git/blob - mjo/cone/nonnegative_orthant.py
2 The nonnegative orthant in `\mathbb{Z}^{n}`. I'm sick and tired of
8 def nonnegative_orthant(n
):
10 The nonnegative orthant in ``n`` dimensions.
14 - ``n`` -- the dimension of the ambient space.
18 The convex cone having ``n`` standard basis vectors as its
19 generators. Each generating ray will have the integer ring as its
24 sage: from mjo.cone.nonnegative_orthant import nonnegative_orthant
28 sage: nonnegative_orthant(3).rays()
36 We can construct the trivial cone as the nonnegative orthant in a
37 trivial vector space::
39 sage: nonnegative_orthant(0)
40 0-d cone in 0-d lattice N
42 The nonnegative orthant is a proper cone::
44 sage: set_random_seed()
45 sage: n = ZZ.random_element(10)
46 sage: K = nonnegative_orthant(n)
51 I
= identity_matrix(ZZ
,n
)
52 lattice
= ToricLattice(n
)
53 return Cone(I
.rows(), lattice
)