Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract KS polytopes from polyDB and turn it into (Fano?) toric variety #3974

Open
HereAround opened this issue Jul 25, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@HereAround
Copy link
Member

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context about the feature request here.

@HereAround HereAround added the enhancement New feature or request label Jul 25, 2024
@benlorenz
Copy link
Member

benlorenz commented Jul 25, 2024

Some code for the database access:

julia> db = Polymake.Polydb.get_db();

julia> collection = db["Polytopes.Lattice.Reflexive"]
Polymake.Polydb.Collection{Polymake.LibPolymake.BigObject}: Polytopes.Lattice.Reflexive

julia> query = Dict("_id"=>"v10-002900002")
Dict{String, String} with 1 entry:
  "_id" => "v10-002900002"

julia> polytope = Polymake.Polydb.find_one(collection, query)
name: v10-002900002
type: Polytope<Rational>
...

julia> Polymake.get_attachment(polytope,"H_11")
22

julia> Polymake.get_attachment(polytope,"H_12")
28

julia> Polymake.get_attachment(polytope,"EULER_CHARACTERISTIC")
-12

julia> ntv = normal_toric_variety(polyhedron(polytope))
Normal toric variety

It is also possible to query by some properties:

julia> query = Dict("H_11"=>22);

julia> curs = Polymake.Polydb.find(collection, query);

julia> for xx in curs
       println(Polymake.getname(xx),": H_12=",Polymake.get_attachment(xx,"H_12"))
       end
v05-000000915: H_12=34
v05-000000917: H_12=34
v05-000000918: H_12=34
v05-000000921: H_12=34
v05-000000923: H_12=34
v05-000000924: H_12=34
v05-000000927: H_12=34
v05-000000929: H_12=46
v05-000000930: H_12=46
v05-000000933: H_12=46
v05-000000935: H_12=58
...

Querying should work for most of the properties from this list:

julia> Polymake.Polydb.get_fields(collection)
35-element Vector{String}:
 "ALTSHULER_DET"
 "BALANCED"
 "CENTROID"
 "CONE_DIM"
 "DIAMETER"
 "DIM"
 "EHRHART_POLYNOMIAL"
 "EULER_CHARACTERISTIC"
 "F_VECTOR"
 "FACET_SIZES"
 "FACET_WIDTHS"
 "FACETS"
 "H_11"
 "H_12"
 "H_STAR_VECTOR"
 "LATTICE_DEGREE"
 "LATTICE_VOLUME"
 "N_BOUNDARY_LATTICE_POINTS"
 "N_FACETS"
 "N_EDGES"
 "N_HILBERT_BASIS"
 "N_LATTICE_POINTS"
 "N_RIDGES"
 "N_VERTICES"
 "NORMAL"
 "REFLEXIVE"
 "POLAR_SMOOTH"
 "SELF_DUAL"
 "SIMPLE"
 "SIMPLICIAL"
 "SMOOTH"
 "TERMINAL"
 "VERTEX_SIZES"
 "VERTICES"
 "VERY_AMPLE"

(at least where it makes sense, since querying for a matrix is not really practial)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants