mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-05 15:38:05 +01:00
Conversion of Grid tensors to std::vector made more elegant, also pair syntax changed to (x y) to avoid issues with JSON/XML
This commit is contained in:
1 parent
485c5db0fe
commit
90dbe03e17
2 files changed
+90
-57
No files matched your search
@@ -202,8 +202,6 @@ int main(int argc,char **argv)
|
||||
GridSerialRNG rng;
|
||||
SpinColourMatrix scm;
|
||||
SpinColourVector scv;
|
||||
std::vector<std::vector<std::vector<std::vector<ComplexD>>>> scmv;
|
||||
std::vector<std::vector<ComplexD>> scvv;
|
||||
|
||||
rng.SeedFixedIntegers(std::vector<int>({42,10,81,9}));
|
||||
random(rng, scm);
|
||||
@@ -211,8 +209,8 @@ int main(int argc,char **argv)
|
||||
std::cout << "Test spin-color matrix: " << scm << std::endl;
|
||||
std::cout << "Test spin-color vector: " << scv << std::endl;
|
||||
std::cout << "Converting to std::vector" << std::endl;
|
||||
tensorToVec(scmv, scm);
|
||||
tensorToVec(scvv, scv);
|
||||
auto scmv = tensorToVec(scm);
|
||||
auto scvv = tensorToVec(scv);
|
||||
std::cout << "Spin-color matrix: " << scmv << std::endl;
|
||||
std::cout << "Spin-color vector: " << scvv << std::endl;
|
||||
}
|
||||
Reference in new issue
Block a user