tensor-fourindex_dense conversion for nosymmetry

This commit is contained in:
2025-10-24 11:24:12 +02:00
parent 91d8f4cc46
commit 874c2d5f83
3 changed files with 63 additions and 28 deletions

15
t.cc
View File

@@ -3675,7 +3675,7 @@ x0.split_index_group(0);
cout <<"Error = "<<(x0-y).norm()<<endl;
}
if(1)
if(0)
{
//tucker of a non-flat symmetric tensor
int r,n;
@@ -3704,5 +3704,18 @@ cout <<"Error = "<<(x1-y).norm()<<endl;
}
if(1)
{
int n;
cin>>n;
fourindex_dense<nosymmetry,double,int> f(n);
f.randomize(1.);
Tensor<double> t=fourindex2tensor(f);
cout <<t;
fourindex_dense<nosymmetry,double,int> ff;
tensor2fourindex(t,ff);
cout <<"Error = "<<(f-ff).norm()<<endl;
}
}//main