|
7 | 7 | from . import StaticFile, PythonModule
|
8 | 8 | from sage.env import (
|
9 | 9 | CONWAY_POLYNOMIALS_DATA_DIR,
|
10 |
| - CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR) |
| 10 | + CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR, |
| 11 | + POLYTOPE_DATA_DIR) |
11 | 12 |
|
12 | 13 |
|
13 | 14 | class DatabaseConwayPolynomials(StaticFile):
|
@@ -127,8 +128,35 @@ def __init__(self):
|
127 | 128 | PythonModule.__init__(self, 'database_knotinfo', spkg='database_knotinfo')
|
128 | 129 |
|
129 | 130 |
|
| 131 | +class DatabaseReflexivePolytopes(StaticFile): |
| 132 | + r""" |
| 133 | + A :class:`~sage.features.Feature` which describes the presence of the PALP database |
| 134 | + of reflexive lattice polytopes. |
| 135 | +
|
| 136 | + EXAMPLES:: |
| 137 | +
|
| 138 | + sage: from sage.features.databases import DatabaseReflexivePolytopes |
| 139 | + sage: bool(DatabaseReflexivePolytopes().is_present()) # optional - polytopes_db |
| 140 | + True |
| 141 | + sage: bool(DatabaseReflexivePolytopes('polytopes_db_4d', 'Hodge4d').is_present()) # optional - polytopes_db_4d |
| 142 | + True |
| 143 | + """ |
| 144 | + def __init__(self, name='polytopes_db', dirname='Full3D'): |
| 145 | + """ |
| 146 | + TESTS:: |
| 147 | +
|
| 148 | + sage: from sage.features.databases import DatabaseReflexivePolytopes |
| 149 | + sage: isinstance(DatabaseReflexivePolytopes(), DatabaseReflexivePolytopes) |
| 150 | + True |
| 151 | + """ |
| 152 | + StaticFile.__init__(self, name, dirname, |
| 153 | + search_path=[POLYTOPE_DATA_DIR]) |
| 154 | + |
| 155 | + |
130 | 156 | def all_features():
|
131 | 157 | return [DatabaseConwayPolynomials(),
|
132 | 158 | DatabaseCremona(), DatabaseCremona('cremona_mini'),
|
133 | 159 | DatabaseJones(),
|
134 |
| - DatabaseKnotInfo()] |
| 160 | + DatabaseKnotInfo(), |
| 161 | + DatabaseReflexivePolytopes(), |
| 162 | + DatabaseReflexivePolytopes('polytopes_db_4d', 'Hodge4d')] |
0 commit comments