|
Cytnx v0.9.6
|
#include <Network.hpp>
Public Member Functions | |
| void | Fromfile (const std::string &fname, const int &network_type=NtType.Regular) |
| Construct Network from network file. | |
| void | FromString (const std::vector< std::string > &contents, const int &network_type=NtType.Regular) |
| Construct Network from a list of strings, where each string is the same as each line in network file. | |
| Network (const std::string &fname, const int &network_type=NtType.Regular) | |
| void | RmUniTensor (const std::string &name) |
| void | RmUniTensor (const cytnx_uint64 &idx) |
| void | RmUniTensors (const std::vector< std::string > &names) |
| void | PutUniTensor (const std::string &name, const UniTensor &utensor, const std::vector< std::string > &label_order={}) |
| void | PutUniTensor (const cytnx_uint64 &idx, const UniTensor &utensor, const std::vector< std::string > &label_order={}) |
| void | PutUniTensors (const std::vector< std::string > &name, const std::vector< UniTensor > &utensors) |
| std::string | getOptimalOrder (const int &network_type=NtType.Regular) |
| std::string | getOrder () |
| void | setOrder (const bool &optimal, const std::string &contract_order) |
| UniTensor | Launch (const int &network_type=NtType.Regular) |
| void | construct (const std::vector< std::string > &alias, const std::vector< std::vector< std::string > > &labels, const std::vector< std::string > &outlabel=std::vector< std::string >(), const cytnx_int64 &outrk=0, const std::string &order="", const bool optim=false, const int &network_type=NtType.Regular) |
| void | clear () |
| Network | clone () |
| void | PrintNet () |
| void | Savefile (const std::string &fname) |
Static Public Member Functions | |
| static Network | Contract (const std::vector< UniTensor > &tensors, const std::string &Tout, const std::vector< std::string > &alias={}, const std::string &contract_order="") |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
Construct Network from network file.
| fname | The network file path |
| network_type | The type of network. This can be [NtType.Regular] or [NtType.Fermion.]. Currently, only Regular Network is support! |
Format of a network file:
About [Labels]:
About [ORDER]:
==== Network ==== [x] A : 0 ; 1 2 [x] B : 0 ; 3 4 [x] C : 5 ; 1 6 [x] D : 5 ; 7 8 TOUT : 2 3 4 ; 6 7 8 ORDER : (A,B),(C,D) =================
==== Network ==== [x] A : 0 ; 1 2 [x] B : 0 ; 3 4 [x] C : 5 ; 1 6 [x] D : 5 ; 7 8 TOUT : 2 3 4 ; 6 7 8 ORDER : (A,B),(C,D) =================
|
inline |
Construct Network from a list of strings, where each string is the same as each line in network file.
| contents | The network file descriptions |
| network_type | The type of network. This can be [NtType.Regular] or [NtType.Fermion.]. Currently, only Regular Network is support! |
Format of each string follows the same policy as Fromfile.
==== Network ==== [x] A : 0 ; 1 2 [x] B : 0 ; 3 4 [x] C : 5 ; 1 6 [x] D : 5 ; 7 8 TOUT : 2 3 4 ; 6 7 8 ORDER : (A,B),(C,D) =================
==== Network ==== [x] A : 0 ; 1 2 [x] B : 0 ; 3 4 [x] C : 5 ; 1 6 [x] D : 5 ; 7 8 TOUT : 2 3 4 ; 6 7 8 ORDER : (A,B),(C,D) =================
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |