diff --git a/miscmaths.cc b/miscmaths.cc index 6e42bd39774038a9ddefc25eee381b5e6df229ca..1b1b63944ee75425e2a673af899992f0383fcfdb 100644 --- a/miscmaths.cc +++ b/miscmaths.cc @@ -28,6 +28,15 @@ namespace MISCMATHS { using std::atan2; + string size(const Matrix& mat) + { + string str = num2str(mat.Nrows())+"*"+num2str(mat.Ncols()); + + return str; + } + + + float Sinc(const float x) { if (fabs(x)<1e-9) { return 1-x*x*M_PI*M_PI/6.0; diff --git a/miscmaths.h b/miscmaths.h index 963c20aae5b99217bb1916f1f9344918697241e4..0da285d5b0a1ea0141c2819303b45d0f5d2adaee 100644 --- a/miscmaths.h +++ b/miscmaths.h @@ -41,13 +41,7 @@ namespace MISCMATHS { // IO/string stuff template <class T> string num2str(T n, int width=-1); - string size(const Matrix& mat) - { - string str = num2str(mat.Nrows())+"*"+num2str(mat.Ncols()); - - return str; - } - + string size(const Matrix& mat); bool isnum(const string& str); ReturnMatrix read_ascii_matrix(const string& filename, int nrows, int ncols); ReturnMatrix read_ascii_matrix(int nrows, int ncols, const string& filename);