mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-16 10:01:49 +08:00
*make coeff() return a const reference (required with the recent change with CoeffReturnType)
*fix a unused variable warning
This commit is contained in:
parent
c500415e18
commit
3b79d99f71
@ -41,7 +41,7 @@ namespace Eigen {
|
|||||||
|
|
||||||
/** \class AlignedVector3
|
/** \class AlignedVector3
|
||||||
*
|
*
|
||||||
* \brief A vectorization frinedly 3D vector
|
* \brief A vectorization friendly 3D vector
|
||||||
*
|
*
|
||||||
* This class represents a 3D vector internally using a 4D vector
|
* This class represents a 3D vector internally using a 4D vector
|
||||||
* such that vectorization can be seamlessly enabled. Of course,
|
* such that vectorization can be seamlessly enabled. Of course,
|
||||||
@ -70,13 +70,13 @@ template<typename _Scalar> class AlignedVector3
|
|||||||
inline int rows() const { return 3; }
|
inline int rows() const { return 3; }
|
||||||
inline int cols() const { return 1; }
|
inline int cols() const { return 1; }
|
||||||
|
|
||||||
inline const Scalar coeff(int row, int col) const
|
inline const Scalar& coeff(int row, int col) const
|
||||||
{ return m_coeffs.coeff(row, col); }
|
{ return m_coeffs.coeff(row, col); }
|
||||||
|
|
||||||
inline Scalar& coeffRef(int row, int col)
|
inline Scalar& coeffRef(int row, int col)
|
||||||
{ return m_coeffs.coeffRef(row, col); }
|
{ return m_coeffs.coeffRef(row, col); }
|
||||||
|
|
||||||
inline const Scalar coeff(int index) const
|
inline const Scalar& coeff(int index) const
|
||||||
{ return m_coeffs.coeff(index); }
|
{ return m_coeffs.coeff(index); }
|
||||||
|
|
||||||
inline Scalar& coeffRef(int index)
|
inline Scalar& coeffRef(int index)
|
||||||
|
@ -30,7 +30,6 @@ void alignedvector3()
|
|||||||
{
|
{
|
||||||
Scalar s1 = ei_random<Scalar>();
|
Scalar s1 = ei_random<Scalar>();
|
||||||
Scalar s2 = ei_random<Scalar>();
|
Scalar s2 = ei_random<Scalar>();
|
||||||
Scalar s3 = ei_random<Scalar>();
|
|
||||||
typedef Matrix<Scalar,3,1> RefType;
|
typedef Matrix<Scalar,3,1> RefType;
|
||||||
typedef Matrix<Scalar,3,3> Mat33;
|
typedef Matrix<Scalar,3,3> Mat33;
|
||||||
typedef AlignedVector3<Scalar> FastType;
|
typedef AlignedVector3<Scalar> FastType;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user