@@ -29,10 +29,12 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
2929 mod.add_type <ListGraph::Node>(" ListGraphNode" );
3030 mod.add_type <ListDigraph::Node>(" ListDigraphNode" );
3131 mod.add_type <ListGraph::Edge>(" ListGraphEdge" );
32+ mod.add_type <ListGraph::Arc>(" ListGraphArc" );
3233 mod.add_type <ListDigraph::Arc>(" ListDigraphArc" );
3334
3435 mod.method (" id" , static_cast <int (*)(ListGraph::Node)>(&ListGraph::id));
3536 mod.method (" id" , static_cast <int (*)(ListGraph::Edge)>(&ListGraph::id));
37+ mod.method (" id" , static_cast <int (*)(ListGraph::Arc)>(&ListGraph::id));
3638 mod.method (" id" , static_cast <int (*)(ListDigraph::Node)>(&ListDigraph::id));
3739 mod.method (" id" , static_cast <int (*)(ListDigraph::Arc)>(&ListDigraph::id));
3840
@@ -67,11 +69,22 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
6769 .constructor <const ListGraph&>()
6870 .method (" set" , &ListGraph::EdgeMap<int >::set);
6971
70- mod.add_type <MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int >>>(" MaxWeightedPerfectMatchingListGraphInt" )
72+ using MWPM = MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int >>;
73+ using MWPMmatchingedge_ptr = bool (MWPM::*)(const ListGraph::Edge&) const ; // used to resolve the overloads of `matching`
74+ using MWPMmatchingnode_ptr = ListGraph::Arc (MWPM::*)(const ListGraph::Node&) const ; // used to resolve the overloads of `matching`
75+ MWPMmatchingedge_ptr matchingedge = &MWPM::matching;
76+ MWPMmatchingnode_ptr matchingnode = &MWPM::matching;
77+ mod.add_type <MWPM>(" MaxWeightedPerfectMatchingListGraphInt" )
7178 .constructor <const ListGraph&, const ListGraph::EdgeMap<int >&>()
72- .method (" mate" , &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int >>::mate)
73- .method (" run" , &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int >>::run)
74- .method (" matchingWeight" , &MaxWeightedPerfectMatching<ListGraph, ListGraph::EdgeMap<int >>::matchingWeight);
75-
79+ .method (" mate" , &MWPM::mate)
80+ .method (" run" , &MWPM::run)
81+ .method (" matchingWeight" , &MWPM::matchingWeight)
82+ .method (" matching" , matchingedge)
83+ .method (" matching" , matchingnode)
84+ .method (" dualValue" , &MWPM::dualValue)
85+ .method (" nodeValue" , &MWPM::nodeValue)
86+ .method (" blossomNum" , &MWPM::blossomNum)
87+ .method (" blossomSize" , &MWPM::blossomSize)
88+ .method (" blossomValue" , &MWPM::blossomValue);
7689}
7790
0 commit comments