Skip to content

Commit

Permalink
wrap more types
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz committed Aug 12, 2024
1 parent c50da37 commit 798f796
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/polymake/type_setup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ sub EdgeMap {
Array(Array(Rational)),
Array(Array(Set(Int))),
Array(Matrix(Integer)),
Array(Matrix(Rational)),
Array(Vector(Integer)),
Array(Vector(Rational)),
Array(BigObject),

Pair(Matrix(TropicalNumber(Max,Rational)),Matrix(TropicalNumber(Max,Rational))),
Expand Down Expand Up @@ -249,21 +252,33 @@ sub EdgeMap {
Map(Set(Int),Rational),
Map(Set(Int),Vector(Rational)),
Map(Vector(Int),Integer),
Map(Pair(Int,Int),Int),
Map(Pair(Int,Int),Vector(Integer)),

IncidenceMatrix,
Array(IncidenceMatrix),

Graph,

NodeMap(Int),
NodeMap(double),
NodeMap(Integer),
NodeMap(Rational),
NodeMap(String),
NodeMap(Set(Int)),
NodeMap(Array(Set(Int))),
NodeMap(Vector(double)),
NodeMap(Vector(Rational)),
NodeMap(IncidenceMatrix),

EdgeMap(Int),
EdgeMap(double),
EdgeMap(Integer),
EdgeMap(Rational),
EdgeMap(String),
EdgeMap(Vector(double)),
EdgeMap(Vector(Rational)),
EdgeMap(Array(Array(Int))),

[
"HomologyGroup_Integer",
Expand Down
1 change: 1 addition & 0 deletions src/type_incidencematrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void add_incidencematrix(jlcxx::Module& jlpolymake)
});
wrapped.method("_resize!", [](WrappedT& M, int64_t i,
int64_t j) { M.resize(i, j); });
wrapped.method("negate", [](const WrappedT& M) { return Wrapped(~M); });
wrapped.method("take",
[](pm::perl::BigObject p, const std::string& s,
const WrappedT& M) { p.take(s) << M; });
Expand Down

0 comments on commit 798f796

Please sign in to comment.