|
inline |
Parse a rank-3 tensor from an input stream.
Only use this when text files are absolutely necessary, normally, use the serialisation functions.
Input format is the same as the output format generated by operator<<(std::ostream&, DenseTensor<3, Scalar>&)
, i.e.:
Start: {2, 3, 4}/24 [0, r, c] (1.7762,0.885575) (-1.30396,1.74509) (-1.22219,-1.27248) (1.27656,-0.400882) (-1.03037,-0.35471) (0.26383,-0.725387) (1.33312,1.28716) (-0.996895,1.8772) (0.517159,-1.46897) (1.02385,-1.46344) (-1.36147,1.58557) (1.38679,-0.401932) [1, r, c] (-1.48124,0.194106) (-1.03066,-1.12675) (-0.905748,0.279874) (-0.167615,1.47265) (-1.31705,-1.39962) (-1.04557,-1.42566) (1.95275,0.991027) (-0.937282,-0.313012) (1.01652,-1.29244) (1.08615,-1.65971) (0.877304,0.888116) (0.840743,1.02031) End: {2, 3, 4}/24
for a rank-3 tensor of 2 × 3 × 4 complex elements. Note that anything that can be parsed into the scalar type of the tensor is accepted there.
References std::getline(), read(), and std::istream::setstate().