MatrixXX.h
Go to the documentation of this file.
1 #ifndef GfxTL__MATRIXX_HEADER__
2 #define GfxTL__MATRIXX_HEADER__
3 #ifndef _USE_MATH_DEFINES
4 #define _USE_MATH_DEFINES
5 #endif
6 #include <algorithm>
7 #include <cmath>
8 #include <cstring>
9 #include <iostream>
10 
11 
12 #include <GfxTL/StdOverrides.h>
13 #ifdef min
14 #undef min
15 #endif
16 #ifdef max
17 #undef max
18 #endif
19 
20 namespace GfxTL
21 {
22  // forward declaration
23  template <unsigned int D, class T>
24  class VectorXD;
25 
26  // forward declaration
27  template <unsigned int C, unsigned int R, class T>
28  class MatrixXX;
29 
30  // matrix operators
31  template <unsigned int C, unsigned int R, class T>
33  template <unsigned int C, unsigned int R, class T>
35  template <unsigned int C, unsigned int R, class T>
37  template <unsigned int C, unsigned int R, class T>
39  template <unsigned int C, unsigned int R, class T>
41  template <unsigned int C, unsigned int R, class T>
42  bool operator==(const MatrixXX<C, R, T>& a, const MatrixXX<C, R, T>& b);
43  template <unsigned int C, unsigned int R, class T>
44  bool operator!=(const MatrixXX<C, R, T>& a, const MatrixXX<C, R, T>& b);
45 
46  namespace Internal
47  {
48  /** Matrix in column major order */
49  template <unsigned int C, unsigned int R, class T>
51  {
52  public:
53  typedef T ScalarType;
54  typedef T value_type;
56 
57  enum
58  {
59  Rows = R,
60  Cols = C,
61  Entries = C * R
62  };
63 
65  operator[](unsigned int col)
66  {
67  return *(reinterpret_cast<VectorXD<R, T>*>(&_m[col * R]));
68  }
69 
70  const VectorXD<R, T>&
71  operator[](unsigned int col) const
72  {
73  return *(reinterpret_cast<const VectorXD<R, T>*>(&_m[col * R]));
74  }
75 
76  void
77  Zero()
78  {
79  memset(_m, 0, sizeof(_m));
80  }
81 
82  T*
83  Data()
84  {
85  return _m;
86  }
87 
88  const T*
89  Data() const
90  {
91  return _m;
92  }
93 
94  T
96  {
97  T s = 0;
98  for (unsigned int i = 0; i < C * R; ++i)
99  {
100  s += _m[i] * _m[i];
101  }
102  if (s == 0)
103  {
104  return s;
105  }
106  s = T(std::sqrt(s));
107  for (unsigned int i = 0; i < C * R; ++i)
108  {
109  _m[i] /= s;
110  }
111  return s;
112  }
113 
114  void
116  {
117  for (unsigned int c = 0; c < C; ++c)
118  for (unsigned int r = 0; r < R; ++r)
119  {
120  (*t)[r][c] = (*this)[c][r];
121  }
122  }
123 
124  protected:
126  };
127  }; // namespace Internal
128 
129  // matrix class
130  template <unsigned int C, unsigned int R, class T>
131  class MatrixXX : public Internal::BaseMatrixXX<C, R, T>
132  {
133  public:
137 
139  {
140  }
141 
142  MatrixXX(const SuperType& mat) : SuperType(mat)
143  {
144  }
145 
146  MatrixXX(const ThisType& mat)
147  {
148  std::memcpy(SuperType::_m, mat._m, sizeof(SuperType::_m));
149  }
150 
151  explicit MatrixXX(T v)
152  {
153  for (unsigned int i = 0; i < SuperType::Entries; ++i)
154  {
155  SuperType::_m[i] = v;
156  }
157  }
158 
159  explicit MatrixXX(const T* m)
160  {
161  std::memcpy(SuperType::_m, m, sizeof(SuperType::_m));
162  }
163 
165  {
167  (*this)[0] = a;
168  (*this)[1] = b;
169  }
170 
172  {
174  (*this)[0] = a;
175  (*this)[1] = b;
176  (*this)[2] = c;
177  }
178 
180  const MatrixXX<1, R, T>& b,
181  const MatrixXX<1, R, T>& c,
182  const MatrixXX<1, R, T>& d)
183  {
185  (*this)[0] = a;
186  (*this)[1] = b;
187  (*this)[2] = c;
188  (*this)[3] = c;
189  }
190 
191  ThisType&
193  {
194  for (unsigned int i = 0; i < SuperType::Entries; ++i)
195  {
196  SuperType::_m[i] = v;
197  }
198  return *this;
199  }
200 
201  ThisType&
203  {
204  for (unsigned int i = 0; i < SuperType::Entries; ++i)
205  {
206  SuperType::_m[i] = v._m[i];
207  }
208  return *this;
209  }
210 
213  {
214  for (unsigned int i = 0; i < SuperType::Entries; ++i)
215  {
216  SuperType::_m[i] *= a._m[i];
217  }
218  return *this;
219  }
220 
223  {
224  TransposedType t;
226  return t;
227  }
228 
229  protected:
230  template <unsigned int A, unsigned int B>
231  struct AssertDim
232  {
233  static inline void
235  {
236 #ifdef WIN32
237  Error_InvalidDimension();
238 #else
239  exit(123);
240 #endif
241  }
242  };
243 
244  template <unsigned int A>
245  struct AssertDim<A, A>
246  {
247  static inline void
249  {
250  }
251  };
252  };
253 
254  // matrix specialization
255  template <class T>
256  class MatrixXX<1, 1, T> : public Internal::BaseMatrixXX<1, 1, T>
257  {
258  public:
262 
264  {
265  }
266 
267  MatrixXX(const SuperType& mat) : SuperType(mat)
268  {
269  }
270 
272  {
273  std::memcpy(SuperType::_m, mat._m, sizeof(SuperType::_m));
274  }
275 
277  {
278  SuperType::_m[0] = v;
279  }
280 
281  explicit MatrixXX(const T* m)
282  {
283  std::memcpy(SuperType::_m, m, sizeof(SuperType::_m));
284  }
285 
286  ThisType&
288  {
289  SuperType::_m[0] = v;
290  return *this;
291  }
292 
295  {
296  for (unsigned int i = 0; i < SuperType::Entries; ++i)
297  {
298  SuperType::_m[i] *= a._m[i];
299  }
300  return *this;
301  }
302 
303  operator const T() const
304  {
305  return SuperType::_m[0];
306  }
307 
308  operator T&()
309  {
310  return SuperType::_m[0];
311  }
312  };
313 
314  // matrix operator implemenation
315  template <unsigned int C, unsigned int R, class T>
316  inline MatrixXX<C, R, T>&
318  {
319  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
320  {
321  m.Data()[i] += b.Data()[i];
322  }
323  return m;
324  }
325 
326  template <unsigned int C, unsigned int R, class T>
327  inline MatrixXX<C, R, T>&
329  {
330  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
331  {
332  m.Data()[i] -= b.Data()[i];
333  }
334  return m;
335  }
336 
337  template <unsigned int C, unsigned int R, class T>
338  inline MatrixXX<C, R, T>&
340  {
341  m = m * b;
342  return m;
343  }
344 
345  template <unsigned int C, unsigned int R, class T>
346  inline MatrixXX<C, R, T>&
348  {
349  return m *= (const T)b;
350  }
351 
352  template <unsigned int C, unsigned int R, class T>
353  inline MatrixXX<C, R, T>&
355  {
356  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
357  {
358  m.Data()[i] *= s;
359  }
360  return m;
361  }
362 
363  template <unsigned int C, unsigned int R, class T>
364  inline MatrixXX<C, R, T>&
366  {
367  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
368  {
369  m.Data()[i] /= s;
370  }
371  return m;
372  }
373 
374  template <unsigned int C, unsigned int R, class T>
375  inline MatrixXX<C, R, T>
377  {
379  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
380  {
381  m.Data()[i] = typename MatrixXX<C, R, T>::ScalarType(-1) * a.Data()[i];
382  }
383  return m;
384  }
385 
386  template <unsigned int C, unsigned int R, class T>
387  inline bool
389  {
390  return memcmp(a.Data(), b.Data(), sizeof(a)) == 0;
391  }
392 
393  template <unsigned int C, unsigned int R, class T>
394  inline bool
396  {
397  return memcmp(a.Data(), b.Data(), sizeof(a)) != 0;
398  }
399 
400  template <unsigned int C, unsigned int R, class T>
401  inline const MatrixXX<C, R, T>
403  {
405  c.ComponentMul(b);
406  return c;
407  }
408 
409  template <unsigned int C, unsigned int R, class T>
410  inline const MatrixXX<C, R, T>
412  {
413  return ComponentMul(a, a);
414  }
415 
416  template <unsigned int C, unsigned int R, class T>
417  inline const MatrixXX<C, R, T>
419  {
421  c *= s;
422  return c;
423  }
424 
425  // matrix multiplication
426  template <unsigned int C, unsigned int R, unsigned int C2, class T>
427  inline const MatrixXX<C2, R, T>
429  {
431  for (int c = 0; c < C2; ++c)
432  {
433  for (int r = 0; r < R; ++r)
434  {
435  x[c][r] = a[0][r] * b[c][0];
436  for (int i = 1; i < C; ++i)
437  {
438  x[c][r] += a[i][r] * b[c][i];
439  }
440  }
441  }
442  return x;
443  }
444 
445  template <unsigned int C, unsigned int R, class T>
446  inline const MatrixXX<C, R, T>
448  {
449  return ((const T)a) * b;
450  }
451 
452  template <unsigned int C, unsigned int R, class T>
453  inline const MatrixXX<C, R, T>
455  {
457  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
458  {
459  c.Data()[i] = a.Data()[i] + b.Data()[i];
460  }
461  return c;
462  }
463 
464  template <unsigned int C, unsigned int R, class T>
465  inline const MatrixXX<C, R, T>
467  {
469  for (unsigned int i = 0; i < MatrixXX<C, R, T>::Entries; ++i)
470  {
471  c.Data()[i] = a.Data()[i] - b.Data()[i];
472  }
473  return c;
474  }
475 
476  template <unsigned int N, class T>
477  inline T
479  {
480  T t = 0;
481  for (unsigned int i = 0; i < N; ++i)
482  {
483  t += a[i][i];
484  }
485  return t;
486  }
487 
488  template <unsigned int N, class T>
489  inline T
491  {
492  T t = 0;
493  for (unsigned int i = 0; i < N; ++i)
494  {
495  if (a[i][i] > 0)
496  {
497  t += a[i][i];
498  }
499  else
500  {
501  t -= a[i][i];
502  }
503  }
504  return t;
505  }
506 
507  // this is a rather slow O(n!) algorithm!
508  // it is only suitable for small matrices!
509  // larger matrices should use LU decomposition
510  template <unsigned int N, class T>
511  inline T
513  {
514  int j = 1;
515  T det = 0;
516  for (unsigned int i = 0; i < N; ++i, j *= -1)
517  {
518  MatrixXX<N - 1, N - 1, T> m;
519  for (unsigned int k = 1, kk = 0; kk < N - 1; ++kk, ++k)
520  {
521  for (unsigned int l = 0, ll = 0; ll < N - 1; ++ll, ++l)
522  {
523  if (l == i)
524  {
525  ++l;
526  }
527  m[ll][kk] = a[l][k];
528  }
529  }
530  det += j * Determinant(m);
531  }
532  return det;
533  }
534 
535  template <class T>
536  inline T
538  {
539  return a[0][0] * (a[1][1] * a[2][2] - a[1][2] * a[2][1]) -
540  a[0][1] * (a[1][0] * a[2][2] - a[1][2] * a[2][0]) +
541  a[0][2] * (a[1][0] * a[2][1] - a[1][1] * a[2][0]);
542  }
543 
544  template <class T>
545  inline T
547  {
548  return a[0][0] * a[1][1] - a[1][0] * a[0][1];
549  }
550 
551  template <class T>
552  inline T
554  {
555  return a[0][0];
556  }
557 
558  template <class T>
559  inline void
561  {
562  (*a)[0][0] = std::cos(rad);
563  (*a)[0][1] = std::sin(rad);
564  (*a)[1][0] = -(*a)[0][1];
565  (*a)[1][1] = (*a)[0][0];
566  }
567 
568  template <unsigned int N, class T>
569  void
571  {
572  for (unsigned int c = 0; c < N; ++c)
573  {
574  unsigned int r = 0;
575  for (; r < c; ++r)
576  {
577  (*a)[c][r] = 0;
578  }
579  (*a)[c][r] = 1;
580  for (++r; r < N; ++r)
581  {
582  (*a)[c][r] = 0;
583  }
584  }
585  }
586 
587  template <unsigned int N, class T>
588  class IdentityMatrixX : public MatrixXX<N, N, T>
589  {
590  public:
592  {
593  Identity(this);
594  }
595  };
596 
597  template <unsigned int C, unsigned int R, class T>
598  std::ostream&
599  operator<<(std::ostream& o, const MatrixXX<C, R, T>& mat)
600  {
601  o << "[";
602  for (unsigned int i = 0; i < C; ++i)
603  {
604  o << mat[i];
605  if (i < C - 1)
606  {
607  o << ", ";
608  }
609  }
610  o << "]";
611  return o;
612  }
613 
614  template <unsigned int C, unsigned int R, class T>
615  inline MatrixXX<C, R, T>
617  {
618  using namespace std;
620  for (unsigned int c = 0; c < C; ++c)
621  for (unsigned int r = 0; r < R; ++r)
622  {
623  m[c][r] = min(a[c][r], b[c][r]);
624  }
625  return m;
626  }
627 
628  template <unsigned int C, unsigned int R, class T>
629  inline MatrixXX<C, R, T>
631  {
632  using namespace std;
634  for (unsigned int c = 0; c < C; ++c)
635  for (unsigned int r = 0; r < R; ++r)
636  {
637  m[c][r] = max(a[c][r], b[c][r]);
638  }
639  return m;
640  }
641 
651 
652 }; // namespace GfxTL
653 
654 #include <GfxTL/VectorXD.h>
655 
656 #endif
GfxTL::MatrixXX::operator=
ThisType & operator=(const ThisType &v)
Definition: MatrixXX.h:202
GfxTL::MatrixXX< 1, 1, T >::ThisType
MatrixXX< 1, 1, T > ThisType
Definition: MatrixXX.h:260
GfxTL::VectorXD
Definition: MatrixXX.h:24
GfxTL::IdentityMatrixX::IdentityMatrixX
IdentityMatrixX()
Definition: MatrixXX.h:591
GfxTL::MatrixXX< 1, 1, T >::MatrixXX
MatrixXX(const MatrixXX< 1, 1, T > &mat)
Definition: MatrixXX.h:271
GfxTL::MatrixXX::MatrixXX
MatrixXX(const T *m)
Definition: MatrixXX.h:159
GfxTL::Internal::BaseMatrixXX::Cols
@ Cols
Definition: MatrixXX.h:60
GfxTL::Internal::BaseMatrixXX::Data
T * Data()
Definition: MatrixXX.h:83
GfxTL::MatrixXX::MatrixXX
MatrixXX(const MatrixXX< 1, R, T > &a, const MatrixXX< 1, R, T > &b, const MatrixXX< 1, R, T > &c, const MatrixXX< 1, R, T > &d)
Definition: MatrixXX.h:179
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
GfxTL::MatrixXX< 1, 1, T >::TransposedType
MatrixXX< 1, 1, T > TransposedType
Definition: MatrixXX.h:261
GfxTL::MatrixXX::ThisType
MatrixXX< C, R, T > ThisType
Definition: MatrixXX.h:135
GfxTL::MatrixXX::MatrixXX
MatrixXX(const SuperType &mat)
Definition: MatrixXX.h:142
GfxTL::max
MatrixXX< C, R, T > max(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:630
GfxTL::MatrixXX::ComponentMul
MatrixXX< C, R, T > & ComponentMul(const MatrixXX< C, R, T > &a)
Definition: MatrixXX.h:212
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
GfxTL::MatrixXX< 1, 1, T >::operator=
ThisType & operator=(T v)
Definition: MatrixXX.h:287
GfxTL::Internal::BaseMatrixXX::Rows
@ Rows
Definition: MatrixXX.h:59
GfxTL::MatrixXX::MatrixXX
MatrixXX()
Definition: MatrixXX.h:138
GfxTL::operator==
bool operator==(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:388
GfxTL::Internal::BaseMatrixXX::value_type
T value_type
Definition: MatrixXX.h:54
GfxTL::MatrixXX
Definition: MatrixXX.h:28
GfxTL::Internal::BaseMatrixXX::Data
const T * Data() const
Definition: MatrixXX.h:89
GfxTL::operator/=
MatrixXX< C, R, T > & operator/=(MatrixXX< C, R, T > &m, T s)
Definition: MatrixXX.h:365
VectorXD.h
GfxTL::operator*=
MatrixXX< C, R, T > & operator*=(MatrixXX< C, R, T > &m, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:339
GfxTL::Internal::BaseMatrixXX::_m
T _m[Entries]
Definition: MatrixXX.h:125
GfxTL::MatrixXX::AssertDim< A, A >::AssertEqual
static void AssertEqual()
Definition: MatrixXX.h:248
GfxTL::operator+=
MatrixXX< C, R, T > & operator+=(MatrixXX< C, R, T > &m, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:317
GfxTL::MatrixXX::AssertDim
Definition: MatrixXX.h:231
GfxTL::MatrixXX< 1, 1, T >::SuperType
Internal::BaseMatrixXX< 1, 1, T > SuperType
Definition: MatrixXX.h:259
GfxTL::MatrixXX< 1, 1, T >::MatrixXX
MatrixXX(const T *m)
Definition: MatrixXX.h:281
GfxTL::Internal::BaseMatrixXX
Matrix in column major order.
Definition: MatrixXX.h:50
GfxTL::MatrixXX::SuperType
Internal::BaseMatrixXX< C, R, T > SuperType
Definition: MatrixXX.h:134
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:570
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
GfxTL::operator<<
std::ostream & operator<<(std::ostream &o, const Array< DimT, IteratorT > &a)
Definition: Array.h:189
GfxTL::operator!=
bool operator!=(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:395
GfxTL::Matrix2f
MatrixXX< 2, 2, float > Matrix2f
Definition: MatrixXX.h:648
GfxTL::operator-
MatrixXX< C, R, T > operator-(const MatrixXX< C, R, T > &a)
Definition: MatrixXX.h:376
GfxTL::MatrixXX::operator=
ThisType & operator=(T v)
Definition: MatrixXX.h:192
GfxTL::MatrixXX::MatrixXX
MatrixXX(T v)
Definition: MatrixXX.h:151
GfxTL::MatrixXX::MatrixXX
MatrixXX(const MatrixXX< 1, R, T > &a, const MatrixXX< 1, R, T > &b, const MatrixXX< 1, R, T > &c)
Definition: MatrixXX.h:171
GfxTL::MatrixXX::MatrixXX
MatrixXX(const ThisType &mat)
Definition: MatrixXX.h:146
GfxTL::MatrixXX::Transposed
TransposedType Transposed()
Definition: MatrixXX.h:222
GfxTL::TraceAbs
T TraceAbs(const MatrixXX< N, N, T > &a)
Definition: MatrixXX.h:490
GfxTL::Rotation
void Rotation(T rad, MatrixXX< 2, 2, T > *a)
Definition: MatrixXX.h:560
GfxTL::mat3
MatrixXX< 3, 3, float > mat3
Definition: MatrixXX.h:643
GfxTL::Internal::BaseMatrixXX::ScalarType
T ScalarType
Definition: MatrixXX.h:53
GfxTL::Internal::BaseMatrixXX::Transpose
void Transpose(BaseMatrixXX< R, C, T > *t) const
Definition: MatrixXX.h:115
GfxTL::min
MatrixXX< C, R, T > min(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:616
GfxTL
Definition: AABox.h:9
GfxTL::Mat3f
MatrixXX< 3, 3, float > Mat3f
Definition: MatrixXX.h:646
GfxTL::Determinant
T Determinant(const MatrixXX< N, N, T > &a)
Definition: MatrixXX.h:512
GfxTL::Trace
T Trace(const MatrixXX< N, N, T > &a)
Definition: MatrixXX.h:478
GfxTL::MatrixXX< 1, 1, T >::MatrixXX
MatrixXX(T v)
Definition: MatrixXX.h:276
GfxTL::Internal::BaseMatrixXX::Entries
@ Entries
Definition: MatrixXX.h:61
GfxTL::MatrixXX::MatrixXX
MatrixXX(const MatrixXX< 1, R, T > &a, const MatrixXX< 1, R, T > &b)
Definition: MatrixXX.h:164
A
class A(deque< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T
Enables hashing of std::list.
GfxTL::sqrt
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
Definition: VectorXD.h:704
GfxTL::MatrixXX< 1, 1, T >::MatrixXX
MatrixXX(const SuperType &mat)
Definition: MatrixXX.h:267
GfxTL::Internal::BaseMatrixXX::operator[]
VectorXD< R, T > & operator[](unsigned int col)
Definition: MatrixXX.h:65
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
GfxTL::Internal::BaseMatrixXX::Zero
void Zero()
Definition: MatrixXX.h:77
GfxTL::Mat2f
MatrixXX< 2, 2, float > Mat2f
Definition: MatrixXX.h:645
std
Definition: Application.h:66
GfxTL::MatrixXX::TransposedType
MatrixXX< R, C, T > TransposedType
Definition: MatrixXX.h:136
GfxTL::MatrixXX::AssertDim::AssertEqual
static void AssertEqual()
Definition: MatrixXX.h:234
GfxTL::mat2
MatrixXX< 2, 2, float > mat2
Definition: MatrixXX.h:642
GfxTL::ComponentMul
const MatrixXX< C, R, T > ComponentMul(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:402
GfxTL::operator-=
MatrixXX< C, R, T > & operator-=(MatrixXX< C, R, T > &m, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:328
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:649
T
float T
Definition: UnscentedKalmanFilterTest.cpp:38
StdOverrides.h
GfxTL::Internal::BaseMatrixXX::Normalize
T Normalize()
Definition: MatrixXX.h:95
GfxTL::Mat4f
MatrixXX< 4, 4, float > Mat4f
Definition: MatrixXX.h:647
GfxTL::MatrixXX< 1, 1, T >::MatrixXX
MatrixXX()
Definition: MatrixXX.h:263
GfxTL::Internal::BaseMatrixXX::ThisType
BaseMatrixXX< C, R, T > ThisType
Definition: MatrixXX.h:55
GfxTL::IdentityMatrixX
Definition: MatrixXX.h:588
GfxTL::MatrixXX< 1, 1, T >
Definition: MatrixXX.h:256
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
GfxTL::SqrComponentMul
const MatrixXX< C, R, T > SqrComponentMul(const MatrixXX< C, R, T > &a)
Definition: MatrixXX.h:411
GfxTL::Internal::BaseMatrixXX::operator[]
const VectorXD< R, T > & operator[](unsigned int col) const
Definition: MatrixXX.h:71
GfxTL::operator+
const MatrixXX< C, R, T > operator+(const MatrixXX< C, R, T > &a, const MatrixXX< C, R, T > &b)
Definition: MatrixXX.h:454
GfxTL::mat4
MatrixXX< 4, 4, float > mat4
Definition: MatrixXX.h:644
GfxTL::operator*
const MatrixXX< C, R, T > operator*(T s, const MatrixXX< C, R, T > &a)
Definition: MatrixXX.h:418
GfxTL::MatrixXX< 1, 1, T >::ComponentMul
MatrixXX< 1, 1, T > & ComponentMul(const MatrixXX< 1, 1, T > &a)
Definition: MatrixXX.h:294