runPosIC, initializeGlobally

This commit is contained in:
Aik-Siong Koh
2023-05-27 21:43:09 -06:00
parent 6a577c052c
commit 9ddbdca742
139 changed files with 2401 additions and 431 deletions

View File

@@ -7,8 +7,15 @@ namespace MbD {
class SparseMatrix : public RowTypeMatrix<std::shared_ptr<SparseRow<T>>>
{
public:
SparseMatrix(int m, int n) {
for (size_t i = 0; i < m; i++)
{
auto row = std::make_shared<SparseRow<T>>(n);
this->push_back(row);
}
}
SparseMatrix(std::initializer_list<std::initializer_list<std::initializer_list<double>>> list2D) {
for (auto rowList : list2D)
for (auto& rowList : list2D)
{
auto row = std::make_shared<SparseRow<T>>(rowList);
this->push_back(row);