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 L/LEMON/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using BinaryBuilder, Pkg

name = "LEMON"
version = v"1.3.2"
version = v"1.3.3"
upstreamversion = v"1.3.1"
min_jl_version = v"1.9"

Expand Down
23 changes: 18 additions & 5 deletions L/LEMON/bundled/cxxwrap/lemoncxxwrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
mod.add_type<ListGraph::Node>("ListGraphNode");
mod.add_type<ListDigraph::Node>("ListDigraphNode");
mod.add_type<ListGraph::Edge>("ListGraphEdge");
mod.add_type<ListGraph::Arc>("ListGraphArc");
mod.add_type<ListDigraph::Arc>("ListDigraphArc");

mod.method("id", static_cast<int(*)(ListGraph::Node)>(&ListGraph::id));
mod.method("id", static_cast<int(*)(ListGraph::Edge)>(&ListGraph::id));
mod.method("id", static_cast<int(*)(ListGraph::Arc)>(&ListGraph::id));
mod.method("id", static_cast<int(*)(ListDigraph::Node)>(&ListDigraph::id));
mod.method("id", static_cast<int(*)(ListDigraph::Arc)>(&ListDigraph::id));

Expand Down Expand Up @@ -67,11 +69,22 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
.constructor<const ListGraph&>()
.method("set", &ListGraph::EdgeMap<int>::set);

mod.add_type<MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int>>>("MaxWeightedPerfectMatchingListGraphInt")
using MWPM = MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int>>;
using MWPMmatchingedge_ptr = bool (MWPM::*)(const ListGraph::Edge&) const; // used to resolve the overloads of `matching`
using MWPMmatchingnode_ptr = ListGraph::Arc (MWPM::*)(const ListGraph::Node&) const; // used to resolve the overloads of `matching`
MWPMmatchingedge_ptr matchingedge = &MWPM::matching;
MWPMmatchingnode_ptr matchingnode = &MWPM::matching;
mod.add_type<MWPM>("MaxWeightedPerfectMatchingListGraphInt")
.constructor<const ListGraph&, const ListGraph::EdgeMap<int>&>()
.method("mate", &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int>>::mate)
.method("run", &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int>>::run)
.method("matchingWeight", &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int>>::matchingWeight);

.method("mate", &MWPM::mate)
.method("run", &MWPM::run)
.method("matchingWeight", &MWPM::matchingWeight)
.method("matching", matchingedge)
.method("matching", matchingnode)
.method("dualValue", &MWPM::dualValue)
.method("nodeValue", &MWPM::nodeValue)
.method("blossomNum", &MWPM::blossomNum)
.method("blossomSize", &MWPM::blossomSize)
.method("blossomValue", &MWPM::blossomValue);
}