Add Sparse functions.
This commit is contained in:
@@ -26,4 +26,19 @@ namespace Aurora
|
||||
&& mColIdxVector.getDataSize() == mRowIdxVector.getDataSize()
|
||||
&& mColIdxVector.getDataSize() == mValueVector.getDataSize();
|
||||
}
|
||||
|
||||
Matrix& Sparse::getColVector()
|
||||
{
|
||||
return mColIdxVector;
|
||||
}
|
||||
|
||||
Matrix& Sparse::getRowVector()
|
||||
{
|
||||
return mRowIdxVector;
|
||||
}
|
||||
|
||||
Matrix& Sparse::getValVector()
|
||||
{
|
||||
return mValueVector;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,10 @@ namespace Aurora {
|
||||
Sparse(Matrix Cols, Matrix Rows, Matrix Values,size_t M, size_t N);
|
||||
~Sparse();
|
||||
bool isValid() const;
|
||||
Matrix& getColVector();
|
||||
Matrix& getRowVector();
|
||||
Matrix& getValVector();
|
||||
|
||||
// TODO:add operators
|
||||
private:
|
||||
Matrix mColIdxVector;
|
||||
|
||||
Reference in New Issue
Block a user