summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 696bdb6)
raw | patch | inline | side by side (parent: 696bdb6)
author | mcecchetti <mcecchetti@users.sourceforge.net> | |
Sun, 6 Jul 2008 15:36:49 +0000 (15:36 +0000) | ||
committer | mcecchetti <mcecchetti@users.sourceforge.net> | |
Sun, 6 Jul 2008 15:36:49 +0000 (15:36 +0000) |
src/2geom/numeric/matrix.cpp | patch | blob | history | |
src/2geom/numeric/matrix.h | patch | blob | history | |
src/2geom/numeric/vector.h | patch | blob | history |
index 30b452b37e4f7f406238d01dd510d950af9f1610..bb2a4cefda7ede3bb379a3649683bd182fe8432b 100644 (file)
*/
-#include "matrix.h"
-#include "vector.h"
+#include <2geom/numeric/matrix.h>
+#include <2geom/numeric/vector.h>
index 156b6e9a25b24a2b0fae0f98918c332bd894a942..e9b6e6e9e13b53c8f4a9962a38b20559653d97ca 100644 (file)
bool is_positive() const
{
- return gsl_matrix_ispos(m_matrix);
+ for ( unsigned int i = 0; i < rows(); ++i )
+ {
+ for ( unsigned int j = 0; j < columns(); ++j )
+ {
+ if ( (*this)(i,j) <= 0 ) return false;
+ }
+ }
+ return true;
}
bool is_negative() const
{
- return gsl_matrix_isneg(m_matrix);
+ for ( unsigned int i = 0; i < rows(); ++i )
+ {
+ for ( unsigned int j = 0; j < columns(); ++j )
+ {
+ if ( (*this)(i,j) >= 0 ) return false;
+ }
+ }
+ return true;
}
bool is_non_negative() const
index 3e53405f42d0dfef76180944bf8985aefeaaf7a5..04c1333727b9190df75e4f2093dac3c2f7e54c59 100644 (file)
bool is_positive() const
{
- return gsl_vector_ispos(m_vector);
+ for ( size_t i = 0; i < size(); ++i )
+ {
+ if ( (*this)[i] <= 0 ) return false;
+ }
+ return true;
}
bool is_negative() const
{
- return gsl_vector_isneg(m_vector);
+ for ( size_t i = 0; i < size(); ++i )
+ {
+ if ( (*this)[i] >= 0 ) return false;
+ }
+ return true;
}
bool is_non_negative() const