|
2 | 2 | Parents for Polyhedra
|
3 | 3 | """
|
4 | 4 |
|
5 |
| -#***************************************************************************** |
| 5 | +# **************************************************************************** |
6 | 6 | # Copyright (C) 2014 Volker Braun <[email protected]>
|
7 | 7 | #
|
8 | 8 | # Distributed under the terms of the GNU General Public License (GPL)
|
9 |
| -# http://www.gnu.org/licenses/ |
10 |
| -#****************************************************************************** |
| 9 | +# https://www.gnu.org/licenses/ |
| 10 | +# ***************************************************************************** |
11 | 11 |
|
12 | 12 | from sage.structure.parent import Parent
|
13 | 13 | from sage.structure.element import get_coercion_model
|
@@ -400,7 +400,7 @@ def some_elements(self):
|
400 | 400 | points = []
|
401 | 401 | R = self.base_ring()
|
402 | 402 | for i in range(self.ambient_dim() + 5):
|
403 |
| - points.append([R(i * j**2) for j in range(self.ambient_dim())]) |
| 403 | + points.append([R(i * j ^ 2) for j in range(self.ambient_dim())]) |
404 | 404 | return [
|
405 | 405 | self.element_class(self, [points[0:self.ambient_dim() + 1], [], []], None),
|
406 | 406 | self.element_class(self, [points[0:1], points[1:self.ambient_dim() + 1], []], None),
|
@@ -1212,9 +1212,11 @@ def _element_constructor_polyhedron(self, polyhedron, **kwds):
|
1212 | 1212 | else:
|
1213 | 1213 | return Polyhedra_base._element_constructor_polyhedron(self, polyhedron, **kwds)
|
1214 | 1214 |
|
| 1215 | + |
1215 | 1216 | class Polyhedra_ZZ_normaliz(Polyhedra_base):
|
1216 | 1217 | Element = Polyhedron_ZZ_normaliz
|
1217 | 1218 |
|
| 1219 | + |
1218 | 1220 | class Polyhedra_QQ_ppl(Polyhedra_base):
|
1219 | 1221 | Element = Polyhedron_QQ_ppl
|
1220 | 1222 |
|
@@ -1244,27 +1246,35 @@ def _element_constructor_polyhedron(self, polyhedron, **kwds):
|
1244 | 1246 | else:
|
1245 | 1247 | return Polyhedra_base._element_constructor_polyhedron(self, polyhedron, **kwds)
|
1246 | 1248 |
|
| 1249 | + |
1247 | 1250 | class Polyhedra_QQ_normaliz(Polyhedra_base):
|
1248 | 1251 | Element = Polyhedron_QQ_normaliz
|
1249 | 1252 |
|
| 1253 | + |
1250 | 1254 | class Polyhedra_QQ_cdd(Polyhedra_base):
|
1251 | 1255 | Element = Polyhedron_QQ_cdd
|
1252 | 1256 |
|
| 1257 | + |
1253 | 1258 | class Polyhedra_RDF_cdd(Polyhedra_base):
|
1254 | 1259 | Element = Polyhedron_RDF_cdd
|
1255 | 1260 |
|
| 1261 | + |
1256 | 1262 | class Polyhedra_normaliz(Polyhedra_base):
|
1257 | 1263 | Element = Polyhedron_normaliz
|
1258 | 1264 |
|
| 1265 | + |
1259 | 1266 | class Polyhedra_polymake(Polyhedra_base):
|
1260 | 1267 | Element = Polyhedron_polymake
|
1261 | 1268 |
|
| 1269 | + |
1262 | 1270 | class Polyhedra_field(Polyhedra_base):
|
1263 | 1271 | Element = Polyhedron_field
|
1264 | 1272 |
|
| 1273 | + |
1265 | 1274 | class Polyhedra_number_field(Polyhedra_base):
|
1266 | 1275 | Element = Polyhedron_number_field
|
1267 | 1276 |
|
| 1277 | + |
1268 | 1278 | @cached_function
|
1269 | 1279 | def does_backend_handle_base_ring(base_ring, backend):
|
1270 | 1280 | r"""
|
|
0 commit comments