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)
321 for (int col = 0; col < Cols; col++)
326 template <typename T, int Rows, int Cols>
327 Matrix<T, Rows, Cols>::Matrix (const T& src)
330 for (int col = 0; col < Cols; col++)
335 template <typename T, int Rows, int Cols>
336 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols])
339 for (int col = 0; col < Cols; col++)
340 (*this)(row, col) = src[row*Cols + col];
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);
349 for (int col = 0; col < Cols; col++)
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)
371 for (int col = 0; col < Cols; col++)
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)
387 for (int col = 0; col < Cols; col++)
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
400 Vector<T, Cols> res;
401 for (int col = 0; col < Cols; col++)
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;
423 for (int col = 0; col < Cols; col++)
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;
435 for (int col = 0; col < Cols; col++)
460 template <typename T, int Rows, int Cols>
461 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec)
467 for (int col = 0; col < Cols; col++)
475 template <typename T, int Rows, int Cols>
476 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx)
478 Vector<T, Cols> res;
479 for (int col = 0; col < Cols; col++)
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;
544 for (int col = 0; col < Cols; col++)
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;
554 for (int col = 0; col < Cols; col++)
560 template <typename T, int Rows, int Cols>
561 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar)
563 Matrix<T, Rows, Cols> res;
564 for (int col = 0; col < Cols; col++)
570 template <typename T, int Rows, int Cols>
571 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar)
573 Matrix<T, Rows, Cols> res;
574 for (int col = 0; col < Cols; col++)
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;
586 for (int col = 0; col < Cols; col++)
592 template <typename T, int Rows, int Cols>
593 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
595 Matrix<T, Rows, Cols> res;
596 for (int col = 0; col < Cols; col++)
602 template <typename T, int Rows, int Cols>
603 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b)
605 Matrix<T, Rows, Cols> res;
606 for (int col = 0; col < Cols; col++)
612 template <typename T, int Rows, int Cols>
613 bool operator== (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs)
616 for (int col = 0; col < Cols; col++)
622 template <typename T, int Rows, int Cols>
623 bool operator!= (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs)