Change Sparse

This commit is contained in:
kradchen
2023-06-01 11:40:30 +08:00
parent b7e3970dce
commit ac24876e53
2 changed files with 15 additions and 5 deletions

View File

@@ -10,9 +10,9 @@ namespace Aurora
{
}
Sparse::Sparse(Matrix Cols, Matrix Rows, Matrix Values,size_t M, size_t N)
: mColIdxVector(Cols),
mRowIdxVector(Rows),
Sparse::Sparse(Matrix RowIdxs, Matrix ColIdxs , Matrix Values,size_t M, size_t N)
: mColIdxVector(ColIdxs),
mRowIdxVector(RowIdxs),
mValueVector(Values),
mM(M),
mN(N)

View File

@@ -7,13 +7,23 @@ namespace Aurora {
{
public:
Sparse();
Sparse(Matrix Cols, Matrix Rows, Matrix Values,size_t M, size_t N);
Sparse(Matrix RowIdxs, Matrix ColIdxs, Matrix Values,size_t M, size_t N);
~Sparse();
bool isValid() const;
Matrix& getColVector() ;
Matrix& getRowVector() ;
Matrix& getValVector() ;
/**
* @brief Rows
*
* @return size_t
*/
size_t getM() const;
/**
* @brief Cols
*
* @return size_t
*/
size_t getN() const;
// TODO:add operators
private: