working on tensor class

This commit is contained in:
2024-04-03 22:14:24 +02:00
parent 8bbbaa5bae
commit baee11489b
3 changed files with 26 additions and 7 deletions

13
t.cc
View File

@@ -3202,7 +3202,18 @@ g.range=3;
Tensor<double> epsilon(g);
cout <<epsilon.size()<<endl;
//cout <<epsilon(3,2,1)<<endl;
NRVec<LA_index> I({1,2,3});
NRVec<NRVec<LA_index> > II(I,1);
epsilon.lhs(II)=1;
II.copyonwrite();
II[0][0]=3;
II[0][1]=2;
II[0][2]=1;
epsilon *= 2.;
cout <<epsilon(II)<<endl;
}