[ 0 14805 0]
[ 0 0 1349105625]
+ An example over the integers::
+
+ sage: V = ZZ^5
+ sage: v1 = V((0, -11, 5, -1, 1))
+ sage: v2 = V((-4, 1, -1, -12, -1))
+ sage: v3 = V((-2, 1, 1, 38, 1))
+ sage: v4 = V((-1, 0, -3, -1, 1))
+ sage: v5 = V((-2, 1, 0, 1, 2))
+ sage: O = _orthogonalize([v1,v2,v3,v4,v5])
+ sage: all( O[i].inner_product(O[j]).is_zero()
+ ....: for i in range(len(O))
+ ....: for j in range(len(O))
+ ....: if not i == j )
+ True
+
"""
if len(S) == 0:
return S
p = _orthogonalize_wrt(r, L_ortho_basis)
P_ortho_rays.append(p)
+ # Both generating sets should be minimal, but PPL may be able to
+ # rescale them (no guarantee we don't have a bunch of rays that
+ # can all be divided by two, for example).
return (Cone(P_ortho_rays, lattice=lat),
Cone(L_ortho_rays, lattice=lat))