This was found by cppcheck.
std::vector<double> diagonal;
std::vector<double> subdiagonal;
- // scalars to store norms and inner products
- double a = 0, b = 0;
-
// 1. Normalize input vector
(*v) = v0_;
- a = v->l2_norm();
+ double a = v->l2_norm();
Assert (a!=0, ExcDivideByZero());
(*v) *= 1./a;
for (unsigned int i = 1; i < k; ++i)
{
// 4. L2 norm of f
- b = f->l2_norm();
+ const double b = f->l2_norm();
Assert (b!=0, ExcDivideByZero());
// 5. v0 <- v; v <- f/b
*v0 = *v;
{
const unsigned int q = x.size();
std::vector<long double> w(q);
- long double s = 0.L;
const long double factor = std::pow(2., alpha+beta+1) *
gamma(alpha+q) *
((q-1)*gamma(q)*gamma(alpha+beta+q+1));
for (unsigned int i=0; i<q; ++i)
{
- s = JacobiP(x[i], alpha, beta, q-1);
+ const long double s = JacobiP(x[i], alpha, beta, q-1);
w[i] = factor/(s*s);
}
w[0] *= (beta + 1);
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams