Home | History | Annotate | Download | only in common

Lines Matching refs:Cols

50 template <typename T, int Rows, int Cols>
59 SIZE = Cols,
61 COLS = Cols,
66 explicit Matrix (const T src[Rows*Cols]);
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);
74 void setRow (int rowNdx, const Vector<T, Cols>& vec);
77 Vector<T, Cols> getRow (int ndx) const;
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)
331 for (int col = 0; col < Cols; col++)
336 template <typename T, int Rows, int Cols>
337 Matrix<T, Rows, Cols>::Matrix (const T& src)
340 for (int col = 0; col < Cols; col++)
345 template <typename T, int Rows, int Cols>
346 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols])
349 for (int col = 0; col < Cols; col++)
350 (*this)(row, col) = src[row*Cols + col];
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);
359 for (int col = 0; col < Cols; col++)
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)
381 for (int col = 0; col < Cols; col++)
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)
397 for (int col = 0; col < Cols; col++)
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
410 Vector<T, Cols> res;
411 for (int col = 0; col < Cols; col++)
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;
433 for (int col = 0; col < Cols; col++)
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;
445 for (int col = 0; col < Cols; col++)
470 template <typename T, int Rows, int Cols>
471 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec)
477 for (int col = 0; col < Cols; col++)
485 template <typename T, int Rows, int Cols>
486 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx)
488 Vector<T, Cols> res;
489 for (int col = 0; col < Cols; col++)
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;
524 for (int col = 0; col < Cols; col++)
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;
534 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++)
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;
566 for (int col = 0; col < Cols; col++)
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;
576 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++)