Commit 177d73b2 authored by Sebastian Wolf's avatar Sebastian Wolf

Fix xAls

parent 061387a1
......@@ -144,10 +144,10 @@ namespace xerus {
if(isOperator) {
const auto rndComp = Tensor::random({leftRank, _dimensions[i], _dimensions[numComponents+i], rightRank}, _dist, _rnd);
result.set_component(i, rndComp/rndComp.frob_norm());
result.set_component(i, rndComp);
} else {
const auto rndComp = Tensor::random({leftRank, _dimensions[i], rightRank}, _dist, _rnd);
result.set_component(i, rndComp/rndComp.frob_norm());
result.set_component(i, rndComp);
}
}
result.move_core(0);
......
......@@ -94,7 +94,7 @@ namespace xerus {
double calc_residual_norm() {
const Index i, j;
Tensor tmp;
TTTensor tmp;
tmp(i&0) = A(i/2, j/2)*x(j&0)-b(i&0);
return frob_norm(tmp);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment