switch (dim)
{
case 1:
- tmp.data[0] = internal::NumberType<Number>::value(1);
+ tmp.data[0] = internal::NumberType<Number>::value(1.);
break;
case 2:
- tmp.data[0] = tmp.data[1] = internal::NumberType<Number>::value(1);
+ tmp.data[0] = tmp.data[1] = internal::NumberType<Number>::value(1.);
break;
case 3:
tmp.data[0] = tmp.data[1] = tmp.data[2] =
- internal::NumberType<Number>::value(1);
+ internal::NumberType<Number>::value(1.);
break;
default:
for (unsigned int d = 0; d < dim; ++d)
- tmp.data[d] = internal::NumberType<Number>::value(1);
+ tmp.data[d] = internal::NumberType<Number>::value(1.);
}
return tmp;
}
for (unsigned int i = 0; i < dim; ++i)
for (unsigned int j = 0; j < dim; ++j)
tmp.data[i][j] =
- internal::NumberType<Number>::value((i == j ? 1 : 0) - 1. / dim);
+ internal::NumberType<Number>::value((i == j ? 1. : 0.) - 1. / dim);
// then fill the ones that copy over the
// non-diagonal elements. note that during
// fill the elements treating the diagonal
for (unsigned int i = 0; i < dim; ++i)
- tmp.data[i][i] = internal::NumberType<Number>::value(1);
+ tmp.data[i][i] = internal::NumberType<Number>::value(1.);
// then fill the ones that copy over the
// non-diagonal elements. note that during