diff options
Diffstat (limited to 'opentrack/simple-mat.hpp')
-rw-r--r-- | opentrack/simple-mat.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp index 864f0e49..2855ad0e 100644 --- a/opentrack/simple-mat.hpp +++ b/opentrack/simple-mat.hpp @@ -206,6 +206,14 @@ public: Mat(num* mem) : Mat(const_cast<const num*>(mem)) {} + template<int h = h_, + int w = w_, + typename = typename std::enable_if<h == 1 || w == 1>::type> + operator const double*() const + { + return reinterpret_cast<const double*>(data); + } + // XXX add more operators as needed, third-party dependencies mostly // not needed merely for matrix algebra -sh 20141030 |