Make param name and docs constistent for JacobiRotation::makeGivens

(manually grafted from c6066ac4115cafd00db7e02a179957290978142c
)
This commit is contained in:
Christoph Hertzberg 2018-09-06 18:22:50 +02:00
parent af3656d4ca
commit 1eef23a1eb

View File

@ -65,11 +65,11 @@ template<typename Scalar> class JacobiRotation
bool makeJacobi(const MatrixBase<Derived>&, Index p, Index q); bool makeJacobi(const MatrixBase<Derived>&, Index p, Index q);
bool makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z); bool makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z);
void makeGivens(const Scalar& p, const Scalar& q, Scalar* z=0); void makeGivens(const Scalar& p, const Scalar& q, Scalar* r=0);
protected: protected:
void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::true_type); void makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::true_type);
void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::false_type); void makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::false_type);
Scalar m_c, m_s; Scalar m_c, m_s;
}; };
@ -132,7 +132,7 @@ inline bool JacobiRotation<Scalar>::makeJacobi(const MatrixBase<Derived>& m, Ind
* \f$ V = \left ( \begin{array}{c} p \\ q \end{array} \right )\f$ yields: * \f$ V = \left ( \begin{array}{c} p \\ q \end{array} \right )\f$ yields:
* \f$ G^* V = \left ( \begin{array}{c} r \\ 0 \end{array} \right )\f$. * \f$ G^* V = \left ( \begin{array}{c} r \\ 0 \end{array} \right )\f$.
* *
* The value of \a z is returned if \a z is not null (the default is null). * The value of \a r is returned if \a r is not null (the default is null).
* Also note that G is built such that the cosine is always real. * Also note that G is built such that the cosine is always real.
* *
* Example: \include Jacobi_makeGivens.cpp * Example: \include Jacobi_makeGivens.cpp
@ -145,9 +145,9 @@ inline bool JacobiRotation<Scalar>::makeJacobi(const MatrixBase<Derived>& m, Ind
* \sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight() * \sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()
*/ */
template<typename Scalar> template<typename Scalar>
void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* z) void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r)
{ {
makeGivens(p, q, z, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>::type()); makeGivens(p, q, r, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>::type());
} }