91 cout <<
"Solve system Ax = v \n"
92 "------------------- \n\n";
108 <<
"QR factorization of A: \n"
113 cout <<
"Basic matrix operations \n"
114 "----------------------- \n\n";
128 cout <<
" C×B + D = \n" << (C * B + D) << std::endl;
130 cout <<
"Basic vector operations \n"
131 "----------------------- \n\n";
134 cout <<
"a = " << a <<
"\n"
135 <<
"b = " << b <<
"\n"
136 <<
"a×b = " << a.
cross(b) <<
"\n"
137 <<
"a·b = " << a.
dot(b) <<
"\n\n"
140 cout <<
"Element access \n"
141 "-------------- \n\n";
142 cout <<
"A[2,0] = " << A(2, 0) << std::endl;
145 cout <<
"A[2,0] ← 100" << std::endl;
147 cout <<
"A = \n" << A << std::endl;
Arduino std::ostream Serial wrapper.
QR factorization using Householder reflectors.
Matrix solve(const Matrix &B) const
Solve the system AX = B or QRX = B.
A row vector (1×n matrix).
static RowVector cross(const RowVector &a, const RowVector &b)
Compute the cross product of two 3-vectors.
static double dot(const RowVector &a, const RowVector &b)
Compute the dot product of two vectors.
A column vector (n×1 matrix).
static Vector ones(size_t size)
Create a vector filled with ones.