Lines Matching refs:ROWS
50 template <typename T, int Rows, int Cols>
54 typedef Vector<T, Rows> Element;
60 ROWS = Rows,
66 explicit Matrix (const T src[Rows*Cols]);
67 Matrix (const Vector<T, Rows>& src);
68 Matrix (const Matrix<T, Rows, Cols>& src);
71 Matrix<T, Rows, Cols>& operator= (const Matrix<T, Rows, Cols>& src);
72 Matrix<T, Rows, Cols>& operator*= (const Matrix<T, Rows, Cols>& src);
75 void setColumn (int colNdx, const Vector<T, Rows>& vec);
78 Vector<T, Rows>& getColumn (int ndx);
79 const Vector<T, Rows>& getColumn (int ndx) const;
81 Vector<T, Rows>& operator[] (int ndx) { return getColumn(ndx); }
82 const Vector<T, Rows>& operator[] (int ndx) const { return getColumn(ndx); }
87 Array<T, Rows*Cols> getRowMajorData (void) const;
88 Array<T, Rows*Cols> getColumnMajorData (void) const;
91 Vector<Vector<T, Rows>, Cols> m_data;
101 template <typename T, int Rows, int Cols>
102 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec);
105 template <typename T, int Rows, int Cols>
106 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx);
327 template <typename T, int Rows, int Cols>
328 Matrix<T, Rows, Cols>::Matrix (void)
330 for (int row = 0; row < Rows; row++)
336 template <typename T, int Rows, int Cols>
337 Matrix<T, Rows, Cols>::Matrix (const T& src)
339 for (int row = 0; row < Rows; row++)
345 template <typename T, int Rows, int Cols>
346 Matrix<T, Rows, Cols>::Matrix (const T src[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 Vector<T, Rows>& src)
357 DE_STATIC_ASSERT(Rows == Cols);
358 for (int row = 0; row < Rows; row++)
364 template <typename T, int Rows, int Cols>
365 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src)
371 template <typename T, int Rows, int Cols>
372 Matrix<T, Rows, Cols>::~Matrix (void)
377 template <typename T, int Rows, int Cols>
378 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src)
380 for (int row = 0; row < Rows; row++)
387 template <typename T, int Rows, int Cols>
388 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src)
394 template <typename T, int Rows, int Cols>
395 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec)
401 template <typename T, int Rows, int Cols>
402 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec)
407 template <typename T, int Rows, int Cols>
408 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const
416 template <typename T, int Rows, int Cols>
417 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx)
422 template <typename T, int Rows, int Cols>
423 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const
428 template <typename T, int Rows, int Cols>
429 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const
431 Array<T, Rows*Cols> a;
434 for (int row = 0; row < Rows; row++)
439 template <typename T, int Rows, int Cols>
440 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const
442 Array<T, Rows*Cols> a;
444 for (int row = 0; row < Rows; row++)
470 template <typename T, int Rows, int Cols>
471 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec)
473 Vector<T, Rows> res;
474 for (int row = 0; row < Rows; row++)
485 template <typename T, int Rows, int Cols>
486 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx)
492 for (int row = 0; row < Rows; row++)
520 template <typename T, int Rows, int Cols>
521 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar)
523 Matrix<T, Rows, Cols> res;
525 for (int row = 0; row < Rows; row++)
530 template <typename T, int Rows, int Cols>
531 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar)
533 Matrix<T, Rows, Cols> res;
535 for (int row = 0; row < Rows; row++)
540 template <typename T, int Rows, int Cols>
541 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar)
543 Matrix<T, Rows, Cols> res;
545 for (int row = 0; row < Rows; row++)
550 template <typename T, int Rows, int Cols>
551 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar)
553 Matrix<T, Rows, Cols> res;
555 for (int row = 0; row < Rows; row++)
562 template <typename T, int Rows, int Cols>
563 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
565 Matrix<T, Rows, Cols> res;
567 for (int row = 0; row < Rows; row++)
572 template <typename T, int Rows, int Cols>
573 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
575 Matrix<T, Rows, Cols> res;
577 for (int row = 0; row < Rows; row++)
582 template <typename T, int Rows, int Cols>
583 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
585 Matrix<T, Rows, Cols> res;
587 for (int row = 0; row < Rows; row++)