42 #ifndef _TEUCHOS_BLAS_UQ_PCE_HPP_ 43 #define _TEUCHOS_BLAS_UQ_PCE_HPP_ 45 #include "Teuchos_BLAS.hpp" 54 template<
typename Storage>
55 class GivensRotator<
Sacado::UQ::PCE<Storage>, false> {
66 typedef ScalarTraits<ScalarType> STS;
92 if (STS::magnitude (*da) > STS::magnitude (*db)) {
95 scale = STS::magnitude (*da) + STS::magnitude (*db);
96 if (scale == STS::zero()) {
107 r = scale * STS::squareroot (da_scaled*da_scaled + db_scaled*db_scaled);
108 r = SIGN (STS::one(), roe) * r;
112 if (STS::magnitude (*da) > STS::magnitude (*db)) {
115 if (STS::magnitude (*db) >= STS::magnitude (*da) && *c != STS::zero()) {
131 GivensRotator<value_type> value_rotator;
135 z.fastAccessCoeff(i) = value_rotator.SIGN(
x.coeff(i),
y.coeff(i));
144 #endif // _TEUCHOS_BLAS_UQ_PCE_HPP_ Sacado::UQ::PCE< Storage > ScalarType
ScalarType SIGN(ScalarType x, ScalarType y) const
Return ABS(x) if y > 0 or y is +0, else -ABS(x) (if y is -0 or < 0).
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
void ROTG(ScalarType *da, ScalarType *db, ScalarType *c, ScalarType *s) const
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType * y