*add operator()(int) for vectors, synonymous to operator[](int).

I don't see any reason not to allow it, it doesn't add much code, and
 it makes porting from eigen1 easier.
*expand tests/basicstuff to first test coefficient access methods
This commit is contained in:
Benoit Jacob
2008-08-18 12:33:14 +00:00
parent 95a1283bf6
commit baf0cffedd
3 changed files with 48 additions and 0 deletions

View File

@@ -249,9 +249,11 @@ template<typename Derived> class MatrixBase
const Scalar coeff(int index) const;
const Scalar operator[](int index) const;
const Scalar operator()(int index) const;
Scalar& coeffRef(int index);
Scalar& operator[](int index);
Scalar& operator()(int index);
template<typename OtherDerived>
void copyCoeff(int row, int col, const MatrixBase<OtherDerived>& other);