#pragma once

struct Entry
{
    int row;
    int col;
    int value;
};

class SparseMatrix
{
public:
    SparseMatrix(void);
    virtual ~SparseMatrix(void);
    static void unitTest(void);
    void setValue(int nRows, int nCols, int nElems, struct Entry *A);
    void read(void);
    void print(void) const;
    void transpose(const SparseMatrix &A);
    bool equal(const SparseMatrix &B) const;
    void multiply(const SparseMatrix &B);
private:
    int m_nRows;
    int m_nCols;
    int m_nElems;
    struct Entry *m_A;
};

