Lines Matching refs:Rows
34 template <typename T, int Rows, int Cols>
38 typedef Vector<T, Rows> Element;
44 ROWS = Rows,
50 explicit Matrix (const T src[Rows*Cols]);
51 Matrix (const Vector<T, Rows>& src);
52 Matrix (const Matrix<T, Rows, Cols>& src);
55 Matrix<T, Rows, Cols>& operator= (const Matrix<T, Rows, Cols>& src);
56 Matrix<T, Rows, Cols>& operator*= (const Matrix<T, Rows, Cols>& src);
59 void setColumn (int colNdx, const Vector<T, Rows>& vec);
62 Vector<T, Rows>& getColumn (int ndx);
63 const Vector<T, Rows>& getColumn (int ndx) const;
65 Vector<T, Rows>& operator[] (int ndx) { return getColumn(ndx); }
66 const Vector<T, Rows>& operator[] (int ndx) const { return getColumn(ndx); }
71 Array<T, Rows*Cols> getRowMajorData (void) const;
72 Array<T, Rows*Cols> getColumnMajorData (void) const;
75 Vector<Vector<T, Rows>, Cols> m_data;
85 template <typename T, int Rows, int Cols>
86 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec);
89 template <typename T, int Rows, int Cols>
90 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx);
92 template <typename T, int Rows, int Cols>
93 bool operator== (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs);
95 template <typename T, int Rows, int Cols>
96 bool operator!= (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs);
317 template <typename T, int Rows, int Cols>
318 Matrix<T, Rows, Cols>::Matrix (void)
320 for (int row = 0; row < Rows; row++)
326 template <typename T, int Rows, int Cols>
327 Matrix<T, Rows, Cols>::Matrix (const T& src)
329 for (int row = 0; row < Rows; row++)
335 template <typename T, int Rows, int Cols>
336 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols])
338 for (int row = 0; row < Rows; row++)
344 template <typename T, int Rows, int Cols>
345 Matrix<T, Rows, Cols>::Matrix (const Vector<T, Rows>& src)
347 DE_STATIC_ASSERT(Rows == Cols);
348 for (int row = 0; row < Rows; row++)
354 template <typename T, int Rows, int Cols>
355 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src)
361 template <typename T, int Rows, int Cols>
362 Matrix<T, Rows, Cols>::~Matrix (void)
367 template <typename T, int Rows, int Cols>
368 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src)
370 for (int row = 0; row < Rows; row++)
377 template <typename T, int Rows, int Cols>
378 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src)
384 template <typename T, int Rows, int Cols>
385 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec)
391 template <typename T, int Rows, int Cols>
392 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec)
397 template <typename T, int Rows, int Cols>
398 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const
406 template <typename T, int Rows, int Cols>
407 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx)
412 template <typename T, int Rows, int Cols>
413 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const
418 template <typename T, int Rows, int Cols>
419 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const
421 Array<T, Rows*Cols> a;
424 for (int row = 0; row < Rows; row++)
429 template <typename T, int Rows, int Cols>
430 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const
432 Array<T, Rows*Cols> a;
434 for (int row = 0; row < Rows; row++)
460 template <typename T, int Rows, int Cols>
461 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec)
463 Vector<T, Rows> res;
464 for (int row = 0; row < Rows; row++)
475 template <typename T, int Rows, int Cols>
476 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx)
482 for (int row = 0; row < Rows; row++)
527 template <typename T, int Rows, int Cols>
528 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar)
530 Matrix<T, Rows, Cols> res;
532 for (int row = 0; row < Rows; row++)
537 template <typename T, int Rows, int Cols>
538 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar)
540 Matrix<T, Rows, Cols> res;
542 for (int row = 0; row < Rows; row++)
547 template <typename T, int Rows, int Cols>
548 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar)
550 Matrix<T, Rows, Cols> res;
552 for (int row = 0; row < Rows; row++)
557 template <typename T, int Rows, int Cols>
558 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar)
560 Matrix<T, Rows, Cols> res;
562 for (int row = 0; row < Rows; row++)
569 template <typename T, int Rows, int Cols>
570 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
572 Matrix<T, Rows, Cols> res;
574 for (int row = 0; row < Rows; row++)
579 template <typename T, int Rows, int Cols>
580 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
582 Matrix<T, Rows, Cols> res;
584 for (int row = 0; row < Rows; row++)
589 template <typename T, int Rows, int Cols>
590 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
592 Matrix<T, Rows, Cols> res;
594 for (int row = 0; row < Rows; row++)
599 template <typename T, int Rows, int Cols>
600 bool operator== (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs)
602 for (int row = 0; row < Rows; row++)
609 template <typename T, int Rows, int Cols>
610 bool operator!= (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs)