From 43570d87cd22b2013ad261bb5b568fc87065f4d6 Mon Sep 17 00:00:00 2001 From: Aik-Siong Koh Date: Fri, 28 Apr 2023 17:42:51 -0600 Subject: [PATCH] Third commit --- MbDCode/DiagonalMatrix.cpp | 1 + MbDCode/DiagonalMatrix.h | 9 +++++++++ MbDCode/EndFramec.cpp | 12 ++++++++++++ MbDCode/EndFramec.h | 22 ++++++++++++++++++++++ MbDCode/EndFrameqc.cpp | 7 +++++++ MbDCode/EndFrameqc.h | 19 +++++++++++++++++++ MbDCode/EndFrameqct.cpp | 1 + MbDCode/EndFrameqct.h | 9 +++++++++ MbDCode/FullMatrix.cpp | 11 +++++++++++ MbDCode/FullMatrix.h | 17 +++++++++++++++++ MbDCode/MbDCode.h | 0 MbDCode/RowTypeMatrix.cpp | 1 + MbDCode/RowTypeMatrix.h | 21 +++++++++++++++++++++ 13 files changed, 130 insertions(+) create mode 100644 MbDCode/DiagonalMatrix.cpp create mode 100644 MbDCode/DiagonalMatrix.h create mode 100644 MbDCode/EndFramec.cpp create mode 100644 MbDCode/EndFramec.h create mode 100644 MbDCode/EndFrameqc.cpp create mode 100644 MbDCode/EndFrameqc.h create mode 100644 MbDCode/EndFrameqct.cpp create mode 100644 MbDCode/EndFrameqct.h create mode 100644 MbDCode/FullMatrix.cpp create mode 100644 MbDCode/FullMatrix.h create mode 100644 MbDCode/MbDCode.h create mode 100644 MbDCode/RowTypeMatrix.cpp create mode 100644 MbDCode/RowTypeMatrix.h diff --git a/MbDCode/DiagonalMatrix.cpp b/MbDCode/DiagonalMatrix.cpp new file mode 100644 index 0000000..4d12ace --- /dev/null +++ b/MbDCode/DiagonalMatrix.cpp @@ -0,0 +1 @@ +#include "DiagonalMatrix.h" diff --git a/MbDCode/DiagonalMatrix.h b/MbDCode/DiagonalMatrix.h new file mode 100644 index 0000000..b2b5bc8 --- /dev/null +++ b/MbDCode/DiagonalMatrix.h @@ -0,0 +1,9 @@ +#pragma once +#include "Array.h" +namespace MbD { + template + class DiagonalMatrix : public Array + { + }; +} + diff --git a/MbDCode/EndFramec.cpp b/MbDCode/EndFramec.cpp new file mode 100644 index 0000000..6b35584 --- /dev/null +++ b/MbDCode/EndFramec.cpp @@ -0,0 +1,12 @@ +#include "EndFramec.h" + +using namespace MbD; + +EndFramec::EndFramec() +{ +} + +void EndFramec::setMarkerFrame(MarkerFrame* markerFrm) +{ + markerFrame = markerFrm; +} diff --git a/MbDCode/EndFramec.h b/MbDCode/EndFramec.h new file mode 100644 index 0000000..454d7f3 --- /dev/null +++ b/MbDCode/EndFramec.h @@ -0,0 +1,22 @@ +#pragma once +#include "CartesianFrame.h" +#include "MarkerFrame.h" +#include "FullColumn.h" +#include "FullMatrix.h" + +namespace MbD { + class MarkerFrame; + + class EndFramec : public CartesianFrame + { + //markerFrame rOeO aAOe + public: + EndFramec(); + void setMarkerFrame(MarkerFrame* markerFrm); + + MarkerFrame* markerFrame; + FullColumn* rOeO = new FullColumn(3); + FullMatrix* aAOe = new FullMatrix(3, 3); + }; +} + diff --git a/MbDCode/EndFrameqc.cpp b/MbDCode/EndFrameqc.cpp new file mode 100644 index 0000000..b84300c --- /dev/null +++ b/MbDCode/EndFrameqc.cpp @@ -0,0 +1,7 @@ +#include "EndFrameqc.h" + +using namespace MbD; + +EndFrameqc::EndFrameqc() : EndFramec() +{ +} diff --git a/MbDCode/EndFrameqc.h b/MbDCode/EndFrameqc.h new file mode 100644 index 0000000..848ec5c --- /dev/null +++ b/MbDCode/EndFrameqc.h @@ -0,0 +1,19 @@ +#pragma once +#include "EndFramec.h" +#include "FullColumn.h" +#include "FullMatrix.h" + +namespace MbD { + + class EndFrameqc : public EndFramec + { + //prOeOpE pprOeOpEpE pAOepE ppAOepEpE + public: + EndFrameqc(); + FullMatrix* prOeOpE = new FullMatrix(3, 4); + FullMatrix>* pprOeOpEpE = new FullMatrix>(3, 4); + FullColumn>* pAOepE = new FullColumn>(4); + FullMatrix>* ppAOepEpE = new FullMatrix>(4, 4); + }; +} + diff --git a/MbDCode/EndFrameqct.cpp b/MbDCode/EndFrameqct.cpp new file mode 100644 index 0000000..2398841 --- /dev/null +++ b/MbDCode/EndFrameqct.cpp @@ -0,0 +1 @@ +#include "EndFrameqct.h" diff --git a/MbDCode/EndFrameqct.h b/MbDCode/EndFrameqct.h new file mode 100644 index 0000000..2365cdf --- /dev/null +++ b/MbDCode/EndFrameqct.h @@ -0,0 +1,9 @@ +#pragma once +#include "EndFrameqc.h" +namespace MbD { + class EndFrameqct : + public EndFrameqc + { + }; +} + diff --git a/MbDCode/FullMatrix.cpp b/MbDCode/FullMatrix.cpp new file mode 100644 index 0000000..2c252f2 --- /dev/null +++ b/MbDCode/FullMatrix.cpp @@ -0,0 +1,11 @@ +#include "FullMatrix.h" + +using namespace MbD; + +FullMatrix::FullMatrix(int m, int n) { + for (int i = 0; i < m; i++) { + auto* row = new FullRow(n); + this->push_back(row); + } +} + diff --git a/MbDCode/FullMatrix.h b/MbDCode/FullMatrix.h new file mode 100644 index 0000000..05bc320 --- /dev/null +++ b/MbDCode/FullMatrix.h @@ -0,0 +1,17 @@ +#pragma once +#include "RowTypeMatrix.h" +#include "FullRow.h" + +namespace MbD { + template + class FullMatrix : public RowTypeMatrix*> + { + public: + FullMatrix() { + // constructor code here + } + FullMatrix(int m, int n); + //FullMatrix(std::initializer_list list) : RowTypeMatrix>{ list } {} + }; +} + diff --git a/MbDCode/MbDCode.h b/MbDCode/MbDCode.h new file mode 100644 index 0000000..e69de29 diff --git a/MbDCode/RowTypeMatrix.cpp b/MbDCode/RowTypeMatrix.cpp new file mode 100644 index 0000000..aaa7af2 --- /dev/null +++ b/MbDCode/RowTypeMatrix.cpp @@ -0,0 +1 @@ +#include "RowTypeMatrix.h" diff --git a/MbDCode/RowTypeMatrix.h b/MbDCode/RowTypeMatrix.h new file mode 100644 index 0000000..c528c9c --- /dev/null +++ b/MbDCode/RowTypeMatrix.h @@ -0,0 +1,21 @@ +#pragma once +#include "Array.h" +namespace MbD { + template + class RowTypeMatrix : public Array + { + public: + RowTypeMatrix() {} + RowTypeMatrix(std::initializer_list list) : Array{ list } {} + void copy(RowTypeMatrix* x); + }; + + template + inline void RowTypeMatrix::copy(RowTypeMatrix* x) + { + for (int i = 0; i < x->size(); i++) { + this->at(i)->copy(x->at(i)); + } + } +} +