Commit 4119cf8c authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Add default constructors in search comparison functors

parent 2e1969c1
...@@ -101,6 +101,7 @@ private: ...@@ -101,6 +101,7 @@ private:
class AStarCmp class AStarCmp
{ {
public: public:
AStarCmp() {}
AStarCmp(python::object cmp): _cmp(cmp) {} AStarCmp(python::object cmp): _cmp(cmp) {}
template <class Value1, class Value2> template <class Value1, class Value2>
...@@ -116,6 +117,7 @@ private: ...@@ -116,6 +117,7 @@ private:
class AStarCmb class AStarCmb
{ {
public: public:
AStarCmb() {}
AStarCmb(python::object cmb): _cmb(cmb) {} AStarCmb(python::object cmb): _cmb(cmb) {}
template <class Value1, class Value2 > template <class Value1, class Value2 >
...@@ -132,8 +134,9 @@ template <class Graph, class Value> ...@@ -132,8 +134,9 @@ template <class Graph, class Value>
class AStarH class AStarH
{ {
public: public:
AStarH() {}
AStarH(GraphInterface& gi, Graph& g, python::object h) AStarH(GraphInterface& gi, Graph& g, python::object h)
: _gi(gi), _h(h), _gp(retrieve_graph_view<Graph>(gi, g)) {} : _h(h), _gp(retrieve_graph_view<Graph>(gi, g)) {}
Value operator()(GraphInterface::vertex_t v) const Value operator()(GraphInterface::vertex_t v) const
{ {
...@@ -141,7 +144,6 @@ public: ...@@ -141,7 +144,6 @@ public:
} }
private: private:
GraphInterface& _gi;
python::object _h; python::object _h;
std::shared_ptr<Graph> _gp; std::shared_ptr<Graph> _gp;
}; };
......
...@@ -85,6 +85,7 @@ private: ...@@ -85,6 +85,7 @@ private:
class BFCmp class BFCmp
{ {
public: public:
BFCmp() {}
BFCmp(python::object cmp): _cmp(cmp) {} BFCmp(python::object cmp): _cmp(cmp) {}
template <class Value1, class Value2> template <class Value1, class Value2>
...@@ -100,6 +101,7 @@ private: ...@@ -100,6 +101,7 @@ private:
class BFCmb class BFCmb
{ {
public: public:
BFCmb() {}
BFCmb(python::object cmb): _cmb(cmb) {} BFCmb(python::object cmb): _cmb(cmb) {}
template <class Value1, class Value2 > template <class Value1, class Value2 >
......
...@@ -94,6 +94,7 @@ private: ...@@ -94,6 +94,7 @@ private:
class DJKCmp class DJKCmp
{ {
public: public:
DJKCmp() {}
DJKCmp(python::object cmp): _cmp(cmp) {} DJKCmp(python::object cmp): _cmp(cmp) {}
template <class Value1, class Value2> template <class Value1, class Value2>
...@@ -109,6 +110,7 @@ private: ...@@ -109,6 +110,7 @@ private:
class DJKCmb class DJKCmb
{ {
public: public:
DJKCmb() {}
DJKCmb(python::object cmb): _cmb(cmb) {} DJKCmb(python::object cmb): _cmb(cmb) {}
template <class Value1, class Value2 > template <class Value1, class Value2 >
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment