Home | History | Annotate | Download | only in common

Lines Matching defs: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);
311 template <typename T, int Rows, int Cols>
312 Matrix<T, Rows, Cols>::Matrix (void)
315 for (int col = 0; col < Cols; col++)
320 template <typename T, int Rows, int Cols>
321 Matrix<T, Rows, Cols>::Matrix (const T& src)
324 for (int col = 0; col < Cols; col++)
329 template <typename T, int Rows, int Cols>
330 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols])
333 for (int col = 0; col < Cols; col++)
334 (*this)(row, col) = src[row*Cols + col];
338 template <typename T, int Rows, int Cols>
339 Matrix<T, Rows, Cols>::Matrix (const Vector<T, Rows>& src)
341 DE_STATIC_ASSERT(Rows == Cols);
343 for (int col = 0; col < Cols; col++)
348 template <typename T, int Rows, int Cols>
349 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src)
355 template <typename T, int Rows, int Cols>
356 Matrix<T, Rows, Cols>::~Matrix (void)
361 template <typename T, int Rows, int Cols>
362 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src)
365 for (int col = 0; col < Cols; col++)
371 template <typename T, int Rows, int Cols>
372 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src)
378 template <typename T, int Rows, int Cols>
379 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec)
381 for (int col = 0; col < Cols; col++)
385 template <typename T, int Rows, int Cols>
386 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec)
391 template <typename T, int Rows, int Cols>
392 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const
394 Vector<T, Cols> res;
395 for (int col = 0; col < Cols; col++)
400 template <typename T, int Rows, int Cols>
401 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx)
406 template <typename T, int Rows, int Cols>
407 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const
412 template <typename T, int Rows, int Cols>
413 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const
415 Array<T, Rows*Cols> a;
417 for (int col = 0; col < Cols; col++)
423 template <typename T, int Rows, int Cols>
424 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const
426 Array<T, Rows*Cols> a;
429 for (int col = 0; col < Cols; col++)
454 template <typename T, int Rows, int Cols>
455 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec)
461 for (int col = 0; col < Cols; col++)
469 template <typename T, int Rows, int Cols>
470 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx)
472 Vector<T, Cols> res;
473 for (int col = 0; col < Cols; col++)
504 template <typename T, int Rows, int Cols>
505 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar)
507 Matrix<T, Rows, Cols> res;
508 for (int col = 0; col < Cols; col++)
514 template <typename T, int Rows, int Cols>
515 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar)
517 Matrix<T, Rows, Cols> res;
518 for (int col = 0; col < Cols; col++)
524 template <typename T, int Rows, int Cols>
525 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar)
527 Matrix<T, Rows, Cols> res;
528 for (int col = 0; col < Cols; col++)
534 template <typename T, int Rows, int Cols>
535 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar)
537 Matrix<T, Rows, Cols> res;
538 for (int col = 0; col < Cols; col++)
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)
549 Matrix<T, Rows, Cols> res;
550 for (int col = 0; col < Cols; col++)
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)
559 Matrix<T, Rows, Cols> res;
560 for (int col = 0; col < Cols; col++)
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)
569 Matrix<T, Rows, Cols> res;
570 for (int col = 0; col < Cols; col++)