diff --git a/README.md b/README.md index 7856417..c020eaa 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Epigraph is a modern C++ interface to formulate and solve linear, quadratic and ## Dependencies -* [Eigen](http://eigen.tuxfamily.org) 3.3.7 +* [Eigen](http://eigen.tuxfamily.org) ## Supported Solvers diff --git a/include/parameter.hpp b/include/parameter.hpp index 26b52dc..c2b384d 100644 --- a/include/parameter.hpp +++ b/include/parameter.hpp @@ -87,6 +87,9 @@ namespace cvx bool operator==(const Parameter &other) const; + // required for eigen < 3.3.7 + bool operator==(const int const_value) const; + Parameter operator+(const Parameter &other) const; Parameter operator-(const Parameter &other) const; Parameter operator-() const; diff --git a/src/parameter.cpp b/src/parameter.cpp index d3c6ce8..c468bd4 100644 --- a/src/parameter.cpp +++ b/src/parameter.cpp @@ -147,6 +147,11 @@ namespace cvx::internal return compare_sources(this->source, other.source); } + bool Parameter::operator==(const int const_value) const + { + return compare_sources(this->source, Parameter(const_value).source); + } + Parameter::operator double() const { return getValue();