diff --git a/src/Function3D.cpp b/src/Function3D.cpp index ddb5fc8..62181ce 100644 --- a/src/Function3D.cpp +++ b/src/Function3D.cpp @@ -97,9 +97,10 @@ Matrix Aurora::size(const Matrix &aMatrix) return Matrix::New(output,1,1,1); } else if (aMatrix.isVector()){ - double * output = Aurora::malloc(1); - output[0]=aMatrix.getDataSize(); - return Matrix::New(output,1,1,1); + double * output = Aurora::malloc(2); + output[0]=aMatrix.getDimSize(0); + output[1]=aMatrix.getDimSize(0); + return Matrix::New(output,2,1,1); } //3D else if (aMatrix.getDimSize(2)>1){ diff --git a/src/Sparse.cpp b/src/Sparse.cpp index ad76baf..293685e 100644 --- a/src/Sparse.cpp +++ b/src/Sparse.cpp @@ -10,7 +10,7 @@ namespace Aurora { } - Sparse::Sparse(Matrix& Cols, Matrix& Rows, Matrix& Values,size_t M, size_t N) + Sparse::Sparse(Matrix Cols, Matrix Rows, Matrix Values,size_t M, size_t N) : mColIdxVector(Cols), mRowIdxVector(Rows), mValueVector(Values), diff --git a/src/Sparse.h b/src/Sparse.h index 0844b20..67fc470 100644 --- a/src/Sparse.h +++ b/src/Sparse.h @@ -7,7 +7,7 @@ namespace Aurora { { public: Sparse(); - Sparse(Matrix& Cols, Matrix& Rows, Matrix& Values,size_t M, size_t N); + Sparse(Matrix Cols, Matrix Rows, Matrix Values,size_t M, size_t N); ~Sparse(); bool isValid() const; // TODO:add operators