Lines Matching refs:Scalar
34 template<typename Scalar> class JacobiRotation
37 typedef typename NumTraits<Scalar>::Real RealScalar;
43 JacobiRotation(const Scalar& c, const Scalar& s) : m_c(c), m_s(s) {} in JacobiRotation()
45 Scalar& c() { return m_c; } in c()
46 Scalar c() const { return m_c; } in c()
47 Scalar& s() { return m_s; } in s()
48 Scalar s() const { return m_s; } in s()
66 bool makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z);
68 void makeGivens(const Scalar& p, const Scalar& q, Scalar* z=0);
71 void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::true_type);
72 void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::false_type);
74 Scalar m_c, m_s;
82 template<typename Scalar>
83 bool JacobiRotation<Scalar>::makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z) in makeJacobi()
87 typedef typename NumTraits<Scalar>::Real RealScalar; in makeJacobi()
88 if(y == Scalar(0)) in makeJacobi()
90 m_c = Scalar(1); in makeJacobi()
91 m_s = Scalar(0); in makeJacobi()
124 template<typename Scalar>
126 inline bool JacobiRotation<Scalar>::makeJacobi(const MatrixBase<Derived>& m, typename Derived::Inde… in makeJacobi()
147 template<typename Scalar>
148 void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* z) in makeGivens()
150 …makeGivens(p, q, z, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_ty… in makeGivens()
155 template<typename Scalar>
156 void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::true… in makeGivens()
162 if(q==Scalar(0)) in makeGivens()
164 m_c = numext::real(p)<0 ? Scalar(-1) : Scalar(1); in makeGivens()
168 else if(p==Scalar(0)) in makeGivens()
180 Scalar ps = p / p1; in makeGivens()
182 Scalar qs = q / p1; in makeGivens()
189 m_c = Scalar(1)/u; in makeGivens()
195 Scalar ps = p / q1; in makeGivens()
197 Scalar qs = q / q1; in makeGivens()
214 template<typename Scalar>
215 void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::fals… in makeGivens()
219 if(q==Scalar(0)) in makeGivens()
221 m_c = p<Scalar(0) ? Scalar(-1) : Scalar(1); in makeGivens()
222 m_s = Scalar(0); in makeGivens()
225 else if(p==Scalar(0)) in makeGivens()
227 m_c = Scalar(0); in makeGivens()
228 m_s = q<Scalar(0) ? Scalar(1) : Scalar(-1); in makeGivens()
233 Scalar t = q/p; in makeGivens()
234 Scalar u = sqrt(Scalar(1) + numext::abs2(t)); in makeGivens()
235 if(p<Scalar(0)) in makeGivens()
237 m_c = Scalar(1)/u; in makeGivens()
243 Scalar t = p/q; in makeGivens()
244 Scalar u = sqrt(Scalar(1) + numext::abs2(t)); in makeGivens()
245 if(q<Scalar(0)) in makeGivens()
247 m_s = -Scalar(1)/u; in makeGivens()
304 typedef typename VectorX::Scalar Scalar; in apply_rotation_in_the_plane() typedef
305 enum { PacketSize = packet_traits<Scalar>::size }; in apply_rotation_in_the_plane()
306 typedef typename packet_traits<Scalar>::type Packet; in apply_rotation_in_the_plane()
312 Scalar* EIGEN_RESTRICT x = &_x.coeffRef(0); in apply_rotation_in_the_plane()
313 Scalar* EIGEN_RESTRICT y = &_y.coeffRef(0); in apply_rotation_in_the_plane()
334 conj_helper<Packet,Packet,NumTraits<Scalar>::IsComplex,false> pcj; in apply_rotation_in_the_plane()
338 Scalar xi = x[i]; in apply_rotation_in_the_plane()
339 Scalar yi = y[i]; in apply_rotation_in_the_plane()
344 Scalar* EIGEN_RESTRICT px = x + alignedStart; in apply_rotation_in_the_plane()
345 Scalar* EIGEN_RESTRICT py = y + alignedStart; in apply_rotation_in_the_plane()
386 Scalar xi = x[i]; in apply_rotation_in_the_plane()
387 Scalar yi = y[i]; in apply_rotation_in_the_plane()
400 conj_helper<Packet,Packet,NumTraits<Scalar>::IsComplex,false> pcj; in apply_rotation_in_the_plane()
401 Scalar* EIGEN_RESTRICT px = x; in apply_rotation_in_the_plane()
402 Scalar* EIGEN_RESTRICT py = y; in apply_rotation_in_the_plane()
419 Scalar xi = *x; in apply_rotation_in_the_plane()
420 Scalar yi = *y; in apply_rotation_in_the_plane()