Lines Matching full:cols

34 template <typename T, int Rows, int Cols>
43 SIZE = Cols,
45 COLS = Cols, enumerator
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);
311 template <typename T, int Rows, int Cols>
312 Matrix<T, Rows, Cols>::Matrix (void) in Matrix()
315 for (int col = 0; col < Cols; col++) in Matrix()
320 template <typename T, int Rows, int Cols>
321 Matrix<T, Rows, Cols>::Matrix (const T& src) in Matrix()
324 for (int col = 0; col < Cols; col++) in Matrix()
329 template <typename T, int Rows, int Cols>
330 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols]) in Matrix() argument
333 for (int col = 0; col < Cols; col++) in Matrix()
334 (*this)(row, col) = src[row*Cols + col]; 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()
343 for (int col = 0; col < Cols; col++) in Matrix()
348 template <typename T, int Rows, int Cols>
349 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src) in Matrix()
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 =()
365 for (int col = 0; col < Cols; col++) 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 *=()
378 template <typename T, int Rows, int Cols>
379 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec) in setRow()
381 for (int col = 0; col < Cols; col++) 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()
394 Vector<T, Cols> res; in getRow()
395 for (int col = 0; col < Cols; col++) 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()
417 for (int col = 0; col < Cols; col++) 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()
429 for (int col = 0; col < Cols; col++) 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 *()
461 for (int col = 0; col < Cols; col++) 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 *()
472 Vector<T, Cols> res; in operator *()
473 for (int col = 0; col < Cols; col++) 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 +()
507 Matrix<T, Rows, Cols> res; in operator +()
508 for (int col = 0; col < Cols; col++) 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 -()
517 Matrix<T, Rows, Cols> res; in operator -()
518 for (int col = 0; col < Cols; col++) 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 *()
527 Matrix<T, Rows, Cols> res; in operator *()
528 for (int col = 0; col < Cols; col++) 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 /()
537 Matrix<T, Rows, Cols> res; in operator /()
538 for (int col = 0; col < Cols; col++) 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 +()
549 Matrix<T, Rows, Cols> res; in operator +()
550 for (int col = 0; col < Cols; col++) 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 -()
559 Matrix<T, Rows, Cols> res; in operator -()
560 for (int col = 0; col < Cols; col++) 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 /()
569 Matrix<T, Rows, Cols> res; in operator /()
570 for (int col = 0; col < Cols; col++) in operator /()