diff --git a/t.cc b/t.cc index 22153ab..54110cb 100644 --- a/t.cc +++ b/t.cc @@ -3976,6 +3976,7 @@ cout <>r>>n; INDEXGROUP shape; @@ -3986,13 +3987,17 @@ INDEXGROUP shape; shape.range=n; shape.offset=0; } -Tensor x(shape); -x.randomize(1.); -cout< x(shape); x.randomize(1.); Tensor xf=x.flatten(); -cout < y(shape); y.randomize(1.); +Tensor yf=y.flatten(); -cout < z = x.groupcontraction(0,y,0,1,false,true); +INDEXLIST cl(r); +for(int i=0; i zf = xf.contractions(cl,yf,cl,1,false,true); + +cout <>(std::istream &s, Tensor &x) s>>x.shape; s>>x.names; x.data.resize(x.calcsize()); x.calcrank(); +if(x.rank()==0) {s>>x.data[0]; return s;} FLATINDEX I(x.rank()); for(LA_largeindex i=0; i