Skip to content
Snippets Groups Projects
Commit c8638429 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

regtest

parent 177ec619
No related branches found
No related tags found
No related merge requests found
......@@ -17,21 +17,18 @@ int main(){
Tensor B(1.0,2.0,3.0,5.0,4.0,3.0,10.0,8.0,2.0);
Vector c=matmul(a,B,inverse(B));
ofs<<a[0]<<" "<<a[1]<<" "<<a[2]<<"\n";
ofs<<b[0]<<" "<<b[1]<<" "<<b[2]<<"\n";
ofs<<c[0]<<" "<<c[1]<<" "<<c[2]<<"\n";
ofs<<a<<"\n";
ofs<<b<<"\n";
ofs<<c<<"\n";
B-=A;
ofs<<determinant(B)<<"\n";
TensorGeneric<3,2> D(Vector(0,1,2),Vector2d(3,4));
ofs<<D[0][0]<<" "<<D[0][1]<<"\n";
ofs<<D[1][0]<<" "<<D[1][1]<<"\n";
ofs<<D[2][0]<<" "<<D[2][1]<<"\n";
ofs<<D<<"\n";
TensorGeneric<2,3> E=transpose(D);
ofs<<E[0][0]<<" "<<E[0][1]<<" "<<E[0][2]<<"\n";
ofs<<E[1][0]<<" "<<E[1][1]<<" "<<E[1][2]<<"\n";
ofs<<E<<"\n";
double f(matmul(a,B,c));
double f1(dotProduct(a,matmul(B,c)));
......
......@@ -2,9 +2,6 @@
1 2 3
1 2 3
80
0 0
3 4
6 8
0 3 6
0 4 8
0 0 3 4 6 8
0 3 6 0 4 8
140 140 140
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment