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);
|
return Matrix::New(output,1,1,1);
|
||||||
}
|
}
|
||||||
else if (aMatrix.isVector()){
|
else if (aMatrix.isVector()){
|
||||||
double * output = Aurora::malloc(1);
|
double * output = Aurora::malloc(2);
|
||||||
output[0]=aMatrix.getDataSize();
|
output[0]=aMatrix.getDimSize(0);
|
||||||
return Matrix::New(output,1,1,1);
|
output[1]=aMatrix.getDimSize(0);
|
||||||
|
return Matrix::New(output,2,1,1);
|
||||||
}
|
}
|
||||||
//3D
|
//3D
|
||||||
else if (aMatrix.getDimSize(2)>1){
|
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),
|
: mColIdxVector(Cols),
|
||||||
mRowIdxVector(Rows),
|
mRowIdxVector(Rows),
|
||||||
mValueVector(Values),
|
mValueVector(Values),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Aurora {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sparse();
|
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();
|
~Sparse();
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
// TODO:add operators
|
// TODO:add operators
|
||||||
|
|||||||
Reference in New Issue
Block a user