Lines Matching full:rows
34 template <typename T, int Rows, int Cols>
38 typedef Vector<T, Rows> Element;
44 ROWS = Rows, enumerator
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); } in operator []()
66 const Vector<T, Rows>& operator[] (int ndx) const { return getColumn(ndx); } in operator []()
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);
311 template <typename T, int Rows, int Cols>
312 Matrix<T, Rows, Cols>::Matrix (void) in Matrix()
314 for (int row = 0; row < Rows; row++) in Matrix()
320 template <typename T, int Rows, int Cols>
321 Matrix<T, Rows, Cols>::Matrix (const T& src) in Matrix()
323 for (int row = 0; row < Rows; row++) in Matrix()
329 template <typename T, int Rows, int Cols>
330 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols]) in Matrix()
332 for (int row = 0; row < Rows; row++) in Matrix()
338 template <typename T, int Rows, int Cols>
339 Matrix<T, Rows, Cols>::Matrix (const Vector<T, Rows>& src) in Matrix()
341 DE_STATIC_ASSERT(Rows == Cols); in Matrix()
342 for (int row = 0; row < Rows; row++) in Matrix()
348 template <typename T, int Rows, int Cols>
349 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src) in Matrix() argument
355 template <typename T, int Rows, int Cols>
356 Matrix<T, Rows, Cols>::~Matrix (void) in ~Matrix()
361 template <typename T, int Rows, int Cols>
362 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src) in operator =() argument
364 for (int row = 0; row < Rows; row++) in operator =()
371 template <typename T, int Rows, int Cols>
372 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src) in operator *=() argument
378 template <typename T, int Rows, int Cols>
379 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec) in setRow()
385 template <typename T, int Rows, int Cols>
386 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec) in setColumn()
391 template <typename T, int Rows, int Cols>
392 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const in getRow()
400 template <typename T, int Rows, int Cols>
401 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) in getColumn()
406 template <typename T, int Rows, int Cols>
407 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const in getColumn()
412 template <typename T, int Rows, int Cols>
413 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const in getColumnMajorData()
415 Array<T, Rows*Cols> a; in getColumnMajorData()
418 for (int row = 0; row < Rows; row++) in getColumnMajorData()
423 template <typename T, int Rows, int Cols>
424 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const in getRowMajorData()
426 Array<T, Rows*Cols> a; in getRowMajorData()
428 for (int row = 0; row < Rows; row++) in getRowMajorData()
454 template <typename T, int Rows, int Cols>
455 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec) in operator *() argument
457 Vector<T, Rows> res; in operator *()
458 for (int row = 0; row < Rows; row++) in operator *()
469 template <typename T, int Rows, int Cols>
470 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx) in operator *() argument
476 for (int row = 0; row < Rows; row++) in operator *()
504 template <typename T, int Rows, int Cols>
505 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator +() argument
507 Matrix<T, Rows, Cols> res; in operator +()
509 for (int row = 0; row < Rows; row++) in operator +()
514 template <typename T, int Rows, int Cols>
515 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator -() argument
517 Matrix<T, Rows, Cols> res; in operator -()
519 for (int row = 0; row < Rows; row++) in operator -()
524 template <typename T, int Rows, int Cols>
525 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator *() argument
527 Matrix<T, Rows, Cols> res; in operator *()
529 for (int row = 0; row < Rows; row++) in operator *()
534 template <typename T, int Rows, int Cols>
535 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator /() argument
537 Matrix<T, Rows, Cols> res; in operator /()
539 for (int row = 0; row < Rows; row++) in operator /()
546 template <typename T, int Rows, int Cols>
547 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator +() argument
549 Matrix<T, Rows, Cols> res; in operator +()
551 for (int row = 0; row < Rows; row++) in operator +()
556 template <typename T, int Rows, int Cols>
557 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator -() argument
559 Matrix<T, Rows, Cols> res; in operator -()
561 for (int row = 0; row < Rows; row++) in operator -()
566 template <typename T, int Rows, int Cols>
567 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator /() argument
569 Matrix<T, Rows, Cols> res; in operator /()
571 for (int row = 0; row < Rows; row++) in operator /()