Files
solver/MbDCode/SparseMatrix.h
2023-05-12 21:50:11 -06:00

19 lines
480 B
C++

#pragma once
#include "RowTypeMatrix.h"
#include "SparseRow.h"
namespace MbD {
template <typename T>
class SparseMatrix : public RowTypeMatrix<std::shared_ptr<SparseRow<T>>>
{
public:
SparseMatrix(std::initializer_list<std::initializer_list<std::initializer_list<double>>> list2D) {
for (auto rowList : list2D)
{
auto row = std::make_shared<SparseRow<T>>(rowList);
this->push_back(row);
}
}
};
using SpMatDptr = std::shared_ptr<SparseMatrix<double>>;
}