#include "Sparse.h"
#include "Matrix.h"
namespace Aurora
{
    Sparse::Sparse()
    {
    }

    Sparse::~Sparse()
    {
    }

    Sparse::Sparse(Matrix RowIdxs, Matrix ColIdxs , Matrix Values,size_t M, size_t N)
    : mColIdxVector(ColIdxs),
    mRowIdxVector(RowIdxs),
    mValueVector(Values),
    mM(M),
    mN(N)
    {
        
    }
   
    bool Sparse::isValid() const
    {
        return mColIdxVector.isVector() && mRowIdxVector.isVector() && mValueVector.isVector()
                && mColIdxVector.getDataSize() == mRowIdxVector.getDataSize() 
                && mColIdxVector.getDataSize() == mValueVector.getDataSize();
    }
    
     Matrix& Sparse::getColVector() 
    {
        return mColIdxVector;
    }

     Matrix& Sparse::getRowVector() 
    {
        return mRowIdxVector;
    }

     Matrix& Sparse::getValVector() 
    {
        return mValueVector;
    }
    size_t Sparse::getM() const{
        return mM;
    }

    size_t Sparse::getN() const{
        return mN;
    }
}