6 | | sage: A=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[1/4,1/4,1/4,1/4]]~~ ~~ |

7 | | sage: n=len(A)~~ ~~ |

8 | | sage: A=[vector(v) for v in A]~~ ~~ |

9 | | sage: AP = Polyhedron(vertices=A)~~ ~~ |

10 | | sage: M,b=AP.affine_hull_projection(orthonormal=True,extend=True,as_affine_map=True)~~ ~~ |

| 6 | sage: A=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[1/4,1/4,1/4,1/4]] |

| 7 | sage: n=len(A) |

| 8 | sage: A=[vector(v) for v in A] |

| 9 | sage: AP = Polyhedron(vertices=A) |

| 10 | sage: M,b=AP.affine_hull_projection(orthonormal=True,extend=True,as_affine_map=True) |

12 | | ....: for i in range(n): |

13 | | ....: for j in range(i+1,n): |

14 | | ....: V.append((A[i]-A[j])/2) |

15 | | ....: |

16 | | sage: Z=polytopes.zonotope(V) |

17 | | sage: T = M.matrix().transpose() |

18 | | sage: timeit('T*Z') |

| 12 | ....: for i in range(n): |

| 13 | ....: for j in range(i+1,n): |

| 14 | ....: V.append((A[i]-A[j])/2) |

| 15 | sage: Z=polytopes.zonotope(V) |

| 16 | sage: T = M.matrix().transpose() |

| 17 | sage: timeit('T*Z') |

25 | | sage: A=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[1/4,1/4,1/4,1/4]]~~ ~~ |

26 | | sage: n=len(A)~~ ~~ |

27 | | sage: A=[vector(v) for v in A]~~ ~~ |

28 | | sage: AP = Polyhedron(vertices=A)~~ ~~ |

29 | | sage: M,b=AP.affine_hull_projection(orthonormal=True,extend=True,as_affine_map=True,minimal=True)~~ ~~ |

30 | | sage: V=[]~~ ~~ |

| 24 | sage: A=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[1/4,1/4,1/4,1/4]] |

| 25 | sage: n=len(A) |

| 26 | sage: A=[vector(v) for v in A] |

| 27 | sage: AP = Polyhedron(vertices=A) |

| 28 | sage: M,b=AP.affine_hull_projection(orthonormal=True,extend=True,as_affine_map=True,minimal=True) |

| 29 | sage: V=[] |