@@ -15,7 +15,7 @@ namespace {
1515
1616template <class Matrix >
1717std::string
18- repr (const char * name, const Matrix& m)
18+ reprMatrix (const char * name, const Matrix& m)
1919{
2020 typedef typename Matrix::BaseType T;
2121
@@ -43,7 +43,7 @@ repr(const char* name, const Matrix& m)
4343
4444template <class Matrix >
4545static bool
46- lessThan (const Matrix& mat1, const Matrix& mat2)
46+ lessThanMatrix (const Matrix& mat1, const Matrix& mat2)
4747{
4848 const int n = static_cast <int >(mat1.dimensions ());
4949 for (int x=0 ; x<n; x++)
@@ -81,7 +81,7 @@ register_matrix(py::class_<M<T>>& m, const char* name)
8181
8282 auto ri = py::return_value_policy::reference_internal;
8383
84- return m.def (" __repr__" , [name](const Matrix& self) { return repr (name, self); })
84+ return m.def (" __repr__" , [name](const Matrix& self) { return reprMatrix (name, self); })
8585 .def (py::init ([](){return Matrix ();}))
8686 .def (py::init<T>())
8787 .def (py::init<const Matrix&>())
@@ -96,10 +96,10 @@ register_matrix(py::class_<M<T>>& m, const char* name)
9696
9797 .def (py::self == py::self)
9898 .def (py::self != py::self)
99- .def (" __lt__" , &lessThan <Matrix>)
100- .def (" __le__" , [](const Matrix& a, const Matrix& b) { return !lessThan (b, a); })
101- .def (" __gt__" , [](const Matrix& a, const Matrix& b) { return lessThan (b, a); })
102- .def (" __ge__" , [](const Matrix& a, const Matrix& b) { return !lessThan (a, b); })
99+ .def (" __lt__" , &lessThanMatrix <Matrix>)
100+ .def (" __le__" , [](const Matrix& a, const Matrix& b) { return !lessThanMatrix (b, a); })
101+ .def (" __gt__" , [](const Matrix& a, const Matrix& b) { return lessThanMatrix (b, a); })
102+ .def (" __ge__" , [](const Matrix& a, const Matrix& b) { return !lessThanMatrix (a, b); })
103103 .def (" equalWithAbsError" , [](Matrix& self, const Matrix& other, double e) {
104104 return self.equalWithAbsError (other, typename Matrix::BaseType (e));
105105 })
0 commit comments