123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- $OpenBSD: patch-src_Matrix_hpp,v 1.3 2017/04/27 21:09:57 espie Exp $
- --- src/Matrix.hpp.orig Tue Mar 11 16:47:04 2008
- +++ src/Matrix.hpp Thu Apr 27 22:43:53 2017
- @@ -187,14 +187,14 @@ namespace gpstk
- * @warning be careful that array is as large as the matrix is!
- */
- inline Matrix& operator=(const T* array)
- - { return assignFrom(array); }
- + { return this->assignFrom(array); }
- /// Assigns the contents of this matrix to those in array in column
- /// major order.
- inline Matrix& operator=(const std::valarray<T> array)
- - { return assignFrom(array); }
- + { return this->assignFrom(array); }
- /// Assigns all elements of the matrix to \c t.
- inline Matrix& operator=(const T t)
- - { return assignFrom(t); }
- + { return this->assignFrom(t); }
- /// Copies the other matrix.
- inline Matrix& operator=(const Matrix& mat)
- { v = mat.v; r = mat.r; c = mat.c; s = mat.s; return *this; }
- @@ -206,12 +206,12 @@ namespace gpstk
- r=mat.rows();
- c=mat.cols();
- s=mat.size();
- - return assignFrom(mat);
- + return this->assignFrom(mat);
- }
- /// Copies from any vector.
- template <class BaseClass>
- inline Matrix& operator=(const ConstVectorBase<T, BaseClass>& mat)
- - { return assignFrom(mat); }
- + { return this->assignFrom(mat); }
-
- private:
- /// the matrix stored in column major order
- @@ -238,7 +238,7 @@ namespace gpstk
- : m(&mat), rSlice(std::slice(0, mat.rows(), 1)),
- cSlice(std::slice(0,mat.cols(), 1)), s(mat.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// Makes a partial slice of a matrix.
- @@ -247,7 +247,7 @@ namespace gpstk
- : m(&mat), rSlice(rowSlice), cSlice(colSlice),
- s(rSlice.size() * cSlice.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// Submatrix slice.
- @@ -257,28 +257,28 @@ namespace gpstk
- cSlice(std::slice(topCol, numCols, 1)),
- s(rSlice.size() * cSlice.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// Copies from x to (*this).
- template <class V>
- MatrixSlice& operator=(const ConstMatrixBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// Copies from x to (*this).
- template <class V>
- MatrixSlice& operator=(const ConstVectorBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// Copies from x to (*this).
- MatrixSlice& operator=(const std::valarray<T>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// Copies from x to (*this).
- MatrixSlice& operator=(const T x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// Copies from x to (*this).
- MatrixSlice& operator=(const T* x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// returns the size of this slice
- size_t size() const { return s; }
- @@ -334,7 +334,7 @@ namespace gpstk
- : m(&mat), rSlice(std::slice(0, mat.rows(), 1)),
- cSlice(std::slice(0,mat.cols(), 1)), s(mat.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// makes a slice given std::slices for rows and columns
- @@ -343,7 +343,7 @@ namespace gpstk
- : m(&mat), rSlice(rowSlice), cSlice(colSlice),
- s(rSlice.size() * cSlice.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// submatrix slice
- @@ -353,7 +353,7 @@ namespace gpstk
- cSlice(std::slice(topCol, numCols, 1)),
- s(rSlice.size() * cSlice.size())
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// the size of the slice
- @@ -400,7 +400,7 @@ namespace gpstk
- MatrixColSlice(Matrix<T>& mat, size_t col)
- : m(&mat), c(col), rSlice(std::slice(0,mat.rows(),1))
- {
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
- /// makes a slice of the column from the matrix using \c s to
- /// further slice the column.
- @@ -408,27 +408,27 @@ namespace gpstk
- : m(&mat), c(col), rSlice(s)
- {
- // decide if the input is reasonable
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// assigns this column to x
- template <class V>
- MatrixColSlice& operator=(const ConstMatrixBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// assigns this column to x
- template <class V>
- MatrixColSlice& operator=(const ConstVectorBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this column to x
- MatrixColSlice& operator=(const std::valarray<T>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this column to x
- MatrixColSlice& operator=(const T x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this column to x
- MatrixColSlice& operator=(const T* x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// returns the i'th element of the column, non-const
- T& operator[] (size_t i)
- @@ -495,7 +495,7 @@ namespace gpstk
- /// constructor taking a slice of column \c col from the matrix.
- ConstMatrixColSlice(const Matrix<T>& mat, size_t col)
- : m(&mat), c(col), rSlice(std::slice(0,mat.rows(),1))
- - { matSliceCheck(mat.rows(), mat.cols()); }
- + { this->matSliceCheck(mat.rows(), mat.cols()); }
-
- /// constructor taking a slice of column \c col from the matrix,
- /// slicing the column by \c s.
- @@ -504,7 +504,7 @@ namespace gpstk
- : m(&mat), c(col), rSlice(s)
- {
- // decide if the input is reasonable
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// returns the i'th element of the column slice
- @@ -560,7 +560,7 @@ namespace gpstk
- /// makes a slice of row \c row from the matrix.
- MatrixRowSlice(Matrix<T>& mat, size_t row)
- : m(&mat), r(row), cSlice(std::slice(0,mat.cols(),1))
- - { matSliceCheck(mat.rows(), mat.cols()); }
- + { this->matSliceCheck(mat.rows(), mat.cols()); }
-
- /// makes a slice of row \c row from the matrix, slicing it by \c s.
- MatrixRowSlice(Matrix<T>& mat, size_t row,
- @@ -568,26 +568,26 @@ namespace gpstk
- : m(&mat), r(row), cSlice(s)
- {
- // decide if the input is reasonable
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// assigns this row to x.
- template <class V>
- MatrixRowSlice& operator=(const ConstMatrixBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this row to x.
- template <class V>
- MatrixRowSlice& operator=(const ConstVectorBase<T, V>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this row to x.
- MatrixRowSlice& operator=(const std::valarray<T>& x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this row to x.
- MatrixRowSlice& operator=(const T x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
- /// assigns this row to x.
- MatrixRowSlice& operator=(const T* x)
- - { return assignFrom(x); }
- + { return this->assignFrom(x); }
-
- /// returns the j'th element of the slice, non-const
- T& operator[] (size_t j)
- @@ -651,7 +651,7 @@ namespace gpstk
- /// makes a const row slice from the matrix
- ConstMatrixRowSlice(const Matrix<T>& mat, size_t row)
- : m(&mat), r(row), cSlice(std::slice(0,mat.cols(),1))
- - { matSliceCheck(mat.rows(), mat.cols()); }
- + { this->matSliceCheck(mat.rows(), mat.cols()); }
-
- /// makes a const row slice from the matrix, slicing that row by \c s.
- ConstMatrixRowSlice(const Matrix<T>& mat, size_t row,
- @@ -659,7 +659,7 @@ namespace gpstk
- : m(&mat), r(row), cSlice(s)
- {
- // decide if the input is reasonable
- - matSliceCheck(mat.rows(), mat.cols());
- + this->matSliceCheck(mat.rows(), mat.cols());
- }
-
- /// returns the i'th element of the slice
|