Third commit

This commit is contained in:
Aik-Siong Koh
2023-04-28 17:42:51 -06:00
parent 8ca8eb7122
commit 43570d87cd
13 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1 @@
#include "DiagonalMatrix.h"

9
MbDCode/DiagonalMatrix.h Normal file
View File

@@ -0,0 +1,9 @@
#pragma once
#include "Array.h"
namespace MbD {
template <typename T>
class DiagonalMatrix : public Array<T>
{
};
}

12
MbDCode/EndFramec.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include "EndFramec.h"
using namespace MbD;
EndFramec::EndFramec()
{
}
void EndFramec::setMarkerFrame(MarkerFrame* markerFrm)
{
markerFrame = markerFrm;
}

22
MbDCode/EndFramec.h Normal file
View File

@@ -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<double>* rOeO = new FullColumn<double>(3);
FullMatrix<double>* aAOe = new FullMatrix<double>(3, 3);
};
}

7
MbDCode/EndFrameqc.cpp Normal file
View File

@@ -0,0 +1,7 @@
#include "EndFrameqc.h"
using namespace MbD;
EndFrameqc::EndFrameqc() : EndFramec()
{
}

19
MbDCode/EndFrameqc.h Normal file
View File

@@ -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<double>* prOeOpE = new FullMatrix<double>(3, 4);
FullMatrix<FullColumn<double>>* pprOeOpEpE = new FullMatrix<FullColumn<double>>(3, 4);
FullColumn<FullMatrix<double>>* pAOepE = new FullColumn<FullMatrix<double>>(4);
FullMatrix<FullMatrix<double>>* ppAOepEpE = new FullMatrix<FullMatrix<double>>(4, 4);
};
}

1
MbDCode/EndFrameqct.cpp Normal file
View File

@@ -0,0 +1 @@
#include "EndFrameqct.h"

9
MbDCode/EndFrameqct.h Normal file
View File

@@ -0,0 +1,9 @@
#pragma once
#include "EndFrameqc.h"
namespace MbD {
class EndFrameqct :
public EndFrameqc
{
};
}

11
MbDCode/FullMatrix.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "FullMatrix.h"
using namespace MbD;
FullMatrix<double>::FullMatrix(int m, int n) {
for (int i = 0; i < m; i++) {
auto* row = new FullRow<double>(n);
this->push_back(row);
}
}

17
MbDCode/FullMatrix.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include "RowTypeMatrix.h"
#include "FullRow.h"
namespace MbD {
template <typename T>
class FullMatrix : public RowTypeMatrix<FullRow<T>*>
{
public:
FullMatrix() {
// constructor code here
}
FullMatrix(int m, int n);
//FullMatrix(std::initializer_list<T> list) : RowTypeMatrix<FullRow<T>>{ list } {}
};
}

0
MbDCode/MbDCode.h Normal file
View File

View File

@@ -0,0 +1 @@
#include "RowTypeMatrix.h"

21
MbDCode/RowTypeMatrix.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#include "Array.h"
namespace MbD {
template <typename T>
class RowTypeMatrix : public Array<T>
{
public:
RowTypeMatrix() {}
RowTypeMatrix(std::initializer_list<T> list) : Array<T>{ list } {}
void copy(RowTypeMatrix<T>* x);
};
template<typename T>
inline void RowTypeMatrix<T>::copy(RowTypeMatrix<T>* x)
{
for (int i = 0; i < x->size(); i++) {
this->at(i)->copy(x->at(i));
}
}
}