v0.14.0
Loading...
Searching...
No Matches
test_T4_iostream.cpp
Go to the documentation of this file.
3#include "../test_ostream.hpp"
4
5using namespace FTensor;
6using namespace std;
8{
11 1., 3., 5., 7., 9., 11., 13., 15., 17., 19., 21., 23., 25., 27., 29.,
12 31., 33., 35., 37., 39., 41., 43., 45., 47., 49., 51., 53., 55., 57.,
13 59., 61., 63., 65., 67., 69., 71., 73., 75., 77., 79., 81., 83., 85.,
14 87., 89., 91., 93., 95., 97., 99., 101., 103., 105., 107., 109., 111.,
15 113., 115., 117., 119., 121., 123., 125., 127., 129., 131., 133., 135.,
16 137., 139., 141., 143., 145., 147., 149., 151., 153., 155., 157., 159.,
17 161.),
18 "[[[[1,3,5],[7,9,11],[13,15,17]],[[19,21,23],[25,27,29],[31,33,35]],[[37,"
19 "39,"
20 "41],[43,45,47],[49,51,53]]],[[[55,57,59],[61,63,65],[67,69,71]],[[73,75,"
21 "77]"
22 ",[79,81,83],[85,87,89]],[[91,93,95],[97,99,101],[103,105,107]]],[[[109,"
23 "111,"
24 "113],[115,117,119],[121,123,125]],[[127,129,131],[133,135,137],[139,141,"
25 "143]],[[145,147,149],[151,153,155],[157,159,161]]]]",
26 "operator<<(T4<3,3,3,3>)");
27
28 // TODO implement >> operator for Tensor4
30 std::stringstream ss(
31 "[[[1,3,5][7,9,11][13,15,17]][[19,21,23][25,27,29][31,33,35]]"
32 "[[37,39,41][43,45,47][49,51,53]]][[[55,57,59][61,63,65][67,69,71]]"
33 "[[73,75,77][79,81,83][85,87,89]][[91,93,95][97,99,101][103,105,107]]]"
34 "[[[109,111,113][115,117,119][121,123,125]][[127,129,131][133,135,137]["
35 "139,"
36 "141,143]]"
37 "[[145,147,149][151,153,155][157,159,161]]]");
38 /*
39 ss >> t2_1;
40 test_for_zero(t3_1(0,0,0,0)-1,"operator>>(T4)(0,0,0)");
41 test_for_zero(t3_1(0,0,0,1)-3,"operator>>(T4)(0,0,1)");
42 test_for_zero(t3_1(0,0,1,0)-5,"operator>>(T4)(0,1,0)");
43 test_for_zero(t3_1(0,0,1,1)-7,"operator>>(T3)(0,1,1)");
44 test_for_zero(t3_1(0,1,0,0)-9,"operator>>(T4)(1,0,0)");
45 test_for_zero(t3_1(0,1,0,1)-11,"operator>>(T4)(1,0,1)");
46 test_for_zero(t3_1(0,1,1,0)-13,"operator>>(T4)(1,1,0)");
47 test_for_zero(t3_1(0,1,1,1)-15,"operator>>(T3)(0,0,0)");
48 test_for_zero(t3_1(1,0,0,0)-17,"operator>>(T3)(0,0,1)");
49 test_for_zero(t3_1(1,0,0,1)-19,"operator>>(T3)(1,1,1)");
50 test_for_zero(t3_1(1,0,1,0)-21,"operator>>(T3)(0,1,0)");
51 test_for_zero(t3_1(1,0,1,1)-23,"operator>>(T3)(0,1,1)");
52 test_for_zero(t3_1(1,1,0,0)-25,"operator>>(T3)(1,0,0)");
53 test_for_zero(t3_1(1,1,0,1)-27,"operator>>(T3)(1,0,1)");
54 test_for_zero(t3_1(1,1,1,0)-29,"operator>>(T3)(1,1,0)");
55 test_for_zero(t3_1(1,1,1,1)-31,"operator>>(T3)(1,1,1)");
56 */
57}
Tensors class implemented by Walter Landry.
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
void test_T4_iostream()
void test_ostream(const T &t, const std::string &expected, const std::string &test_name)