Lines Matching refs:Cols

34 template <typename T, int Rows, int Cols>
43 SIZE = Cols,
45 COLS = Cols,
50 explicit Matrix (const T src[Rows*Cols]);
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);
58 void setRow (int rowNdx, const Vector<T, Cols>& vec);
61 Vector<T, Cols> getRow (int ndx) const;
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) in Matrix()
321 for (int col = 0; col < Cols; col++) in Matrix()
326 template <typename T, int Rows, int Cols>
327 Matrix<T, Rows, Cols>::Matrix (const T& src) in Matrix()
330 for (int col = 0; col < Cols; col++) in Matrix()
335 template <typename T, int Rows, int Cols>
336 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols]) in Matrix() argument
339 for (int col = 0; col < Cols; col++) in Matrix()
340 (*this)(row, col) = src[row*Cols + col]; in Matrix()
344 template <typename T, int Rows, int Cols>
345 Matrix<T, Rows, Cols>::Matrix (const Vector<T, Rows>& src) in Matrix()
347 DE_STATIC_ASSERT(Rows == Cols); in Matrix()
349 for (int col = 0; col < Cols; col++) in Matrix()
354 template <typename T, int Rows, int Cols>
355 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src) in Matrix()
361 template <typename T, int Rows, int Cols>
362 Matrix<T, Rows, Cols>::~Matrix (void) in ~Matrix()
367 template <typename T, int Rows, int Cols>
368 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src) in operator =()
371 for (int col = 0; col < Cols; col++) in operator =()
377 template <typename T, int Rows, int Cols>
378 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src) in operator *=()
384 template <typename T, int Rows, int Cols>
385 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec) in setRow()
387 for (int col = 0; col < Cols; col++) in setRow()
391 template <typename T, int Rows, int Cols>
392 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec) in setColumn()
397 template <typename T, int Rows, int Cols>
398 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const in getRow()
400 Vector<T, Cols> res; in getRow()
401 for (int col = 0; col < Cols; col++) in getRow()
406 template <typename T, int Rows, int Cols>
407 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) in getColumn()
412 template <typename T, int Rows, int Cols>
413 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const in getColumn()
418 template <typename T, int Rows, int Cols>
419 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const in getColumnMajorData()
421 Array<T, Rows*Cols> a; in getColumnMajorData()
423 for (int col = 0; col < Cols; col++) in getColumnMajorData()
429 template <typename T, int Rows, int Cols>
430 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const in getRowMajorData()
432 Array<T, Rows*Cols> a; in getRowMajorData()
435 for (int col = 0; col < Cols; col++) in getRowMajorData()
460 template <typename T, int Rows, int Cols>
461 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec) in operator *()
467 for (int col = 0; col < Cols; col++) in operator *()
475 template <typename T, int Rows, int Cols>
476 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx) in operator *()
478 Vector<T, Cols> res; in operator *()
479 for (int col = 0; col < Cols; col++) in operator *()
527 template <typename T, int Rows, int Cols>
528 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator +()
530 Matrix<T, Rows, Cols> res; in operator +()
531 for (int col = 0; col < Cols; col++) in operator +()
537 template <typename T, int Rows, int Cols>
538 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator -()
540 Matrix<T, Rows, Cols> res; in operator -()
541 for (int col = 0; col < Cols; col++) in operator -()
547 template <typename T, int Rows, int Cols>
548 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator *()
550 Matrix<T, Rows, Cols> res; in operator *()
551 for (int col = 0; col < Cols; col++) in operator *()
557 template <typename T, int Rows, int Cols>
558 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator /()
560 Matrix<T, Rows, Cols> res; in operator /()
561 for (int col = 0; col < Cols; col++) in operator /()
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) in operator +()
572 Matrix<T, Rows, Cols> res; in operator +()
573 for (int col = 0; col < Cols; col++) in operator +()
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) in operator -()
582 Matrix<T, Rows, Cols> res; in operator -()
583 for (int col = 0; col < Cols; col++) in operator -()
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) in operator /()
592 Matrix<T, Rows, Cols> res; in operator /()
593 for (int col = 0; col < Cols; col++) in operator /()
599 template <typename T, int Rows, int Cols>
600 bool operator== (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs) in operator ==()
603 for (int col = 0; col < Cols; col++) in operator ==()
609 template <typename T, int Rows, int Cols>
610 bool operator!= (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs) in operator !=()