Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-polymake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
julia-version: ['~1.10.0-0', '~1.11.0-0', '1.12-nightly']
julia-version: ['~1.10.0-0', '~1.12.0-0', '1.13-nightly', 'nightly']

fail-fast: false

Expand Down
3 changes: 2 additions & 1 deletion include/jlpolymake/jlpolymake.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <polymake/Map.h>
#include <polymake/Graph.h>
#include <polymake/topaz/HomologyComplex.h>
#include <polymake/graph/GraphIso.h>
#include <polymake/group/switch_table.h>
#include <polymake/graph/Decoration.h>
#include <polymake/RandomGenerators.h>
Expand All @@ -45,7 +46,7 @@

#define JLPOLYMAKE_VERSION_MAJOR 0
#define JLPOLYMAKE_VERSION_MINOR 14
#define JLPOLYMAKE_VERSION_PATCH 2
#define JLPOLYMAKE_VERSION_PATCH 5

#define __JLPOLYMAKE_STR_HELPER(x) #x
#define __JLPOLYMAKE_STR(x) __JLPOLYMAKE_STR_HELPER(x)
Expand Down
4 changes: 2 additions & 2 deletions src/polymake/generate_deps_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ using Pkg.Artifacts

# adapted from https://github.com/JuliaLang/julia/pull/38797
function full_artifact_dir(m::Module)
artifacts_toml = joinpath(dirname(dirname(Base.pathof(m))), "StdlibArtifacts.toml")
artifacts_toml = joinpath(dirname(dirname(Base.pathof(m)::String)), "StdlibArtifacts.toml")

# If this file exists, it's a stdlib JLL and we must download the artifact ourselves
if isfile(artifacts_toml)
# we need to remove the _jll for the artifact name
meta = artifact_meta(string(m)[1:end-4], artifacts_toml)
meta::Dict{String,Any} = artifact_meta(string(m)[1:end-4], artifacts_toml)
hash = Base.SHA1(meta["git-tree-sha1"])
if !artifact_exists(hash)
dl_info = first(meta["download"])
Expand Down
9 changes: 9 additions & 0 deletions src/polymake/type_setup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ sub EdgeMap {
Vector(Polynomial(Rational,Int)),
Array(Polynomial(Integer,Int)),
Array(Polynomial(Rational,Int)),
Matrix(UniPolynomial(Rational,Int)),
Vector(UniPolynomial(Rational,Int)),
Array(UniPolynomial(Integer,Int)),
Array(UniPolynomial(Rational,Int)),

Map(String,String),
Map(String,Int),
Expand All @@ -281,7 +285,12 @@ sub EdgeMap {
Map(Set(Int),Vector(Rational)),
Map(Vector(Int),Integer),
Map(Pair(Int,Int),Int),
Map(Pair(Int,Int),double),
Map(Pair(Int,Int),Integer),
Map(Pair(Int,Int),Rational),
Map(Pair(Int,Int),String),
Map(Pair(Int,Int),Vector(Integer)),
Map(Pair(Int,Int),Vector(Rational)),

IncidenceMatrix,
Array(IncidenceMatrix),
Expand Down
35 changes: 35 additions & 0 deletions src/type_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,41 @@ void add_graph(jlcxx::Module& jlpolymake)
wrapped.method("show_small_obj", [](const WrappedT& S) {
return show_small_object<WrappedT>(S);
});

wrapped.method("_canonical_hash", [](const WrappedT& G, const Array<Int>& col, long key) {
graph::GraphIso gi;
graph::GraphIso::prepare_colored(gi, G, col);
return gi.hash(key);
});
wrapped.method("_canonical_hash", [](const WrappedT& G, long key) {
return graph::canonical_hash(G, key);
});
wrapped.method("_canonical_perm", [](const WrappedT& G, const Array<Int>& col) {
graph::GraphIso gi;
graph::GraphIso::prepare_colored(gi, G, col);
return gi.canonical_perm();
});
wrapped.method("_canonical_form", [](const WrappedT& G) {
return graph::canonical_form(G);
});
wrapped.method("_is_isomorphic", [](const WrappedT& G1, const WrappedT& G2) {
return graph::isomorphic(G1, G2);
});
wrapped.method("_is_isomorphic_with_colors", [](const WrappedT& G1, const Array<Int>& col1, const WrappedT& G2, const Array<Int>& col2) {
return graph::isomorphic(G1, col1, G2, col2);
});
wrapped.method("_permute_nodes", [](const WrappedT& G, const Array<Int>& perm) {
return pm::permuted_nodes(G, perm);
});
wrapped.method("_permute_nodes!", [](WrappedT& G, const Array<Int>& perm) {
G.permute_nodes(perm);
});
wrapped.method("_automorphisms", [](const WrappedT& G, const Array<Int>& col) {
return graph::automorphisms(G, col);
});
wrapped.method("_automorphisms", [](const WrappedT& G) {
return graph::automorphisms(G);
});
});

jlpolymake.add_type<jlcxx::Parametric<jlcxx::TypeVar<1>>>("GraphEdgeIterator")
Expand Down
4 changes: 2 additions & 2 deletions test-prepare.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Pkg

Pkg.add(name="libcxxwrap_julia_jll", version="0.14.3")
Pkg.add(name="libcxxwrap_julia_jll", version="0.14.9")
Pkg.pin("libcxxwrap_julia_jll")
Pkg.add(name="polymake_jll", version="400.1500.0")
Pkg.add(name="polymake_jll", version="400.1500.2")

using polymake_jll
using libcxxwrap_julia_jll
Expand Down
Loading