first good build. Part, PartFrame, Matrix
This commit is contained in:
22
MbDCode/SparseMatrix.h
Normal file
22
MbDCode/SparseMatrix.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
typedef std::shared_ptr<MbD::SparseMatrix<double>> SpMatDptr;
|
||||
typedef std::initializer_list<std::initializer_list<std::initializer_list<double>>> ListListPairD;
|
||||
|
||||
Reference in New Issue
Block a user