Fix sparse and function size
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user