From cd0155ce3deddb5266eca4cdc36b48415a93a8a5 Mon Sep 17 00:00:00 2001 From: hzhangxyz Date: Fri, 15 Dec 2023 11:07:00 +0000 Subject: [PATCH] Deploy to GitHub pages --- TAT_8hpp.html | 127 ++ TAT_8hpp.js | 4 + TAT_8hpp_source.html | 147 ++ _formulas.tex | 15 + allocator_8hpp.html | 235 +++ allocator_8hpp.js | 24 + allocator_8hpp_source.html | 430 ++++ annotated.html | 189 ++ annotated_dup.js | 105 + bc_s.png | Bin 0 -> 676 bytes bdwn.png | Bin 0 -> 147 bytes classTAT_1_1Core-members.html | 122 ++ classTAT_1_1Core.html | 193 ++ classTAT_1_1Core.js | 23 + classTAT_1_1Edge-members.html | 149 ++ classTAT_1_1Edge.html | 290 +++ classTAT_1_1Edge.js | 18 + classTAT_1_1Edge.png | Bin 0 -> 1428 bytes classTAT_1_1FastName-members.html | 111 + classTAT_1_1FastName.html | 144 ++ classTAT_1_1FastName.js | 12 + classTAT_1_1Tensor-members.html | 220 ++ classTAT_1_1Tensor.html | 1842 +++++++++++++++++ classTAT_1_1Tensor.js | 123 ++ classTAT_1_1edge__segments__t-members.html | 138 ++ classTAT_1_1edge__segments__t.html | 295 +++ classTAT_1_1edge__segments__t.js | 39 + classTAT_1_1mdspan-members.html | 125 ++ classTAT_1_1mdspan.html | 197 ++ classTAT_1_1mdspan.js | 27 + classes.html | 147 ++ classlazy_1_1Copy-members.html | 104 + classlazy_1_1Copy.html | 179 ++ classlazy_1_1Copy.js | 5 + classlazy_1_1Node-members.html | 107 + classlazy_1_1Node.html | 273 +++ classlazy_1_1Node.js | 8 + ...t__lattice_1_1AbstractLattice-members.html | 119 ++ ...1abstract__lattice_1_1AbstractLattice.html | 240 +++ ...1_1abstract__lattice_1_1AbstractLattice.js | 5 + ..._1abstract__lattice_1_1AbstractLattice.png | Bin 0 -> 2296 bytes ...1_1AbstractLatticeVirtualBond-members.html | 105 + ...lattice_1_1AbstractLatticeVirtualBond.html | 230 ++ ...__lattice_1_1AbstractLatticeVirtualBond.js | 6 + ...tract__state_1_1AbstractState-members.html | 117 ++ ...o_1_1abstract__state_1_1AbstractState.html | 431 ++++ ...ono_1_1abstract__state_1_1AbstractState.js | 18 + ...no_1_1abstract__state_1_1AbstractState.png | Bin 0 -> 2607 bytes ...e_1_1AbstractStateHamiltonian-members.html | 106 + ...ct__state_1_1AbstractStateHamiltonian.html | 253 +++ ...ract__state_1_1AbstractStateHamiltonian.js | 7 + ...e_1_1AbstractStatePhysicsEdge-members.html | 106 + ...ct__state_1_1AbstractStatePhysicsEdge.html | 255 +++ ...ract__state_1_1AbstractStatePhysicsEdge.js | 7 + ...ies_1_1DoubleLayerAuxiliaries-members.html | 112 + ...auxiliaries_1_1DoubleLayerAuxiliaries.html | 144 ++ ...__auxiliaries_1_1DoubleLayerAuxiliaries.js | 13 + ...ies_1_1SingleLayerAuxiliaries-members.html | 113 + ...auxiliaries_1_1SingleLayerAuxiliaries.html | 156 ++ ...__auxiliaries_1_1SingleLayerAuxiliaries.js | 14 + ..._auxiliaries_1_1SingleLayerAuxiliaries.png | Bin 0 -> 1253 bytes ...aries_1_1ThreeLineAuxiliaries-members.html | 108 + ...__auxiliaries_1_1ThreeLineAuxiliaries.html | 132 ++ ...ne__auxiliaries_1_1ThreeLineAuxiliaries.js | 9 + ..._1tensor__toolkit_1_1FakeEdge-members.html | 105 + ...tensor_1_1tensor__toolkit_1_1FakeEdge.html | 123 ++ ...__tensor_1_1tensor__toolkit_1_1FakeEdge.js | 6 + ...1_1exact__state_1_1ExactState-members.html | 124 ++ ...tragono_1_1exact__state_1_1ExactState.html | 333 +++ ...tetragono_1_1exact__state_1_1ExactState.js | 10 + ...etragono_1_1exact__state_1_1ExactState.png | Bin 0 -> 853 bytes ...e_1_1lattice_1_1Configuration-members.html | 122 ++ ...__lattice_1_1lattice_1_1Configuration.html | 606 ++++++ ...ng__lattice_1_1lattice_1_1Configuration.js | 16 + ...g__lattice_1_1lattice_1_1Configuration.png | Bin 0 -> 1250 bytes ...1lattice_1_1ConfigurationPool-members.html | 106 + ...ttice_1_1lattice_1_1ConfigurationPool.html | 239 +++ ...lattice_1_1lattice_1_1ConfigurationPool.js | 7 + ...1_1lattice_1_1SamplingLattice-members.html | 128 ++ ...lattice_1_1lattice_1_1SamplingLattice.html | 485 +++++ ...__lattice_1_1lattice_1_1SamplingLattice.js | 13 + ..._lattice_1_1lattice_1_1SamplingLattice.png | Bin 0 -> 1536 bytes ...ce_1_1lattice_1_1TailDictTree-members.html | 107 + ...g__lattice_1_1lattice_1_1TailDictTree.html | 130 ++ ...ing__lattice_1_1lattice_1_1TailDictTree.js | 8 + ...ttice_1_1observer_1_1Observer-members.html | 124 ++ ...ling__lattice_1_1observer_1_1Observer.html | 830 ++++++++ ...mpling__lattice_1_1observer_1_1Observer.js | 25 + ...1_1sampling_1_1DirectSampling-members.html | 106 + ...lattice_1_1sampling_1_1DirectSampling.html | 184 ++ ...__lattice_1_1sampling_1_1DirectSampling.js | 6 + ..._lattice_1_1sampling_1_1DirectSampling.png | Bin 0 -> 1085 bytes ..._1sampling_1_1ErgodicSampling-members.html | 107 + ...attice_1_1sampling_1_1ErgodicSampling.html | 237 +++ ..._lattice_1_1sampling_1_1ErgodicSampling.js | 8 + ...lattice_1_1sampling_1_1ErgodicSampling.png | Bin 0 -> 1095 bytes ...ttice_1_1sampling_1_1Sampling-members.html | 105 + ...ling__lattice_1_1sampling_1_1Sampling.html | 229 ++ ...mpling__lattice_1_1sampling_1_1Sampling.js | 6 + ...pling__lattice_1_1sampling_1_1Sampling.png | Bin 0 -> 1861 bytes ..._1_1sampling_1_1SweepSampling-members.html | 107 + ..._lattice_1_1sampling_1_1SweepSampling.html | 191 ++ ...g__lattice_1_1sampling_1_1SweepSampling.js | 7 + ...__lattice_1_1sampling_1_1SweepSampling.png | Bin 0 -> 1101 bytes ...tetragono_1_1shell_1_1AutoCmd-members.html | 104 + classtetragono_1_1shell_1_1AutoCmd.html | 131 ++ classtetragono_1_1shell_1_1AutoCmd.js | 4 + classtetragono_1_1shell_1_1AutoCmd.png | Bin 0 -> 2990 bytes ...agono_1_1shell_1_1AutoCmdMeta-members.html | 103 + classtetragono_1_1shell_1_1AutoCmdMeta.html | 124 ++ classtetragono_1_1shell_1_1AutoCmdMeta.js | 4 + classtetragono_1_1shell_1_1AutoCmdMeta.png | Bin 0 -> 1792 bytes ...stetragono_1_1shell_1_1Config-members.html | 105 + classtetragono_1_1shell_1_1Config.html | 123 ++ classtetragono_1_1shell_1_1Config.js | 6 + ...1shell_1_1TetragonoCommandApp-members.html | 150 ++ ...agono_1_1shell_1_1TetragonoCommandApp.html | 1270 ++++++++++++ ...tragono_1_1shell_1_1TetragonoCommandApp.js | 49 + ...ragono_1_1shell_1_1TetragonoCommandApp.png | Bin 0 -> 2975 bytes ..._1shell_1_1TetragonoScriptApp-members.html | 151 ++ ...ragono_1_1shell_1_1TetragonoScriptApp.html | 286 +++ ...etragono_1_1shell_1_1TetragonoScriptApp.js | 8 + ...tragono_1_1shell_1_1TetragonoScriptApp.png | Bin 0 -> 2978 bytes ...attice_1_1SimpleUpdateLattice-members.html | 128 ++ ...pdate__lattice_1_1SimpleUpdateLattice.html | 478 +++++ ..._update__lattice_1_1SimpleUpdateLattice.js | 13 + ...update__lattice_1_1SimpleUpdateLattice.png | Bin 0 -> 1577 bytes ...impleUpdateLatticeEnvironment-members.html | 105 + ...ice_1_1SimpleUpdateLatticeEnvironment.html | 230 ++ ...ttice_1_1SimpleUpdateLatticeEnvironment.js | 6 + ...gono_1_1utility_1_1SeedDiffer-members.html | 110 + classtetragono_1_1utility_1_1SeedDiffer.html | 142 ++ classtetragono_1_1utility_1_1SeedDiffer.js | 11 + ...o_1_1utility_1_1SignalHandler-members.html | 109 + ...tetragono_1_1utility_1_1SignalHandler.html | 135 ++ classtetragono_1_1utility_1_1SignalHandler.js | 10 + clear__symmetry_8hpp.html | 123 ++ clear__symmetry_8hpp.js | 4 + clear__symmetry_8hpp_source.html | 226 ++ closed.png | Bin 0 -> 132 bytes common__variable_8hpp.html | 376 ++++ common__variable_8hpp.js | 36 + common__variable_8hpp_source.html | 293 +++ conjugate_8hpp.html | 130 ++ conjugate_8hpp.js | 5 + conjugate_8hpp_source.html | 212 ++ const__integral_8hpp.html | 145 ++ const__integral_8hpp.js | 9 + const__integral_8hpp_source.html | 165 ++ contract_8hpp.html | 185 ++ contract_8hpp.js | 19 + contract_8hpp_source.html | 968 +++++++++ core_8hpp.html | 136 ++ core_8hpp.js | 5 + core_8hpp_source.html | 329 +++ dir_1ac0d2e859119d1a816ab91accc8f3bd.html | 100 + dir_1bb041b373cba7fea1f94fe0a21b12cb.html | 104 + dir_2aa3e1e3445b52e6089c31406cc8058e.html | 113 + dir_2aa3e1e3445b52e6089c31406cc8058e.js | 6 + dir_32d6834a61cf7e3eb1dc36108a8ff177.html | 122 ++ dir_32d6834a61cf7e3eb1dc36108a8ff177.js | 9 + dir_3e2ca712ed33b4acc8f5e703e916d56d.html | 104 + dir_b160beeb2b43916eb0814d3fadcb9e8e.html | 100 + dir_bba2162289eb2d74249bf9838ef29818.html | 104 + dir_c11eeef15dfae30af60e807fe15492ec.html | 137 ++ dir_c11eeef15dfae30af60e807fe15492ec.js | 14 + dir_d03a70d343a54e863776fceb3813cfee.html | 104 + dir_d1f80ff82539b6697abb4a4794b81257.html | 110 + dir_d1f80ff82539b6697abb4a4794b81257.js | 8 + dir_d44c64559bbebec7f509842c48db8b23.html | 104 + dir_d44c64559bbebec7f509842c48db8b23.js | 4 + dir_d59b46738c7f078653cd0d36aa541791.html | 119 ++ dir_d59b46738c7f078653cd0d36aa541791.js | 8 + dir_f08b25de5750f3bb9e473212d11d084d.html | 100 + dir_f327081aebde40e94b3c9aef15c7c41d.html | 100 + doc.png | Bin 0 -> 746 bytes doxygen.css | 1793 ++++++++++++++++ doxygen.svg | 26 + dynsections.js | 121 ++ edge_8hpp.html | 186 ++ edge_8hpp.js | 17 + edge_8hpp_source.html | 420 ++++ edge__operator_8hpp.html | 131 ++ edge__operator_8hpp.js | 5 + edge__operator_8hpp_source.html | 781 +++++++ exponential_8hpp.html | 177 ++ exponential_8hpp.js | 16 + exponential_8hpp_source.html | 365 ++++ files.html | 135 ++ files_dup.js | 4 + folderclosed.png | Bin 0 -> 616 bytes folderopen.png | Bin 0 -> 597 bytes functions.html | 580 ++++++ functions_func.html | 580 ++++++ hierarchy.html | 182 ++ hierarchy.js | 97 + identity_8hpp.html | 123 ++ identity_8hpp.js | 4 + identity_8hpp_source.html | 227 ++ index.html | 99 + io_8hpp.html | 306 +++ io_8hpp.js | 52 + io_8hpp_source.html | 860 ++++++++ jquery.js | 35 + menu.js | 51 + menudata.js | 86 + mpi_8hpp.html | 170 ++ mpi_8hpp.js | 14 + mpi_8hpp_source.html | 389 ++++ multidimension__span_8hpp.html | 156 ++ multidimension__span_8hpp.js | 10 + multidimension__span_8hpp_source.html | 480 +++++ name_8hpp.html | 385 ++++ name_8hpp.js | 54 + name_8hpp_source.html | 305 +++ namespaceTAT.html | 1080 ++++++++++ namespaceTAT.js | 290 +++ namespacemembers.html | 139 ++ namespacemembers_func.html | 100 + namespacemembers_type.html | 121 ++ namespacemembers_vars.html | 112 + namespaces.html | 203 ++ namespaces_dup.js | 275 +++ nav_f.png | Bin 0 -> 153 bytes nav_g.png | Bin 0 -> 95 bytes nav_h.png | Bin 0 -> 98 bytes navtree.css | 146 ++ navtree.js | 546 +++++ navtreedata.js | 64 + navtreeindex0.js | 253 +++ navtreeindex1.js | 253 +++ navtreeindex2.js | 253 +++ navtreeindex3.js | 253 +++ navtreeindex4.js | 253 +++ navtreeindex5.js | 253 +++ navtreeindex6.js | 28 + open.png | Bin 0 -> 123 bytes qr_8hpp.html | 245 +++ qr_8hpp.js | 37 + qr_8hpp_source.html | 602 ++++++ resize.js | 140 ++ scalar_8hpp.html | 335 +++ scalar_8hpp.js | 33 + scalar_8hpp_source.html | 203 ++ search/all_0.html | 37 + search/all_0.js | 13 + search/all_1.html | 37 + search/all_1.js | 17 + search/all_10.html | 37 + search/all_10.js | 16 + search/all_11.html | 37 + search/all_11.js | 40 + search/all_12.html | 37 + search/all_12.js | 25 + search/all_13.html | 37 + search/all_13.js | 6 + search/all_14.html | 37 + search/all_14.js | 7 + search/all_15.html | 37 + search/all_15.js | 6 + search/all_16.html | 37 + search/all_16.js | 5 + search/all_2.html | 37 + search/all_2.js | 4 + search/all_3.html | 37 + search/all_3.js | 23 + search/all_4.html | 37 + search/all_4.js | 10 + search/all_5.html | 37 + search/all_5.js | 31 + search/all_6.html | 37 + search/all_6.js | 6 + search/all_7.html | 37 + search/all_7.js | 16 + search/all_8.html | 37 + search/all_8.js | 8 + search/all_9.html | 37 + search/all_9.js | 13 + search/all_a.html | 37 + search/all_a.js | 5 + search/all_b.html | 37 + search/all_b.js | 12 + search/all_c.html | 37 + search/all_c.js | 16 + search/all_d.html | 37 + search/all_d.js | 8 + search/all_e.html | 37 + search/all_e.js | 5 + search/all_f.html | 37 + search/all_f.js | 6 + search/classes_0.html | 37 + search/classes_0.js | 10 + search/classes_1.html | 37 + search/classes_1.js | 9 + search/classes_2.html | 37 + search/classes_2.js | 5 + search/classes_3.html | 37 + search/classes_3.js | 11 + search/classes_4.html | 37 + search/classes_4.js | 6 + search/classes_5.html | 37 + search/classes_5.js | 6 + search/classes_6.html | 37 + search/classes_6.js | 5 + search/classes_7.html | 37 + search/classes_7.js | 8 + search/classes_8.html | 37 + search/classes_8.js | 8 + search/classes_9.html | 37 + search/classes_9.js | 5 + search/classes_a.html | 37 + search/classes_a.js | 4 + search/classes_b.html | 37 + search/classes_b.js | 6 + search/classes_c.html | 37 + search/classes_c.js | 14 + search/classes_d.html | 37 + search/classes_d.js | 13 + search/classes_e.html | 37 + search/classes_e.js | 4 + search/close.svg | 31 + search/files_0.html | 37 + search/files_0.js | 4 + search/files_1.html | 37 + search/files_1.js | 9 + search/files_2.html | 37 + search/files_2.js | 6 + search/files_3.html | 37 + search/files_3.js | 5 + search/files_4.html | 37 + search/files_4.js | 5 + search/files_5.html | 37 + search/files_5.js | 4 + search/files_6.html | 37 + search/files_6.js | 4 + search/files_7.html | 37 + search/files_7.js | 9 + search/files_8.html | 37 + search/files_8.js | 7 + search/functions_0.html | 37 + search/functions_0.js | 13 + search/functions_1.html | 37 + search/functions_1.js | 8 + search/functions_10.html | 37 + search/functions_10.js | 23 + search/functions_11.html | 37 + search/functions_11.js | 11 + search/functions_12.html | 37 + search/functions_12.js | 4 + search/functions_13.html | 37 + search/functions_13.js | 5 + search/functions_14.html | 37 + search/functions_14.js | 6 + search/functions_15.html | 37 + search/functions_15.js | 4 + search/functions_2.html | 37 + search/functions_2.js | 4 + search/functions_3.html | 37 + search/functions_3.js | 11 + search/functions_4.html | 37 + search/functions_4.js | 7 + search/functions_5.html | 37 + search/functions_5.js | 21 + search/functions_6.html | 37 + search/functions_6.js | 16 + search/functions_7.html | 37 + search/functions_7.js | 5 + search/functions_8.html | 37 + search/functions_8.js | 6 + search/functions_9.html | 37 + search/functions_9.js | 5 + search/functions_a.html | 37 + search/functions_a.js | 5 + search/functions_b.html | 37 + search/functions_b.js | 9 + search/functions_c.html | 37 + search/functions_c.js | 6 + search/functions_d.html | 37 + search/functions_d.js | 5 + search/functions_e.html | 37 + search/functions_e.js | 4 + search/functions_f.html | 37 + search/functions_f.js | 11 + search/mag_sel.svg | 74 + search/namespaces_0.html | 37 + search/namespaces_0.js | 4 + search/nomatches.html | 13 + search/search.css | 257 +++ search/search.js | 816 ++++++++ search/search_l.png | Bin 0 -> 567 bytes search/search_m.png | Bin 0 -> 158 bytes search/search_r.png | Bin 0 -> 553 bytes search/searchdata.js | 33 + search/typedefs_0.html | 37 + search/typedefs_0.js | 4 + search/typedefs_1.html | 37 + search/typedefs_1.js | 4 + search/typedefs_2.html | 37 + search/typedefs_2.js | 4 + search/typedefs_3.html | 37 + search/typedefs_3.js | 5 + search/typedefs_4.html | 37 + search/typedefs_4.js | 4 + search/typedefs_5.html | 37 + search/typedefs_5.js | 4 + search/typedefs_6.html | 37 + search/typedefs_6.js | 4 + search/typedefs_7.html | 37 + search/typedefs_7.js | 4 + search/variables_0.html | 37 + search/variables_0.js | 4 + search/variables_1.html | 37 + search/variables_1.js | 6 + search/variables_2.html | 37 + search/variables_2.js | 4 + shared__ptr_8hpp.html | 121 ++ shared__ptr_8hpp.js | 4 + shared__ptr_8hpp_source.html | 212 ++ shrink__and__expand_8hpp.html | 132 ++ shrink__and__expand_8hpp.js | 6 + shrink__and__expand_8hpp_source.html | 243 +++ split__and__merge_8hpp.html | 121 ++ split__and__merge_8hpp.js | 4 + split__and__merge_8hpp_source.html | 207 ++ splitbar.png | Bin 0 -> 314 bytes structTAT_1_1Cut-members.html | 112 + structTAT_1_1Cut.html | 148 ++ structTAT_1_1Cut.js | 13 + structTAT_1_1InternalName-members.html | 155 ++ structTAT_1_1InternalName.html | 284 +++ structTAT_1_1InternalName.js | 56 + structTAT_1_1NameTraits.html | 114 + ...1NameTraits_3_01FastName_01_4-members.html | 106 + ...ctTAT_1_1NameTraits_3_01FastName_01_4.html | 122 ++ structTAT_1_1NameTraits_3_01FastName_01_4.js | 7 + ...Traits_3_01std_1_1string_01_4-members.html | 106 + ..._1_1NameTraits_3_01std_1_1string_01_4.html | 122 ++ ...AT_1_1NameTraits_3_01std_1_1string_01_4.js | 7 + structTAT_1_1NoCut.html | 103 + structTAT_1_1RelativeCut-members.html | 104 + structTAT_1_1RelativeCut.html | 120 ++ structTAT_1_1RelativeCut.js | 5 + structTAT_1_1RemainCut-members.html | 104 + structTAT_1_1RemainCut.html | 120 ++ structTAT_1_1RemainCut.js | 5 + structTAT_1_1Symmetry-members.html | 116 ++ structTAT_1_1Symmetry.html | 215 ++ structTAT_1_1Symmetry.js | 17 + structTAT_1_1Symmetry.png | Bin 0 -> 822 bytes structTAT_1_1TensorShape-members.html | 103 + structTAT_1_1TensorShape.html | 113 + structTAT_1_1TensorShape.js | 4 + ...ctTAT_1_1Tensor_1_1qr__result-members.html | 104 + structTAT_1_1Tensor_1_1qr__result.html | 126 ++ structTAT_1_1Tensor_1_1qr__result.js | 5 + ...tTAT_1_1Tensor_1_1svd__result-members.html | 105 + structTAT_1_1Tensor_1_1svd__result.html | 129 ++ structTAT_1_1Tensor_1_1svd__result.js | 6 + structTAT_1_1UnixColorCode-members.html | 104 + structTAT_1_1UnixColorCode.html | 127 ++ structTAT_1_1UnixColorCode.js | 5 + ...ctTAT_1_1edge__bose__arrow__t-members.html | 107 + structTAT_1_1edge__bose__arrow__t.html | 126 ++ structTAT_1_1edge__bose__arrow__t.js | 8 + ...tTAT_1_1edge__fermi__arrow__t-members.html | 107 + structTAT_1_1edge__fermi__arrow__t.html | 122 ++ structTAT_1_1edge__fermi__arrow__t.js | 8 + structTAT_1_1empty__list-members.html | 103 + structTAT_1_1empty__list.html | 120 ++ structTAT_1_1empty__list.js | 4 + structTAT_1_1empty__list.png | Bin 0 -> 548 bytes structTAT_1_1fermi.html | 103 + ..._1mdspan_1_1iterator__general-members.html | 112 + structTAT_1_1mdspan_1_1iterator__general.html | 144 ++ structTAT_1_1mdspan_1_1iterator__general.js | 13 + ...T_1_1mpi__one__output__stream-members.html | 109 + structTAT_1_1mpi__one__output__stream.html | 141 ++ structTAT_1_1mpi__one__output__stream.js | 10 + ..._1_1mpi__rank__output__stream-members.html | 108 + structTAT_1_1mpi__rank__output__stream.html | 138 ++ structTAT_1_1mpi__rank__output__stream.js | 9 + structTAT_1_1mpi__t-members.html | 122 ++ structTAT_1_1mpi__t.html | 190 ++ structTAT_1_1mpi__t.js | 23 + structTAT_1_1overloaded.html | 109 + structTAT_1_1overloaded.png | Bin 0 -> 515 bytes structTAT_1_1remove__cvref-members.html | 103 + structTAT_1_1remove__cvref.html | 113 + structTAT_1_1remove__cvref.js | 4 + structTAT_1_1scope__resource-members.html | 107 + structTAT_1_1scope__resource.html | 126 ++ structTAT_1_1scope__resource.js | 8 + structTAT_1_1timer-members.html | 104 + structTAT_1_1timer.html | 122 ++ structTAT_1_1timer.js | 6 + structTAT_1_1timer_1_1timer__guard.html | 103 + structTAT_1_1type__identity-members.html | 103 + structTAT_1_1type__identity.html | 115 + structTAT_1_1type__identity.js | 4 + ...hash_3_01TAT_1_1FastName_01_4-members.html | 103 + ...tstd_1_1hash_3_01TAT_1_1FastName_01_4.html | 113 + structstd_1_1hash_3_01TAT_1_1FastName_01_4.js | 4 + ...ymmetry_3_01T_8_8_8_01_4_01_4-members.html | 103 + ...TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html | 113 + ...01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.js | 4 + ..._3_01Name_00_01Name_01_4_01_4-members.html | 103 + ...3_01pair_3_01Name_00_01Name_01_4_01_4.html | 113 + ...h_3_01pair_3_01Name_00_01Name_01_4_01_4.js | 4 + svd_8hpp.html | 178 ++ svd_8hpp.js | 17 + svd_8hpp_source.html | 635 ++++++ symmetry_8hpp.html | 200 ++ symmetry_8hpp.js | 23 + symmetry_8hpp_source.html | 351 ++++ sync_off.png | Bin 0 -> 853 bytes sync_on.png | Bin 0 -> 845 bytes tab_a.png | Bin 0 -> 142 bytes tab_b.png | Bin 0 -> 169 bytes tab_h.png | Bin 0 -> 177 bytes tab_s.png | Bin 0 -> 184 bytes tabs.css | 1 + tensor_8hpp.html | 210 ++ tensor_8hpp.js | 15 + tensor_8hpp_source.html | 949 +++++++++ timer_8hpp.html | 134 ++ timer_8hpp.js | 6 + timer_8hpp_source.html | 199 ++ trace_8hpp.html | 142 ++ trace_8hpp.js | 7 + trace_8hpp_source.html | 484 +++++ 530 files changed, 55016 insertions(+) create mode 100644 TAT_8hpp.html create mode 100644 TAT_8hpp.js create mode 100644 TAT_8hpp_source.html create mode 100644 _formulas.tex create mode 100644 allocator_8hpp.html create mode 100644 allocator_8hpp.js create mode 100644 allocator_8hpp_source.html create mode 100644 annotated.html create mode 100644 annotated_dup.js create mode 100644 bc_s.png create mode 100644 bdwn.png create mode 100644 classTAT_1_1Core-members.html create mode 100644 classTAT_1_1Core.html create mode 100644 classTAT_1_1Core.js create mode 100644 classTAT_1_1Edge-members.html create mode 100644 classTAT_1_1Edge.html create mode 100644 classTAT_1_1Edge.js create mode 100644 classTAT_1_1Edge.png create mode 100644 classTAT_1_1FastName-members.html create mode 100644 classTAT_1_1FastName.html create mode 100644 classTAT_1_1FastName.js create mode 100644 classTAT_1_1Tensor-members.html create mode 100644 classTAT_1_1Tensor.html create mode 100644 classTAT_1_1Tensor.js create mode 100644 classTAT_1_1edge__segments__t-members.html create mode 100644 classTAT_1_1edge__segments__t.html create mode 100644 classTAT_1_1edge__segments__t.js create mode 100644 classTAT_1_1mdspan-members.html create mode 100644 classTAT_1_1mdspan.html create mode 100644 classTAT_1_1mdspan.js create mode 100644 classes.html create mode 100644 classlazy_1_1Copy-members.html create mode 100644 classlazy_1_1Copy.html create mode 100644 classlazy_1_1Copy.js create mode 100644 classlazy_1_1Node-members.html create mode 100644 classlazy_1_1Node.html create mode 100644 classlazy_1_1Node.js create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLattice-members.html create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLattice.html create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLattice.js create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLattice.png create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond-members.html create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html create mode 100644 classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.js create mode 100644 classtetragono_1_1abstract__state_1_1AbstractState-members.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractState.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractState.js create mode 100644 classtetragono_1_1abstract__state_1_1AbstractState.png create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian-members.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.js create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge-members.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html create mode 100644 classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.js create mode 100644 classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries-members.html create mode 100644 classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html create mode 100644 classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.js create mode 100644 classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries-members.html create mode 100644 classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html create mode 100644 classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.js create mode 100644 classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.png create mode 100644 classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries-members.html create mode 100644 classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html create mode 100644 classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.js create mode 100644 classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge-members.html create mode 100644 classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html create mode 100644 classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.js create mode 100644 classtetragono_1_1exact__state_1_1ExactState-members.html create mode 100644 classtetragono_1_1exact__state_1_1ExactState.html create mode 100644 classtetragono_1_1exact__state_1_1ExactState.js create mode 100644 classtetragono_1_1exact__state_1_1ExactState.png create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.js create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.png create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.js create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.js create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.png create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html create mode 100644 classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.js create mode 100644 classtetragono_1_1sampling__lattice_1_1observer_1_1Observer-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html create mode 100644 classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.js create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.js create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.png create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.js create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.png create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.js create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.png create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling-members.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.js create mode 100644 classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.png create mode 100644 classtetragono_1_1shell_1_1AutoCmd-members.html create mode 100644 classtetragono_1_1shell_1_1AutoCmd.html create mode 100644 classtetragono_1_1shell_1_1AutoCmd.js create mode 100644 classtetragono_1_1shell_1_1AutoCmd.png create mode 100644 classtetragono_1_1shell_1_1AutoCmdMeta-members.html create mode 100644 classtetragono_1_1shell_1_1AutoCmdMeta.html create mode 100644 classtetragono_1_1shell_1_1AutoCmdMeta.js create mode 100644 classtetragono_1_1shell_1_1AutoCmdMeta.png create mode 100644 classtetragono_1_1shell_1_1Config-members.html create mode 100644 classtetragono_1_1shell_1_1Config.html create mode 100644 classtetragono_1_1shell_1_1Config.js create mode 100644 classtetragono_1_1shell_1_1TetragonoCommandApp-members.html create mode 100644 classtetragono_1_1shell_1_1TetragonoCommandApp.html create mode 100644 classtetragono_1_1shell_1_1TetragonoCommandApp.js create mode 100644 classtetragono_1_1shell_1_1TetragonoCommandApp.png create mode 100644 classtetragono_1_1shell_1_1TetragonoScriptApp-members.html create mode 100644 classtetragono_1_1shell_1_1TetragonoScriptApp.html create mode 100644 classtetragono_1_1shell_1_1TetragonoScriptApp.js create mode 100644 classtetragono_1_1shell_1_1TetragonoScriptApp.png create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice-members.html create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.js create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.png create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment-members.html create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html create mode 100644 classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.js create mode 100644 classtetragono_1_1utility_1_1SeedDiffer-members.html create mode 100644 classtetragono_1_1utility_1_1SeedDiffer.html create mode 100644 classtetragono_1_1utility_1_1SeedDiffer.js create mode 100644 classtetragono_1_1utility_1_1SignalHandler-members.html create mode 100644 classtetragono_1_1utility_1_1SignalHandler.html create mode 100644 classtetragono_1_1utility_1_1SignalHandler.js create mode 100644 clear__symmetry_8hpp.html create mode 100644 clear__symmetry_8hpp.js create mode 100644 clear__symmetry_8hpp_source.html create mode 100644 closed.png create mode 100644 common__variable_8hpp.html create mode 100644 common__variable_8hpp.js create mode 100644 common__variable_8hpp_source.html create mode 100644 conjugate_8hpp.html create mode 100644 conjugate_8hpp.js create mode 100644 conjugate_8hpp_source.html create mode 100644 const__integral_8hpp.html create mode 100644 const__integral_8hpp.js create mode 100644 const__integral_8hpp_source.html create mode 100644 contract_8hpp.html create mode 100644 contract_8hpp.js create mode 100644 contract_8hpp_source.html create mode 100644 core_8hpp.html create mode 100644 core_8hpp.js create mode 100644 core_8hpp_source.html create mode 100644 dir_1ac0d2e859119d1a816ab91accc8f3bd.html create mode 100644 dir_1bb041b373cba7fea1f94fe0a21b12cb.html create mode 100644 dir_2aa3e1e3445b52e6089c31406cc8058e.html create mode 100644 dir_2aa3e1e3445b52e6089c31406cc8058e.js create mode 100644 dir_32d6834a61cf7e3eb1dc36108a8ff177.html create mode 100644 dir_32d6834a61cf7e3eb1dc36108a8ff177.js create mode 100644 dir_3e2ca712ed33b4acc8f5e703e916d56d.html create mode 100644 dir_b160beeb2b43916eb0814d3fadcb9e8e.html create mode 100644 dir_bba2162289eb2d74249bf9838ef29818.html create mode 100644 dir_c11eeef15dfae30af60e807fe15492ec.html create mode 100644 dir_c11eeef15dfae30af60e807fe15492ec.js create mode 100644 dir_d03a70d343a54e863776fceb3813cfee.html create mode 100644 dir_d1f80ff82539b6697abb4a4794b81257.html create mode 100644 dir_d1f80ff82539b6697abb4a4794b81257.js create mode 100644 dir_d44c64559bbebec7f509842c48db8b23.html create mode 100644 dir_d44c64559bbebec7f509842c48db8b23.js create mode 100644 dir_d59b46738c7f078653cd0d36aa541791.html create mode 100644 dir_d59b46738c7f078653cd0d36aa541791.js create mode 100644 dir_f08b25de5750f3bb9e473212d11d084d.html create mode 100644 dir_f327081aebde40e94b3c9aef15c7c41d.html create mode 100644 doc.png create mode 100644 doxygen.css create mode 100644 doxygen.svg create mode 100644 dynsections.js create mode 100644 edge_8hpp.html create mode 100644 edge_8hpp.js create mode 100644 edge_8hpp_source.html create mode 100644 edge__operator_8hpp.html create mode 100644 edge__operator_8hpp.js create mode 100644 edge__operator_8hpp_source.html create mode 100644 exponential_8hpp.html create mode 100644 exponential_8hpp.js create mode 100644 exponential_8hpp_source.html create mode 100644 files.html create mode 100644 files_dup.js create mode 100644 folderclosed.png create mode 100644 folderopen.png create mode 100644 functions.html create mode 100644 functions_func.html create mode 100644 hierarchy.html create mode 100644 hierarchy.js create mode 100644 identity_8hpp.html create mode 100644 identity_8hpp.js create mode 100644 identity_8hpp_source.html create mode 100644 index.html create mode 100644 io_8hpp.html create mode 100644 io_8hpp.js create mode 100644 io_8hpp_source.html create mode 100644 jquery.js create mode 100644 menu.js create mode 100644 menudata.js create mode 100644 mpi_8hpp.html create mode 100644 mpi_8hpp.js create mode 100644 mpi_8hpp_source.html create mode 100644 multidimension__span_8hpp.html create mode 100644 multidimension__span_8hpp.js create mode 100644 multidimension__span_8hpp_source.html create mode 100644 name_8hpp.html create mode 100644 name_8hpp.js create mode 100644 name_8hpp_source.html create mode 100644 namespaceTAT.html create mode 100644 namespaceTAT.js create mode 100644 namespacemembers.html create mode 100644 namespacemembers_func.html create mode 100644 namespacemembers_type.html create mode 100644 namespacemembers_vars.html create mode 100644 namespaces.html create mode 100644 namespaces_dup.js create mode 100644 nav_f.png create mode 100644 nav_g.png create mode 100644 nav_h.png create mode 100644 navtree.css create mode 100644 navtree.js create mode 100644 navtreedata.js create mode 100644 navtreeindex0.js create mode 100644 navtreeindex1.js create mode 100644 navtreeindex2.js create mode 100644 navtreeindex3.js create mode 100644 navtreeindex4.js create mode 100644 navtreeindex5.js create mode 100644 navtreeindex6.js create mode 100644 open.png create mode 100644 qr_8hpp.html create mode 100644 qr_8hpp.js create mode 100644 qr_8hpp_source.html create mode 100644 resize.js create mode 100644 scalar_8hpp.html create mode 100644 scalar_8hpp.js create mode 100644 scalar_8hpp_source.html create mode 100644 search/all_0.html create mode 100644 search/all_0.js create mode 100644 search/all_1.html create mode 100644 search/all_1.js create mode 100644 search/all_10.html create mode 100644 search/all_10.js create mode 100644 search/all_11.html create mode 100644 search/all_11.js create mode 100644 search/all_12.html create mode 100644 search/all_12.js create mode 100644 search/all_13.html create mode 100644 search/all_13.js create mode 100644 search/all_14.html create mode 100644 search/all_14.js create mode 100644 search/all_15.html create mode 100644 search/all_15.js create mode 100644 search/all_16.html create mode 100644 search/all_16.js create mode 100644 search/all_2.html create mode 100644 search/all_2.js create mode 100644 search/all_3.html create mode 100644 search/all_3.js create mode 100644 search/all_4.html create mode 100644 search/all_4.js create mode 100644 search/all_5.html create mode 100644 search/all_5.js create mode 100644 search/all_6.html create mode 100644 search/all_6.js create mode 100644 search/all_7.html create mode 100644 search/all_7.js create mode 100644 search/all_8.html create mode 100644 search/all_8.js create mode 100644 search/all_9.html create mode 100644 search/all_9.js create mode 100644 search/all_a.html create mode 100644 search/all_a.js create mode 100644 search/all_b.html create mode 100644 search/all_b.js create mode 100644 search/all_c.html create mode 100644 search/all_c.js create mode 100644 search/all_d.html create mode 100644 search/all_d.js create mode 100644 search/all_e.html create mode 100644 search/all_e.js create mode 100644 search/all_f.html create mode 100644 search/all_f.js create mode 100644 search/classes_0.html create mode 100644 search/classes_0.js create mode 100644 search/classes_1.html create mode 100644 search/classes_1.js create mode 100644 search/classes_2.html create mode 100644 search/classes_2.js create mode 100644 search/classes_3.html create mode 100644 search/classes_3.js create mode 100644 search/classes_4.html create mode 100644 search/classes_4.js create mode 100644 search/classes_5.html create mode 100644 search/classes_5.js create mode 100644 search/classes_6.html create mode 100644 search/classes_6.js create mode 100644 search/classes_7.html create mode 100644 search/classes_7.js create mode 100644 search/classes_8.html create mode 100644 search/classes_8.js create mode 100644 search/classes_9.html create mode 100644 search/classes_9.js create mode 100644 search/classes_a.html create mode 100644 search/classes_a.js create mode 100644 search/classes_b.html create mode 100644 search/classes_b.js create mode 100644 search/classes_c.html create mode 100644 search/classes_c.js create mode 100644 search/classes_d.html create mode 100644 search/classes_d.js create mode 100644 search/classes_e.html create mode 100644 search/classes_e.js create mode 100644 search/close.svg create mode 100644 search/files_0.html create mode 100644 search/files_0.js create mode 100644 search/files_1.html create mode 100644 search/files_1.js create mode 100644 search/files_2.html create mode 100644 search/files_2.js create mode 100644 search/files_3.html create mode 100644 search/files_3.js create mode 100644 search/files_4.html create mode 100644 search/files_4.js create mode 100644 search/files_5.html create mode 100644 search/files_5.js create mode 100644 search/files_6.html create mode 100644 search/files_6.js create mode 100644 search/files_7.html create mode 100644 search/files_7.js create mode 100644 search/files_8.html create mode 100644 search/files_8.js create mode 100644 search/functions_0.html create mode 100644 search/functions_0.js create mode 100644 search/functions_1.html create mode 100644 search/functions_1.js create mode 100644 search/functions_10.html create mode 100644 search/functions_10.js create mode 100644 search/functions_11.html create mode 100644 search/functions_11.js create mode 100644 search/functions_12.html create mode 100644 search/functions_12.js create mode 100644 search/functions_13.html create mode 100644 search/functions_13.js create mode 100644 search/functions_14.html create mode 100644 search/functions_14.js create mode 100644 search/functions_15.html create mode 100644 search/functions_15.js create mode 100644 search/functions_2.html create mode 100644 search/functions_2.js create mode 100644 search/functions_3.html create mode 100644 search/functions_3.js create mode 100644 search/functions_4.html create mode 100644 search/functions_4.js create mode 100644 search/functions_5.html create mode 100644 search/functions_5.js create mode 100644 search/functions_6.html create mode 100644 search/functions_6.js create mode 100644 search/functions_7.html create mode 100644 search/functions_7.js create mode 100644 search/functions_8.html create mode 100644 search/functions_8.js create mode 100644 search/functions_9.html create mode 100644 search/functions_9.js create mode 100644 search/functions_a.html create mode 100644 search/functions_a.js create mode 100644 search/functions_b.html create mode 100644 search/functions_b.js create mode 100644 search/functions_c.html create mode 100644 search/functions_c.js create mode 100644 search/functions_d.html create mode 100644 search/functions_d.js create mode 100644 search/functions_e.html create mode 100644 search/functions_e.js create mode 100644 search/functions_f.html create mode 100644 search/functions_f.js create mode 100644 search/mag_sel.svg create mode 100644 search/namespaces_0.html create mode 100644 search/namespaces_0.js create mode 100644 search/nomatches.html create mode 100644 search/search.css create mode 100644 search/search.js create mode 100644 search/search_l.png create mode 100644 search/search_m.png create mode 100644 search/search_r.png create mode 100644 search/searchdata.js create mode 100644 search/typedefs_0.html create mode 100644 search/typedefs_0.js create mode 100644 search/typedefs_1.html create mode 100644 search/typedefs_1.js create mode 100644 search/typedefs_2.html create mode 100644 search/typedefs_2.js create mode 100644 search/typedefs_3.html create mode 100644 search/typedefs_3.js create mode 100644 search/typedefs_4.html create mode 100644 search/typedefs_4.js create mode 100644 search/typedefs_5.html create mode 100644 search/typedefs_5.js create mode 100644 search/typedefs_6.html create mode 100644 search/typedefs_6.js create mode 100644 search/typedefs_7.html create mode 100644 search/typedefs_7.js create mode 100644 search/variables_0.html create mode 100644 search/variables_0.js create mode 100644 search/variables_1.html create mode 100644 search/variables_1.js create mode 100644 search/variables_2.html create mode 100644 search/variables_2.js create mode 100644 shared__ptr_8hpp.html create mode 100644 shared__ptr_8hpp.js create mode 100644 shared__ptr_8hpp_source.html create mode 100644 shrink__and__expand_8hpp.html create mode 100644 shrink__and__expand_8hpp.js create mode 100644 shrink__and__expand_8hpp_source.html create mode 100644 split__and__merge_8hpp.html create mode 100644 split__and__merge_8hpp.js create mode 100644 split__and__merge_8hpp_source.html create mode 100644 splitbar.png create mode 100644 structTAT_1_1Cut-members.html create mode 100644 structTAT_1_1Cut.html create mode 100644 structTAT_1_1Cut.js create mode 100644 structTAT_1_1InternalName-members.html create mode 100644 structTAT_1_1InternalName.html create mode 100644 structTAT_1_1InternalName.js create mode 100644 structTAT_1_1NameTraits.html create mode 100644 structTAT_1_1NameTraits_3_01FastName_01_4-members.html create mode 100644 structTAT_1_1NameTraits_3_01FastName_01_4.html create mode 100644 structTAT_1_1NameTraits_3_01FastName_01_4.js create mode 100644 structTAT_1_1NameTraits_3_01std_1_1string_01_4-members.html create mode 100644 structTAT_1_1NameTraits_3_01std_1_1string_01_4.html create mode 100644 structTAT_1_1NameTraits_3_01std_1_1string_01_4.js create mode 100644 structTAT_1_1NoCut.html create mode 100644 structTAT_1_1RelativeCut-members.html create mode 100644 structTAT_1_1RelativeCut.html create mode 100644 structTAT_1_1RelativeCut.js create mode 100644 structTAT_1_1RemainCut-members.html create mode 100644 structTAT_1_1RemainCut.html create mode 100644 structTAT_1_1RemainCut.js create mode 100644 structTAT_1_1Symmetry-members.html create mode 100644 structTAT_1_1Symmetry.html create mode 100644 structTAT_1_1Symmetry.js create mode 100644 structTAT_1_1Symmetry.png create mode 100644 structTAT_1_1TensorShape-members.html create mode 100644 structTAT_1_1TensorShape.html create mode 100644 structTAT_1_1TensorShape.js create mode 100644 structTAT_1_1Tensor_1_1qr__result-members.html create mode 100644 structTAT_1_1Tensor_1_1qr__result.html create mode 100644 structTAT_1_1Tensor_1_1qr__result.js create mode 100644 structTAT_1_1Tensor_1_1svd__result-members.html create mode 100644 structTAT_1_1Tensor_1_1svd__result.html create mode 100644 structTAT_1_1Tensor_1_1svd__result.js create mode 100644 structTAT_1_1UnixColorCode-members.html create mode 100644 structTAT_1_1UnixColorCode.html create mode 100644 structTAT_1_1UnixColorCode.js create mode 100644 structTAT_1_1edge__bose__arrow__t-members.html create mode 100644 structTAT_1_1edge__bose__arrow__t.html create mode 100644 structTAT_1_1edge__bose__arrow__t.js create mode 100644 structTAT_1_1edge__fermi__arrow__t-members.html create mode 100644 structTAT_1_1edge__fermi__arrow__t.html create mode 100644 structTAT_1_1edge__fermi__arrow__t.js create mode 100644 structTAT_1_1empty__list-members.html create mode 100644 structTAT_1_1empty__list.html create mode 100644 structTAT_1_1empty__list.js create mode 100644 structTAT_1_1empty__list.png create mode 100644 structTAT_1_1fermi.html create mode 100644 structTAT_1_1mdspan_1_1iterator__general-members.html create mode 100644 structTAT_1_1mdspan_1_1iterator__general.html create mode 100644 structTAT_1_1mdspan_1_1iterator__general.js create mode 100644 structTAT_1_1mpi__one__output__stream-members.html create mode 100644 structTAT_1_1mpi__one__output__stream.html create mode 100644 structTAT_1_1mpi__one__output__stream.js create mode 100644 structTAT_1_1mpi__rank__output__stream-members.html create mode 100644 structTAT_1_1mpi__rank__output__stream.html create mode 100644 structTAT_1_1mpi__rank__output__stream.js create mode 100644 structTAT_1_1mpi__t-members.html create mode 100644 structTAT_1_1mpi__t.html create mode 100644 structTAT_1_1mpi__t.js create mode 100644 structTAT_1_1overloaded.html create mode 100644 structTAT_1_1overloaded.png create mode 100644 structTAT_1_1remove__cvref-members.html create mode 100644 structTAT_1_1remove__cvref.html create mode 100644 structTAT_1_1remove__cvref.js create mode 100644 structTAT_1_1scope__resource-members.html create mode 100644 structTAT_1_1scope__resource.html create mode 100644 structTAT_1_1scope__resource.js create mode 100644 structTAT_1_1timer-members.html create mode 100644 structTAT_1_1timer.html create mode 100644 structTAT_1_1timer.js create mode 100644 structTAT_1_1timer_1_1timer__guard.html create mode 100644 structTAT_1_1type__identity-members.html create mode 100644 structTAT_1_1type__identity.html create mode 100644 structTAT_1_1type__identity.js create mode 100644 structstd_1_1hash_3_01TAT_1_1FastName_01_4-members.html create mode 100644 structstd_1_1hash_3_01TAT_1_1FastName_01_4.html create mode 100644 structstd_1_1hash_3_01TAT_1_1FastName_01_4.js create mode 100644 structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4-members.html create mode 100644 structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html create mode 100644 structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.js create mode 100644 structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4-members.html create mode 100644 structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html create mode 100644 structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.js create mode 100644 svd_8hpp.html create mode 100644 svd_8hpp.js create mode 100644 svd_8hpp_source.html create mode 100644 symmetry_8hpp.html create mode 100644 symmetry_8hpp.js create mode 100644 symmetry_8hpp_source.html create mode 100644 sync_off.png create mode 100644 sync_on.png create mode 100644 tab_a.png create mode 100644 tab_b.png create mode 100644 tab_h.png create mode 100644 tab_s.png create mode 100644 tabs.css create mode 100644 tensor_8hpp.html create mode 100644 tensor_8hpp.js create mode 100644 tensor_8hpp_source.html create mode 100644 timer_8hpp.html create mode 100644 timer_8hpp.js create mode 100644 timer_8hpp_source.html create mode 100644 trace_8hpp.html create mode 100644 trace_8hpp.js create mode 100644 trace_8hpp_source.html diff --git a/TAT_8hpp.html b/TAT_8hpp.html new file mode 100644 index 000000000..0157542ed --- /dev/null +++ b/TAT_8hpp.html @@ -0,0 +1,127 @@ + + + + + + + +TAT: include/TAT/TAT.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+ +

Go to the source code of this file.

+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/TAT_8hpp.js b/TAT_8hpp.js new file mode 100644 index 000000000..904e25a63 --- /dev/null +++ b/TAT_8hpp.js @@ -0,0 +1,4 @@ +var TAT_8hpp = +[ + [ "TAT_HPP", "TAT_8hpp.html#ad08c9547feb2b6cc6adc64d1ede94a04", null ] +]; \ No newline at end of file diff --git a/TAT_8hpp_source.html b/TAT_8hpp_source.html new file mode 100644 index 000000000..860e14a16 --- /dev/null +++ b/TAT_8hpp_source.html @@ -0,0 +1,147 @@ + + + + + + + +TAT: include/TAT/TAT.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_HPP
+
22 #define TAT_HPP
+
23 
+
24 #ifndef __cplusplus
+
25 #error only work for c++
+
26 #endif
+
27 
+
28 #if __cplusplus < 201703L
+
29 #error require c++17 or later
+
30 #endif
+
31 
+
32 #include "structure/tensor.hpp"
+
33 
+
34 #include "miscellaneous/io.hpp"
+
35 #include "miscellaneous/mpi.hpp"
+
36 #include "miscellaneous/scalar.hpp"
+
37 
+ +
39 #include "implement/conjugate.hpp"
+
40 #include "implement/contract.hpp"
+ + +
43 #include "implement/identity.hpp"
+
44 #include "implement/qr.hpp"
+ + +
47 #include "implement/svd.hpp"
+
48 #include "implement/trace.hpp"
+
49 
+
50 #endif
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2020-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2020-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2020-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2020-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
+
+ + + + diff --git a/_formulas.tex b/_formulas.tex new file mode 100644 index 000000000..c329033df --- /dev/null +++ b/_formulas.tex @@ -0,0 +1,15 @@ +\documentclass{article} +\usepackage{ifthen} +\usepackage{epsfig} +\usepackage[utf8]{inputenc} +\usepackage{newunicodechar} + \newunicodechar{⁻}{${}^{-}$}% Superscript minus + \newunicodechar{²}{${}^{2}$}% Superscript two + \newunicodechar{³}{${}^{3}$}% Superscript three + +\pagestyle{empty} +\begin{document} +$a^\dagger b^\dagger$ +\pagebreak + +\end{document} diff --git a/allocator_8hpp.html b/allocator_8hpp.html new file mode 100644 index 000000000..c6622e1bb --- /dev/null +++ b/allocator_8hpp.html @@ -0,0 +1,235 @@ + + + + + + + +TAT: include/TAT/utility/allocator.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
allocator.hpp File Reference
+
+
+ +

Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <cstddef>
+#include <forward_list>
+#include <memory>
+#include <list>
+#include <map>
+#include <set>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  TAT::scope_resource
 
+ + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+template<typename T >
using TAT::no_initialize::vector = std::vector< T, detail::no_initialize_allocator< T > >
 
template<typename T >
using TAT::no_initialize::pmr::vector = std::vector< T, detail::no_initialize_polymorphic_allocator< T > >
 No initialize version of pmr vector used in tensor content. More...
 
+template<typename T >
using TAT::pmr::vector = std::vector< T, detail::polymorphic_allocator< T > >
 
+template<typename T >
using TAT::pmr::list = std::list< T, detail::polymorphic_allocator< T > >
 
+template<typename Key , typename T , typename Compare = std::less<Key>>
using TAT::pmr::map = std::map< Key, T, Compare, detail::polymorphic_allocator< std::pair< const Key, T > >>
 
+template<class Key , class Compare = std::less<Key>>
using TAT::pmr::set = std::set< Key, Compare, detail::polymorphic_allocator< Key > >
 
+template<typename Key , typename T , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
using TAT::pmr::unordered_map = std::unordered_map< Key, T, Hash, KeyEqual, detail::polymorphic_allocator< std::pair< const Key, T > >>
 
+template<class Key , class Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
using TAT::pmr::unordered_set = std::unordered_set< Key, Hash, KeyEqual, detail::polymorphic_allocator< Key > >
 
+ + + + + + + + + + + + + + + + + + + + + +

+Functions

+bool TAT::detail::operator== (const memory_resource &a, const memory_resource &b)
 
+bool TAT::detail::operator!= (const memory_resource &a, const memory_resource &b)
 
+memory_resource * TAT::detail::get_default_resource ()
 
+memory_resource * TAT::detail::set_default_resource (memory_resource *input)
 
+template<typename T1 , typename T2 >
bool TAT::detail::operator== (const polymorphic_allocator< T1 > &lhs, const polymorphic_allocator< T2 > &rhs)
 
+template<typename T1 , typename T2 >
bool TAT::detail::operator!= (const polymorphic_allocator< T1 > &lhs, const polymorphic_allocator< T2 > &rhs)
 
+template<typename T1 , typename T2 >
bool TAT::detail::operator== (const no_initialize_polymorphic_allocator< T1 > &lhs, const no_initialize_polymorphic_allocator< T2 > &rhs)
 
+template<typename T1 , typename T2 >
bool TAT::detail::operator!= (const no_initialize_polymorphic_allocator< T1 > &lhs, const no_initialize_polymorphic_allocator< T2 > &rhs)
 
+ + + + + + + +

+Variables

+new_delete_resource TAT::detail::new_delete_resource_object
 
+memory_resource * TAT::detail::default_resource = &new_delete_resource_object
 
+constexpr std::size_t TAT::default_buffer_size = 1 << 20
 
+

Detailed Description

+

Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+

Typedef Documentation

+ +

◆ vector

+ +
+
+
+template<typename T >
+ + + + +
using TAT::no_initialize::pmr::vector = typedef std::vector<T, detail::no_initialize_polymorphic_allocator<T> >
+
+ +

No initialize version of pmr vector used in tensor content.

+ +
+
+
+
+ + + + diff --git a/allocator_8hpp.js b/allocator_8hpp.js new file mode 100644 index 000000000..0530614f3 --- /dev/null +++ b/allocator_8hpp.js @@ -0,0 +1,24 @@ +var allocator_8hpp = +[ + [ "scope_resource", "structTAT_1_1scope__resource.html", "structTAT_1_1scope__resource" ], + [ "TAT_ALLOCATOR_HPP", "allocator_8hpp.html#aaffee48048c8c8e3c4b1ba2267dcc835", null ], + [ "list", "allocator_8hpp.html#acfd524216b1a1c4d39fb2f20abe86089", null ], + [ "map", "allocator_8hpp.html#ac44ff6c3e5878fcc12eeb8d433942960", null ], + [ "set", "allocator_8hpp.html#a42ada3c2809ae76ec9b46273460aa1cc", null ], + [ "unordered_map", "allocator_8hpp.html#aa9106e06fd12adc94e61d7f324472260", null ], + [ "unordered_set", "allocator_8hpp.html#afc76aeb1587c2b4692b67c0768048195", null ], + [ "vector", "allocator_8hpp.html#a8067213d4c0bd9223e68bd841f7a3883", null ], + [ "vector", "allocator_8hpp.html#a156f923af61f5648f2bc1852e50d7852", null ], + [ "vector", "allocator_8hpp.html#a3b0d7e1403e14bf93b80fcb10d886fb8", null ], + [ "get_default_resource", "allocator_8hpp.html#a3afaf0f25c123ad1dfbdcf5796d653bc", null ], + [ "operator!=", "allocator_8hpp.html#a74c237f1506d98f4a57321efc290c8bf", null ], + [ "operator!=", "allocator_8hpp.html#ac9ec13e49adab3334c04444b293278a4", null ], + [ "operator!=", "allocator_8hpp.html#a5c7e4a497d12887402f34f6b83196ec2", null ], + [ "operator==", "allocator_8hpp.html#a40c40965f136826e7492fb97e8184326", null ], + [ "operator==", "allocator_8hpp.html#a4ba1ab28b9bc9ceead3f990236a62f33", null ], + [ "operator==", "allocator_8hpp.html#af463dd2142a80660f292035420272b60", null ], + [ "set_default_resource", "allocator_8hpp.html#aca37c3ba26f16963a6fcf64684878fc3", null ], + [ "default_buffer_size", "allocator_8hpp.html#a4b6b207de36a27793b710ea1208d8b0e", null ], + [ "default_resource", "allocator_8hpp.html#acef22560451755ab6487271f8559c9d4", null ], + [ "new_delete_resource_object", "allocator_8hpp.html#a418d35e2cc9765f29641cafc4ea4ba38", null ] +]; \ No newline at end of file diff --git a/allocator_8hpp_source.html b/allocator_8hpp_source.html new file mode 100644 index 000000000..35c7a85e5 --- /dev/null +++ b/allocator_8hpp_source.html @@ -0,0 +1,430 @@ + + + + + + + +TAT: include/TAT/utility/allocator.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
allocator.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_ALLOCATOR_HPP
+
22 #define TAT_ALLOCATOR_HPP
+
23 
+
24 // gcc 7 and llvm does not support memory_resource so implement by myself
+
25 
+
26 #include <cstddef>
+
27 #include <forward_list>
+
28 #include <memory>
+
29 
+
30 namespace TAT {
+
31  namespace detail {
+
32  struct memory_resource {
+
33  virtual ~memory_resource() { }
+
34 
+
35  void* allocate(std::size_t bytes, std::size_t alignment = alignof(std::max_align_t)) {
+
36  return do_allocate(bytes, alignment);
+
37  }
+
38 
+
39  void deallocate(void* p, std::size_t bytes, std::size_t alignment = alignof(std::max_align_t)) {
+
40  do_deallocate(p, bytes, alignment);
+
41  }
+
42 
+
43  bool is_equal(const memory_resource& other) const {
+
44  return do_is_equal(other);
+
45  }
+
46 
+
47  virtual void* do_allocate(std::size_t bytes, std::size_t alignment) = 0;
+
48  virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) = 0;
+
49  virtual bool do_is_equal(const memory_resource& other) const = 0;
+
50  };
+
51  inline bool operator==(const memory_resource& a, const memory_resource& b) {
+
52  return &a == &b || a.is_equal(b);
+
53  }
+
54  inline bool operator!=(const memory_resource& a, const memory_resource& b) {
+
55  return !(a == b);
+
56  }
+
57 
+
58  // This is different with std::pmr, it is thread unsafe
+
59  inline memory_resource* get_default_resource();
+
60  inline memory_resource* set_default_resource(memory_resource* input);
+
61 
+
62  struct new_delete_resource : memory_resource {
+
63  void* do_allocate(std::size_t bytes, std::size_t) override {
+
64  return new std::byte[bytes];
+
65  }
+
66  virtual void do_deallocate(void* p, std::size_t, std::size_t) override {
+
67  delete[] ((std::byte*)p);
+
68  }
+
69  virtual bool do_is_equal(const memory_resource& other) const override {
+
70  return this == &other;
+
71  }
+
72  };
+
73 
+
74  struct buffer_t {
+
75  void* buffer;
+
76  std::size_t size;
+
77  };
+
78 
+
79  // copy from boost
+
80  struct monotonic_buffer_resource : memory_resource {
+
81  std::forward_list<buffer_t> m_buffer_list;
+
82  memory_resource* m_upstream;
+
83  void* m_current_buffer;
+
84  std::size_t m_current_buffer_size;
+
85  std::size_t m_next_buffer_size;
+
86  void* const m_initial_buffer;
+
87  std::size_t const m_initial_buffer_size;
+
88 
+
89  static const std::size_t default_next_buffer_size = 32u * sizeof(void*);
+
90 
+
91  monotonic_buffer_resource(void* buffer, std::size_t buffer_size) :
+
92  monotonic_buffer_resource(buffer, buffer_size, get_default_resource()) { }
+
93  monotonic_buffer_resource(void* buffer, std::size_t buffer_size, memory_resource* upstream) :
+
94  m_buffer_list(),
+
95  m_upstream(upstream),
+
96  m_current_buffer(buffer),
+
97  m_current_buffer_size(buffer_size),
+
98  m_next_buffer_size(default_next_buffer_size),
+
99  m_initial_buffer(buffer),
+
100  m_initial_buffer_size(buffer_size) {
+
101  increase_next_size_to(buffer_size);
+
102  }
+
103  monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;
+
104 
+
105  void increase_next_size() {
+
106  m_next_buffer_size = (std::size_t(-1) / 2 < m_next_buffer_size) ? std::size_t(-1) : m_next_buffer_size * 2;
+
107  }
+
108  void increase_next_size_to(std::size_t minimum_size) {
+
109  while (m_next_buffer_size < minimum_size) {
+
110  increase_next_size();
+
111  }
+
112  }
+
113 
+
114  memory_resource* upstream_resource() const {
+
115  return m_upstream;
+
116  }
+
117 
+
118  ~monotonic_buffer_resource() override {
+
119  release();
+
120  }
+
121 
+
122  void release() {
+
123  for (auto [buffer, size] : m_buffer_list) {
+
124  m_upstream->deallocate(buffer, size, alignof(std::max_align_t));
+
125  }
+
126  m_buffer_list.clear();
+
127  m_current_buffer = m_initial_buffer;
+
128  m_current_buffer_size = m_initial_buffer_size;
+
129  m_next_buffer_size = default_next_buffer_size;
+
130  }
+
131 
+
132  std::size_t remaining_storage(std::size_t alignment, std::size_t& aligner) {
+
133  const std::size_t up_alignment_minus1 = alignment - 1u;
+
134  const std::size_t up_alignment_mask = ~up_alignment_minus1;
+
135  const std::size_t up_addr = std::size_t(m_current_buffer);
+
136  const std::size_t up_aligned_addr = (up_addr + up_alignment_minus1) & up_alignment_mask;
+
137  aligner = std::size_t(up_aligned_addr - up_addr);
+
138  return m_current_buffer_size <= aligner ? 0u : m_current_buffer_size - aligner;
+
139  }
+
140 
+
141  void* allocate_from_current(std::size_t aligner, std::size_t bytes) {
+
142  std::byte* result = (std::byte*)m_current_buffer + aligner;
+
143  m_current_buffer = result + bytes;
+
144  m_current_buffer_size -= aligner + bytes;
+
145  return result;
+
146  }
+
147 
+
148  void* do_allocate(std::size_t bytes, std::size_t alignment) override {
+
149  std::size_t aligner = 0u;
+
150  if (remaining_storage(alignment, aligner) < bytes) {
+
151  aligner = 0u;
+
152  increase_next_size_to(bytes);
+
153  m_current_buffer = m_upstream->allocate(m_next_buffer_size, alignof(std::max_align_t));
+
154  m_current_buffer_size = m_next_buffer_size;
+
155  m_buffer_list.push_front({m_current_buffer, m_current_buffer_size});
+
156  increase_next_size();
+
157  }
+
158  return allocate_from_current(aligner, bytes);
+
159  }
+
160 
+
161  virtual void do_deallocate(void*, std::size_t, std::size_t) override { }
+
162 
+
163  virtual bool do_is_equal(const memory_resource& other) const override {
+
164  return this == &other;
+
165  }
+
166  };
+
167 
+
168  inline new_delete_resource new_delete_resource_object;
+
169  inline memory_resource* default_resource = &new_delete_resource_object;
+
170  inline memory_resource* get_default_resource() {
+
171  return default_resource;
+
172  }
+
173  inline memory_resource* set_default_resource(memory_resource* input) {
+
174  auto output = default_resource;
+
175  default_resource = input;
+
176  return output;
+
177  }
+
178 
+
179  // Similar to std::pmr::polymorphic_allocator
+
180  // But default source(get_default_resource) is thread unsafe
+
181  template<typename T>
+
182  struct polymorphic_allocator {
+
183  memory_resource* m_resource;
+
184 
+
185  using value_type = T;
+
186  polymorphic_allocator() : polymorphic_allocator(get_default_resource()) { }
+
187  polymorphic_allocator(const polymorphic_allocator& other) = default;
+
188  template<typename U>
+
189  polymorphic_allocator(const polymorphic_allocator<U>& other) : polymorphic_allocator(other.resource()) { }
+
190  polymorphic_allocator(memory_resource* r) : m_resource(r) { }
+
191 
+
192  polymorphic_allocator<T>& operator=(const polymorphic_allocator<T>&) = delete;
+
193 
+
194  T* allocate(std::size_t n) {
+
195  return static_cast<T*>(resource()->allocate(n * sizeof(T), alignof(T)));
+
196  }
+
197 
+
198  void deallocate(T* p, std::size_t n) {
+
199  resource()->deallocate(p, n * sizeof(T), alignof(T));
+
200  }
+
201 
+
202  template<class U, class... Args>
+
203  void construct(U* p, Args&&... args) {
+
204  new (p) U(std::forward<Args>(args)...);
+
205  }
+
206 
+
207  template<class U>
+
208  void destroy(U* p) {
+
209  p->~U();
+
210  }
+
211 
+
212  polymorphic_allocator<T> select_on_container_copy_construction() const {
+
213  return polymorphic_allocator<T>();
+
214  }
+
215 
+
216  memory_resource* resource() const {
+
217  return m_resource;
+
218  }
+
219  };
+
220 
+
221  template<typename T1, typename T2>
+
222  bool operator==(const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs) {
+
223  return *lhs.resource() == *rhs.resource();
+
224  }
+
225  template<typename T1, typename T2>
+
226  bool operator!=(const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs) {
+
227  return !(lhs == rhs);
+
228  }
+
229 
+
230  template<typename T>
+
231  struct no_initialize_polymorphic_allocator : polymorphic_allocator<T> {
+
232  using polymorphic_allocator<T>::polymorphic_allocator;
+
233 
+
234  no_initialize_polymorphic_allocator(const no_initialize_polymorphic_allocator& other) = default;
+
235  template<typename U>
+
236  no_initialize_polymorphic_allocator(const no_initialize_polymorphic_allocator<U>& other) :
+
237  no_initialize_polymorphic_allocator(other.resource()) { }
+
238 
+
239  no_initialize_polymorphic_allocator<T> select_on_container_copy_construction() const {
+
240  return no_initialize_polymorphic_allocator<T>();
+
241  }
+
242 
+
243  template<typename U, typename... Args>
+
244  void construct([[maybe_unused]] U* p, Args&&... args) {
+
245  if constexpr (!((sizeof...(args) == 0) && (std::is_trivially_destructible_v<T>))) {
+
246  new (p) U(std::forward<Args>(args)...);
+
247  }
+
248  }
+
249  };
+
250 
+
251  template<typename T1, typename T2>
+
252  bool operator==(const no_initialize_polymorphic_allocator<T1>& lhs, const no_initialize_polymorphic_allocator<T2>& rhs) {
+
253  return *lhs.resource() == *rhs.resource();
+
254  }
+
255  template<typename T1, typename T2>
+
256  bool operator!=(const no_initialize_polymorphic_allocator<T1>& lhs, const no_initialize_polymorphic_allocator<T2>& rhs) {
+
257  return !(lhs == rhs);
+
258  }
+
259 
+
265  template<typename T>
+
266  struct no_initialize_allocator : std::allocator<T> {
+
267  using std::allocator<T>::allocator;
+
268 
+
269  no_initialize_allocator(const no_initialize_allocator& other) = default;
+
270  template<typename U>
+
271  no_initialize_allocator(const no_initialize_allocator<U>& other) : no_initialize_allocator() { }
+
272 
+
273  no_initialize_allocator<T> select_on_container_copy_construction() const {
+
274  return no_initialize_allocator<T>();
+
275  }
+
276 
+
277  // It is useless, but base class has it so derived class must have it.
+
278  template<typename U>
+
279  struct rebind {
+
280  using other = no_initialize_allocator<U>;
+
281  };
+
282 
+
283  template<typename U, typename... Args>
+
284  void construct([[maybe_unused]] U* p, Args&&... args) {
+
285  if constexpr (!((sizeof...(args) == 0) && (std::is_trivially_destructible_v<T>))) {
+
286  new (p) U(std::forward<Args>(args)...);
+
287  }
+
288  }
+
289  };
+
290  } // namespace detail
+
291 
+
292  constexpr std::size_t default_buffer_size = 1 << 20;
+
293 
+
294  // never use stack, always use heap
+
295  struct scope_resource {
+
296  std::byte* buffer;
+
297  detail::monotonic_buffer_resource resource;
+
298  detail::memory_resource* upstream;
+
299  scope_resource(std::size_t size = default_buffer_size) :
+
300  buffer(new std::byte[size]),
+
301  resource(buffer, size * sizeof(std::byte)),
+
302  upstream(set_default_resource(&resource)) { }
+
303  ~scope_resource() {
+
304  set_default_resource(upstream);
+
305  delete[] buffer;
+
306  }
+
307  };
+
308 } // namespace TAT
+
309 
+
310 #include <list>
+
311 #include <map>
+
312 #include <set>
+
313 #include <unordered_map>
+
314 #include <unordered_set>
+
315 #include <vector>
+
316 
+
317 namespace TAT {
+
318  namespace no_initialize {
+
319  template<typename T>
+
320  using vector = std::vector<T, detail::no_initialize_allocator<T>>;
+
321 
+
322  namespace pmr {
+
326  template<typename T>
+
327  using vector = std::vector<T, detail::no_initialize_polymorphic_allocator<T>>;
+
328  } // namespace pmr
+
329 
+
330  } // namespace no_initialize
+
331 
+
332  namespace pmr {
+
333  // The only difference betwen the below and std::pmr is default resource getter is thread unsafe
+
334  template<typename T>
+
335  using vector = std::vector<T, detail::polymorphic_allocator<T>>;
+
336 
+
337  template<typename T>
+
338  using list = std::list<T, detail::polymorphic_allocator<T>>;
+
339 
+
340  template<typename Key, typename T, typename Compare = std::less<Key>>
+
341  using map = std::map<Key, T, Compare, detail::polymorphic_allocator<std::pair<const Key, T>>>;
+
342 
+
343  template<class Key, class Compare = std::less<Key>>
+
344  using set = std::set<Key, Compare, detail::polymorphic_allocator<Key>>;
+
345 
+
346  template<typename Key, typename T, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
+
347  using unordered_map = std::unordered_map<Key, T, Hash, KeyEqual, detail::polymorphic_allocator<std::pair<const Key, T>>>;
+
348 
+
349  template<class Key, class Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
+
350  using unordered_set = std::unordered_set<Key, Hash, KeyEqual, detail::polymorphic_allocator<Key>>;
+
351  } // namespace pmr
+
352 } // namespace TAT
+
353 #endif
+
std::vector< T, detail::no_initialize_polymorphic_allocator< T > > vector
No initialize version of pmr vector used in tensor content.
Definition: allocator.hpp:327
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
Definition: allocator.hpp:295
+
+
+ + + + diff --git a/annotated.html b/annotated.html new file mode 100644 index 000000000..4598b757a --- /dev/null +++ b/annotated.html @@ -0,0 +1,189 @@ + + + + + + + +TAT: Class List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Nlazy
 CCopyA helper class used to copy entire lazy node graph
 CNodeLazy node type, used to build a lazy evaluation graph, the value of it may be reset and when trying to get value of it, the needed node will be calculated automatically
 NstdSTL namespace
 Chash< TAT::FastName >
 Chash< pair< Name, Name > >
 Chash< TAT::Symmetry< T... > >
 NTATTAT is A Tensor library
 CNameTraits< FastName >
 CNameTraits< std::string >
 CUnixColorCodeA type control console color
 Cmpi_one_output_streamWrapper for ostream, the stream will only output in the rank which is specified when creating
 Cmpi_rank_output_streamWrapper for ostream, the stream will output the rank which is psecified when creating
 Cmpi_tMPI handler type
 CCoreContains nearly all tensor data except edge name, include edge shape and tensor content
 Cedge_segments_t
 Cedge_bose_arrow_t
 Cedge_fermi_arrow_t
 CEdgeThe shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment
 CFastNameFastName as tensor edge name
 CInternalNameFor every Name type, some internal name is needed
 CNameTraitsName type also need input and output method
 Cfermi
 CSymmetryGeneral symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied
 CRemainCut
 CRelativeCut
 CNoCut
 CCutUsed to describle how to cut when doing svd to a tensor
 CTensorShape
 CTensorTensor type
 Cqr_resultQR result type
 Csvd_resultSVD result type
 Cscope_resource
 Cremove_cvref
 Ctype_identity
 Cempty_list
 Coverloaded
 Cmdspan
 Citerator_general
 Ctimer
 Ctimer_guard
 Ntetragono
 Nabstract_lattice
 CAbstractLatticeVirtualBondVirtual bond handler for abstract lattice
 CAbstractLatticeThe abstract lattice
 Nabstract_state
 CAbstractStatePhysicsEdgePhysics edge handler for abstract state
 CAbstractStateHamiltonianHamiltonian handler for abstract state
 CAbstractStateAbstract state, which is used to construct other type of state
 Nauxiliaries
 Ndouble_layer_auxiliaries
 CDoubleLayerAuxiliaries
 Nsingle_layer_auxiliaries
 CSingleLayerAuxiliaries
 Nthree_line_auxiliaries
 CThreeLineAuxiliaries
 Ncommon_tensor
 Ntensor_toolkit
 CFakeEdge
 Nexact_state
 CExactStateState for exact diagonalization
 Nsampling_lattice
 Nlattice
 CConfigurationConfiguration system for square sampling lattice
 CTailDictTreeA dict tree from the tail of list key
 CConfigurationPoolConfiguration pool for one sampling lattice and multiple configuration
 CSamplingLatticeSquare lattice used for sampling
 Nobserver
 CObserverHelper type for Observing the sampling lattice
 Nsampling
 CSamplingHelper type for run sampling for sampling lattice
 CSweepSamplingSweep sampling
 CErgodicSamplingErgodic sampling
 CDirectSamplingDirect sampling
 Nshell
 CConfig
 CAutoCmdMeta
 CAutoCmd
 CTetragonoCommandApp
 CTetragonoScriptApp
 Nsimple_update_lattice
 CSimpleUpdateLatticeEnvironmentEnvironment handler for simple update lattice
 CSimpleUpdateLatticeThe lattice used to do simple update
 Nutility
 CSignalHandler
 CSeedDiffer
+
+
+
+ + + + diff --git a/annotated_dup.js b/annotated_dup.js new file mode 100644 index 000000000..4ed8be03b --- /dev/null +++ b/annotated_dup.js @@ -0,0 +1,105 @@ +var annotated_dup = +[ + [ "lazy", null, [ + [ "Copy", "classlazy_1_1Copy.html", "classlazy_1_1Copy" ], + [ "Node", "classlazy_1_1Node.html", "classlazy_1_1Node" ] + ] ], + [ "std", null, [ + [ "hash< TAT::FastName >", "structstd_1_1hash_3_01TAT_1_1FastName_01_4.html", "structstd_1_1hash_3_01TAT_1_1FastName_01_4" ], + [ "hash< pair< Name, Name > >", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4" ], + [ "hash< TAT::Symmetry< T... > >", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4" ] + ] ], + [ "TAT", "namespaceTAT.html", [ + [ "NameTraits< FastName >", "structTAT_1_1NameTraits_3_01FastName_01_4.html", "structTAT_1_1NameTraits_3_01FastName_01_4" ], + [ "NameTraits< std::string >", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html", "structTAT_1_1NameTraits_3_01std_1_1string_01_4" ], + [ "UnixColorCode", "structTAT_1_1UnixColorCode.html", "structTAT_1_1UnixColorCode" ], + [ "mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html", "structTAT_1_1mpi__one__output__stream" ], + [ "mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html", "structTAT_1_1mpi__rank__output__stream" ], + [ "mpi_t", "structTAT_1_1mpi__t.html", "structTAT_1_1mpi__t" ], + [ "Core", "classTAT_1_1Core.html", "classTAT_1_1Core" ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html", "classTAT_1_1edge__segments__t" ], + [ "edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html", "structTAT_1_1edge__bose__arrow__t" ], + [ "edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html", "structTAT_1_1edge__fermi__arrow__t" ], + [ "Edge", "classTAT_1_1Edge.html", "classTAT_1_1Edge" ], + [ "FastName", "classTAT_1_1FastName.html", "classTAT_1_1FastName" ], + [ "InternalName", "structTAT_1_1InternalName.html", "structTAT_1_1InternalName" ], + [ "NameTraits", "structTAT_1_1NameTraits.html", null ], + [ "fermi", "structTAT_1_1fermi.html", null ], + [ "Symmetry", "structTAT_1_1Symmetry.html", "structTAT_1_1Symmetry" ], + [ "RemainCut", "structTAT_1_1RemainCut.html", "structTAT_1_1RemainCut" ], + [ "RelativeCut", "structTAT_1_1RelativeCut.html", "structTAT_1_1RelativeCut" ], + [ "NoCut", "structTAT_1_1NoCut.html", null ], + [ "Cut", "structTAT_1_1Cut.html", "structTAT_1_1Cut" ], + [ "TensorShape", "structTAT_1_1TensorShape.html", "structTAT_1_1TensorShape" ], + [ "Tensor", "classTAT_1_1Tensor.html", "classTAT_1_1Tensor" ], + [ "scope_resource", "structTAT_1_1scope__resource.html", "structTAT_1_1scope__resource" ], + [ "remove_cvref", "structTAT_1_1remove__cvref.html", "structTAT_1_1remove__cvref" ], + [ "type_identity", "structTAT_1_1type__identity.html", "structTAT_1_1type__identity" ], + [ "empty_list", "structTAT_1_1empty__list.html", "structTAT_1_1empty__list" ], + [ "overloaded", "structTAT_1_1overloaded.html", null ], + [ "mdspan", "classTAT_1_1mdspan.html", "classTAT_1_1mdspan" ], + [ "timer", "structTAT_1_1timer.html", "structTAT_1_1timer" ] + ] ], + [ "tetragono", null, [ + [ "abstract_lattice", null, [ + [ "AbstractLatticeVirtualBond", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond" ], + [ "AbstractLattice", "classtetragono_1_1abstract__lattice_1_1AbstractLattice.html", "classtetragono_1_1abstract__lattice_1_1AbstractLattice" ] + ] ], + [ "abstract_state", null, [ + [ "AbstractStatePhysicsEdge", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge" ], + [ "AbstractStateHamiltonian", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian" ], + [ "AbstractState", "classtetragono_1_1abstract__state_1_1AbstractState.html", "classtetragono_1_1abstract__state_1_1AbstractState" ] + ] ], + [ "auxiliaries", null, [ + [ "double_layer_auxiliaries", null, [ + [ "DoubleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries" ] + ] ], + [ "single_layer_auxiliaries", null, [ + [ "SingleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries" ] + ] ], + [ "three_line_auxiliaries", null, [ + [ "ThreeLineAuxiliaries", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries" ] + ] ] + ] ], + [ "common_tensor", null, [ + [ "tensor_toolkit", null, [ + [ "FakeEdge", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge" ] + ] ] + ] ], + [ "exact_state", null, [ + [ "ExactState", "classtetragono_1_1exact__state_1_1ExactState.html", "classtetragono_1_1exact__state_1_1ExactState" ] + ] ], + [ "sampling_lattice", null, [ + [ "lattice", null, [ + [ "Configuration", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration" ], + [ "TailDictTree", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree" ], + [ "ConfigurationPool", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool" ], + [ "SamplingLattice", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice" ] + ] ], + [ "observer", null, [ + [ "Observer", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer" ] + ] ], + [ "sampling", null, [ + [ "Sampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling" ], + [ "SweepSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling" ], + [ "ErgodicSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling" ], + [ "DirectSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling" ] + ] ] + ] ], + [ "shell", null, [ + [ "Config", "classtetragono_1_1shell_1_1Config.html", "classtetragono_1_1shell_1_1Config" ], + [ "AutoCmdMeta", "classtetragono_1_1shell_1_1AutoCmdMeta.html", "classtetragono_1_1shell_1_1AutoCmdMeta" ], + [ "AutoCmd", "classtetragono_1_1shell_1_1AutoCmd.html", "classtetragono_1_1shell_1_1AutoCmd" ], + [ "TetragonoCommandApp", "classtetragono_1_1shell_1_1TetragonoCommandApp.html", "classtetragono_1_1shell_1_1TetragonoCommandApp" ], + [ "TetragonoScriptApp", "classtetragono_1_1shell_1_1TetragonoScriptApp.html", "classtetragono_1_1shell_1_1TetragonoScriptApp" ] + ] ], + [ "simple_update_lattice", null, [ + [ "SimpleUpdateLatticeEnvironment", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment" ], + [ "SimpleUpdateLattice", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice" ] + ] ], + [ "utility", null, [ + [ "SignalHandler", "classtetragono_1_1utility_1_1SignalHandler.html", "classtetragono_1_1utility_1_1SignalHandler" ], + [ "SeedDiffer", "classtetragono_1_1utility_1_1SeedDiffer.html", "classtetragono_1_1utility_1_1SeedDiffer" ] + ] ] + ] ] +]; \ No newline at end of file diff --git a/bc_s.png b/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..224b29aa9847d5a4b3902efd602b7ddf7d33e6c2 GIT binary patch literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT literal 0 HcmV?d00001 diff --git a/bdwn.png b/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::Core< ScalarType, Symmetry > Member List
+
+
+ +

This is the complete list of members for TAT::Core< ScalarType, Symmetry >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
_block_order_v0_to_v1() (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
at(const std::vector< T, A > &arg) const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
at(const Arg &arg) (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
blocks() const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
blocks() (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
blocks(const std::vector< T, A > &arg) const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
blocks(const Arg &arg) (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
Core(std::vector< edge_t > input_edges) (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
Core()=delete (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
Core(const Core &other) (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
Core(Core &&other)=default (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
edge_t typedef (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
edges() const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
edges(Rank i) const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
operator=(const Core &)=delete (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
operator=(Core &&)=delete (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
scalar_t typedef (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
storage() const (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
storage() (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >inline
symmetry_t typedef (defined in TAT::Core< ScalarType, Symmetry >)TAT::Core< ScalarType, Symmetry >
+
+ + + + diff --git a/classTAT_1_1Core.html b/classTAT_1_1Core.html new file mode 100644 index 000000000..0ea96ae94 --- /dev/null +++ b/classTAT_1_1Core.html @@ -0,0 +1,193 @@ + + + + + + + +TAT: TAT::Core< ScalarType, Symmetry > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::Core< ScalarType, Symmetry > Class Template Reference
+
+
+ +

Contains nearly all tensor data except edge name, include edge shape and tensor content. + More...

+ +

#include <core.hpp>

+ + + + + + + + +

+Public Types

+using scalar_t = ScalarType
 
+using symmetry_t = Symmetry
 
+using edge_t = Edge< symmetry_t >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+const no_initialize::vector< scalar_t > & storage () const
 
+no_initialize::vector< scalar_t > & storage ()
 
+const std::vector< edge_t > & edges () const
 
+const edge_tedges (Rank i) const
 
+const mdspan< std::optional< mdspan< scalar_t > > > & blocks () const
 
+mdspan< std::optional< mdspan< scalar_t > > > & blocks ()
 
+template<typename T , typename A >
const mdspan< scalar_t > & blocks (const std::vector< T, A > &arg) const
 
+template<typename Arg >
auto & blocks (const Arg &arg)
 
+template<typename T , typename A >
const scalar_t & at (const std::vector< T, A > &arg) const
 
+template<typename Arg >
auto & at (const Arg &arg)
 
Core (std::vector< edge_t > input_edges)
 
Core (const Core &other)
 
Core (Core &&other)=default
 
+Coreoperator= (const Core &)=delete
 
+Coreoperator= (Core &&)=delete
 
+void _block_order_v0_to_v1 ()
 
+

Detailed Description

+

template<typename ScalarType, typename Symmetry>
+class TAT::Core< ScalarType, Symmetry >

+ +

Contains nearly all tensor data except edge name, include edge shape and tensor content.

+
Template Parameters
+ + + +
ScalarTypescalar type of tensor content
Symmetrythe symmetry owned by tensor
+
+
+
Note
Core used to erase data copy when rename edge name of tensor, which is a common operation
+

The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classTAT_1_1Core.js b/classTAT_1_1Core.js new file mode 100644 index 000000000..5eedf23b3 --- /dev/null +++ b/classTAT_1_1Core.js @@ -0,0 +1,23 @@ +var classTAT_1_1Core = +[ + [ "edge_t", "classTAT_1_1Core.html#ab65740c99fb251bb8110fa3d4e98658b", null ], + [ "scalar_t", "classTAT_1_1Core.html#a0f5d950d4d7ec0a93623e2fec69c8738", null ], + [ "symmetry_t", "classTAT_1_1Core.html#a78e45e3cddab845095c834ac90b8b77f", null ], + [ "Core", "classTAT_1_1Core.html#aa409364a2834589f6007fea94d1f46d5", null ], + [ "Core", "classTAT_1_1Core.html#ad49171c5d610d5b58d637ece8fca4ffd", null ], + [ "Core", "classTAT_1_1Core.html#a8d52bb4672cafc4b30866be955c133d3", null ], + [ "Core", "classTAT_1_1Core.html#ad1d8163f5a960df83b3d45942a9bc3ca", null ], + [ "_block_order_v0_to_v1", "classTAT_1_1Core.html#a6ee270b0faae57384d409879c3b2e5f4", null ], + [ "at", "classTAT_1_1Core.html#aec33c116b4b0fb9fb92e5ccf0cc0e816", null ], + [ "at", "classTAT_1_1Core.html#a0c4903e94f6396109e0dc446dc67bf8f", null ], + [ "blocks", "classTAT_1_1Core.html#ad5abc833e57290b72fbf2f1989e6c445", null ], + [ "blocks", "classTAT_1_1Core.html#a8e3f948f3ff58cc8fa4a3992624799b2", null ], + [ "blocks", "classTAT_1_1Core.html#a539b167c35dd03d12a3227da6a3678b6", null ], + [ "blocks", "classTAT_1_1Core.html#a8f73553cc9d9b145fee7a64a44d55d7c", null ], + [ "edges", "classTAT_1_1Core.html#a37ebd24e1663617547429e2ce6f974b3", null ], + [ "edges", "classTAT_1_1Core.html#a0df21d4f8b47ef9aaee8426bc3dc963f", null ], + [ "operator=", "classTAT_1_1Core.html#a2f187b74099028ce056dc28bc8d23c14", null ], + [ "operator=", "classTAT_1_1Core.html#a2b015fa12012bc76a67424a1cad31bea", null ], + [ "storage", "classTAT_1_1Core.html#a901dae42ae1129dfa7bba13416b20b69", null ], + [ "storage", "classTAT_1_1Core.html#a1424bb5f8d69b35e8d63cb7fc18e1233", null ] +]; \ No newline at end of file diff --git a/classTAT_1_1Edge-members.html b/classTAT_1_1Edge-members.html new file mode 100644 index 000000000..2910b9d6b --- /dev/null +++ b/classTAT_1_1Edge-members.html @@ -0,0 +1,149 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::Edge< Symmetry, is_pointer > Member List
+
+
+ +

This is the complete list of members for TAT::Edge< Symmetry, is_pointer >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
base_arrow_t typedef (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
base_segments_t typedef (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
conjugate() (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
conjugate() const (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
conjugate_() (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
conjugated() const (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
coord_by_index(const index_t &index) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
coord_by_point(const point_t &point) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
coord_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
dimension_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
Edge()=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
Edge(const Edge &)=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
Edge(Edge &&)=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
Edge(Arg &&arg, Arrow arrow=false) (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
Edge(std::initializer_list< std::pair< Symmetry, Size >> segments, Arrow arrow=false) (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
Edge(std::initializer_list< Symmetry > symmetries, Arrow arrow=false) (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >inline
edge_segments_t()=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
edge_segments_t(const edge_segments_t &edge)=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
edge_segments_t(edge_segments_t &&edge)=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
edge_segments_t(segments_t &&segments) (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
edge_segments_t(const segments_t &segments) (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
edge_segments_t(const symlist_t &symmetries)TAT::edge_segments_t< Symmetry, false >inline
edge_segments_t(const Size dimension, const symmetry_t symmetry=symmetry_t())TAT::edge_segments_t< Symmetry, false >inline
find_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
index_by_coord(const coord_t &coord) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
index_by_point(const point_t &point) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
index_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
is_not_pointer (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >static
is_pointer (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >static
operator=(const Edge &)=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
operator=(Edge &&)=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
operator=(const edge_segments_t &)=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
operator=(edge_segments_t &&)=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
point_by_coord(const coord_t &coord) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
point_by_index(const index_t &index) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
point_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
position_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
position_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
segments() const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
segments(position_t i) const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
segments_size() const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
segments_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
symlist_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >protected
symmetry_t typedef (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
total_dimension() const (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >inline
~Edge()=default (defined in TAT::Edge< Symmetry, is_pointer >)TAT::Edge< Symmetry, is_pointer >
~edge_segments_t()=default (defined in TAT::edge_segments_t< Symmetry, false >)TAT::edge_segments_t< Symmetry, false >
+
+ + + + diff --git a/classTAT_1_1Edge.html b/classTAT_1_1Edge.html new file mode 100644 index 000000000..f1bd279a4 --- /dev/null +++ b/classTAT_1_1Edge.html @@ -0,0 +1,290 @@ + + + + + + + +TAT: TAT::Edge< Symmetry, is_pointer > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::Edge< Symmetry, is_pointer > Class Template Reference
+
+
+ +

The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment. + More...

+ +

#include <edge.hpp>

+
+Inheritance diagram for TAT::Edge< Symmetry, is_pointer >:
+
+
+ + +TAT::edge_segments_t< Symmetry, false > + +
+ + + + + + + + + + + + + + + + + + + +

+Public Types

+using base_arrow_t = edge_arrow_t< Symmetry >
 
+using base_segments_t = edge_segments_t< Symmetry, is_pointer >
 
- Public Types inherited from TAT::edge_segments_t< Symmetry, false >
+using symmetry_t = Symmetry
 
+using segments_t = std::vector< std::pair< symmetry_t, Size > >
 
+using index_t = Size
 
+using position_t = Nums
 
+using point_t = std::pair< symmetry_t, Size >
 
+using coord_t = std::pair< position_t, Size >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Edge (const Edge &)=default
 
Edge (Edge &&)=default
 
+Edgeoperator= (const Edge &)=default
 
+Edgeoperator= (Edge &&)=default
 
+template<typename Arg , typename = std::enable_if_t<std::is_constructible_v<base_segments_t, Arg&&> && !std::is_same_v<remove_cvref_t<Arg>, Edge<Symmetry, is_pointer>>>>
 Edge (Arg &&arg, Arrow arrow=false)
 
Edge (std::initializer_list< std::pair< Symmetry, Size >> segments, Arrow arrow=false)
 
Edge (std::initializer_list< Symmetry > symmetries, Arrow arrow=false)
 
+void conjugate ()
 
+void conjugate_ ()
 
+Edge< Symmetryconjugated () const
 
+Edge< Symmetryconjugate () const
 
- Public Member Functions inherited from TAT::edge_segments_t< Symmetry, false >
edge_segments_t (const edge_segments_t &edge)=default
 
edge_segments_t (edge_segments_t &&edge)=default
 
edge_segments_t (segments_t &&segments)
 
edge_segments_t (const segments_t &segments)
 
 edge_segments_t (const symlist_t &symmetries)
 construct the edge with list of symmetry, each size of them are 1 More...
 
 edge_segments_t (const Size dimension, const symmetry_t symmetry=symmetry_t())
 construct a trivial edge, only contain a single symmetry More...
 
+edge_segments_toperator= (const edge_segments_t &)=default
 
+edge_segments_toperator= (edge_segments_t &&)=default
 
+const segments_t & segments () const
 
+const std::pair< symmetry_t, Size > & segments (position_t i) const
 
+position_t segments_size () const
 
+coord_t coord_by_point (const point_t &point) const
 
+point_t point_by_coord (const coord_t &coord) const
 
+coord_t coord_by_index (const index_t &index) const
 
+index_t index_by_coord (const coord_t &coord) const
 
+point_t point_by_index (const index_t &index) const
 
+index_t index_by_point (const point_t &point) const
 
+auto find_by_symmetry (const symmetry_t &symmetry) const
 
+position_t position_by_symmetry (const symmetry_t &symmetry) const
 
+Size dimension_by_symmetry (const symmetry_t &symmetry) const
 
+void conjugate ()
 
+edge_segments_t< symmetry_tconjugate () const
 
+void conjugate_ ()
 
+edge_segments_t< symmetry_tconjugated () const
 
+Size total_dimension () const
 
+ + + + + + + + + +

+Additional Inherited Members

- Static Public Attributes inherited from TAT::edge_segments_t< Symmetry, false >
+static constexpr bool is_pointer
 
+static constexpr bool is_not_pointer
 
- Protected Types inherited from TAT::edge_segments_t< Symmetry, false >
+using symlist_t = std::vector< symmetry_t >
 
+

Detailed Description

+

template<typename Symmetry, bool is_pointer = false>
+class TAT::Edge< Symmetry, is_pointer >

+ +

The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment.

+

If it is fermi edge, an arrow is also included

+
Template Parameters
+ + + +
SymmetryThe symmetry of the tensor
is_pointerwhether it is just point to the data or the edge containing the real structure.
+
+
+

The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classTAT_1_1Edge.js b/classTAT_1_1Edge.js new file mode 100644 index 000000000..b1f80f32c --- /dev/null +++ b/classTAT_1_1Edge.js @@ -0,0 +1,18 @@ +var classTAT_1_1Edge = +[ + [ "base_arrow_t", "classTAT_1_1Edge.html#aa941073fe2423cd77f4641dbd13e84cf", null ], + [ "base_segments_t", "classTAT_1_1Edge.html#ac2acfc9b4a6ba3fcecc39488ebb997cf", null ], + [ "Edge", "classTAT_1_1Edge.html#ac61c2e4ae9d124a53c4f257eaa2f64a8", null ], + [ "Edge", "classTAT_1_1Edge.html#a3975b05a1f714b69bdbcc79d5f2435f3", null ], + [ "Edge", "classTAT_1_1Edge.html#aa4e33c0b2a3c772b5af73e69fc3cf454", null ], + [ "~Edge", "classTAT_1_1Edge.html#a693b8d20ffcd76d1f07e1931045d9faf", null ], + [ "Edge", "classTAT_1_1Edge.html#a0d91e780bae686b74a05bacb20fcbcaa", null ], + [ "Edge", "classTAT_1_1Edge.html#ac9612927e64bf5c3d1b02ff0c9715f5a", null ], + [ "Edge", "classTAT_1_1Edge.html#a9c20da7b29e7e8cecc010f8e170ca3e0", null ], + [ "conjugate", "classTAT_1_1Edge.html#ae8ff26c9e4f1fca7ddec481d10c9f0fc", null ], + [ "conjugate", "classTAT_1_1Edge.html#ae04572a78ec11634b7775fc4cd605a4a", null ], + [ "conjugate_", "classTAT_1_1Edge.html#a8763c0646199dc35e33bc9553dc0bcbe", null ], + [ "conjugated", "classTAT_1_1Edge.html#a88df827a7457bb00122c3d7f95a9e189", null ], + [ "operator=", "classTAT_1_1Edge.html#a93736ae30ef07508b890b9d3673adeb1", null ], + [ "operator=", "classTAT_1_1Edge.html#a92144531177df0d6c1097f7fe5b7016d", null ] +]; \ No newline at end of file diff --git a/classTAT_1_1Edge.png b/classTAT_1_1Edge.png new file mode 100644 index 0000000000000000000000000000000000000000..99d96497ff6bda560ce56d80bb6648fde986ea6b GIT binary patch literal 1428 zcmb7Ei#L=B6#vG2#;1lpG9K+(jASErjLIvI86#O4uNjH)sM)4syfzIej=id9f_x$cX_uO;O&GI9AYHZoD z1pojIuS28&08jyy*bhP~tv{`RsdV~&hbbNkg+d8u=jCUwwqH}CFWT1DrkXWoqzs|N z0CFIpB>f{pJrq0usG53_2$W>RLczk7Wk-njgkrJEeo|i13OMha02$%L|=}m** zbVQ8BHb`rUpS*XMp15=?v-?ghd{-QbmT|a@M4IqV zv^n5wr>m7PTKBs0>KF|aH2_`mP=G?+mT1sWrp?bRO*6%6%N6b~y>zrj#D!Tm6?P`c zE`^J0Vt5dntr)SM_yM=aHD>*Nlg~`i?D=k5cz*#Hw^rU%?UOnoVCqkJljc8e;r>W7 zYL(W7Rh2~5Zdxjs+kKsKI+Nc@Q-hAi#Qt<^zH+`&uwH?JQVz{!F&&aMlWasqJ6wdZ zWjUFKY184IRS=q1E*ui1RTS<%&B5!s(z)#MPy8rIT7q>bTc^HWqqtlyOY0$JsvQ)KW@P#i#J71 zs+XQt6DBoRX&>I&9;|v0in1&UQlYnmqKVlFvI;><=`wsH$aSu(qu&S1dalX(mhjFk za+R%~9{S3zQDDdqG>|U4fHl!G((BEEu%s6a8X3o<36&M4-NW?gU17|EVlU3zl1GPV zZ|{@lgW5GEDO)|d+&`pV45x2A4o8TB_}-FdUVVCVr_Kw^8}yxwS$J{E_xs2KmX2L+ zV=#w8o%}W3jWqLsVS>@Jy<$Zog}DqNO$^eg z0jZVEju6))sYC35FW33ssj70N3#?EoipviOp#qEU;|NZO6Pm|4_Hfcmv~X`tXE)NKZOwdyK->D+YQvP)e;I~a#@2{nT;=(wX$4OUC2b$PpGWm-9 z>~pccC%LC}5p9JlOwHTu9Dic`F4*cRy?&vQZe-rR8FLUq0I6m7O_IM}UT6us(-GuY zTgX^z8JpR+R?ftz3&}>h7pU(g!{YX{*3CTG0nph>P7!~|EyoYkhDv7n!BC;Y8N1$- z@%?u3Ct7_UUg!-N5CV}$crrSaQf}w4oCj~FFtTw*v9EQweg@pf5J9p7U|_*Gw`&8= zacU;!z5_N(If?SAQ~Bo3%qBI$x&CZ7K;Hu*yUUzJ2#`J_Z6AKS9nPqVR@)Db_dU3n2f^I$jB%w6{HP>@(DdkC>QG5l1-eV< zT7Pk4(1JZjidhvtH3P+JueyiMKN=B!?$ASV%o6>LX&4m8KLUTv+jkZNEIxunUFkPI zAOHr9TB42sXqCB00;CTS+uY!PH{FK9mhyuzz($Ay!8r1qGh_bprSgRWULIspH8GO= EH|DKy8~^|S literal 0 HcmV?d00001 diff --git a/classTAT_1_1FastName-members.html b/classTAT_1_1FastName-members.html new file mode 100644 index 000000000..723ee27d5 --- /dev/null +++ b/classTAT_1_1FastName-members.html @@ -0,0 +1,111 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::FastName Member List
+
+
+ +

This is the complete list of members for TAT::FastName, including all inherited members.

+ + + + + + + + + + +
FastName() (defined in TAT::FastName)TAT::FastNameinline
FastName(String &&name) (defined in TAT::FastName)TAT::FastNameinline
operator const std::string &() const (defined in TAT::FastName)TAT::FastNameinline
operator!=(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
operator<(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
operator<=(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
operator==(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
operator>(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
operator>=(const FastName &other) const (defined in TAT::FastName)TAT::FastNameinline
+
+ + + + diff --git a/classTAT_1_1FastName.html b/classTAT_1_1FastName.html new file mode 100644 index 000000000..d3b836e72 --- /dev/null +++ b/classTAT_1_1FastName.html @@ -0,0 +1,144 @@ + + + + + + + +TAT: TAT::FastName Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::FastName Class Reference
+
+
+ +

FastName as tensor edge name. + More...

+ +

#include <name.hpp>

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+template<typename String , typename = std::enable_if_t<std::is_convertible_v<String, std::string_view> && !std::is_same_v<remove_cvref_t<String>, FastName>>>
 FastName (String &&name)
 
operator const std::string & () const
 
+bool operator== (const FastName &other) const
 
+bool operator!= (const FastName &other) const
 
+bool operator< (const FastName &other) const
 
+bool operator> (const FastName &other) const
 
+bool operator<= (const FastName &other) const
 
+bool operator>= (const FastName &other) const
 
+

Detailed Description

+

FastName as tensor edge name.

+

Use hash to represent a string via dataset map

+

The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classTAT_1_1FastName.js b/classTAT_1_1FastName.js new file mode 100644 index 000000000..c91833b68 --- /dev/null +++ b/classTAT_1_1FastName.js @@ -0,0 +1,12 @@ +var classTAT_1_1FastName = +[ + [ "FastName", "classTAT_1_1FastName.html#a92bfbb17b8ad5a0a7abff9062ae1b5b4", null ], + [ "FastName", "classTAT_1_1FastName.html#aab5a6415ee3399145594528199b04efb", null ], + [ "operator const std::string &", "classTAT_1_1FastName.html#a9aaa16ba345575f1fefd881f9609658d", null ], + [ "operator!=", "classTAT_1_1FastName.html#ad2bad97a681663ae9042d61ba1eca73a", null ], + [ "operator<", "classTAT_1_1FastName.html#a8b4e7f79ad44aedd9dc3e99804915aab", null ], + [ "operator<=", "classTAT_1_1FastName.html#ad290955a153956dd5352a03e4cf2ceb6", null ], + [ "operator==", "classTAT_1_1FastName.html#a6d97f7dea49e699cd11a78dbff993ffe", null ], + [ "operator>", "classTAT_1_1FastName.html#a8d02ae30304f17eecac978de28c6b7aa", null ], + [ "operator>=", "classTAT_1_1FastName.html#a46417dae070e0e4ed4319c7aa21cc949", null ] +]; \ No newline at end of file diff --git a/classTAT_1_1Tensor-members.html b/classTAT_1_1Tensor-members.html new file mode 100644 index 000000000..76077ba56 --- /dev/null +++ b/classTAT_1_1Tensor-members.html @@ -0,0 +1,220 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::Tensor< ScalarType, Symmetry, Name > Member List
+
+
+ +

This is the complete list of members for TAT::Tensor< ScalarType, Symmetry, Name >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_block_order_v0_to_v1() (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
acquire_data_ownership(const char *message="")TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::vector< T, A > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::unordered_map< name_t, T, H, K, A > &arg_map) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const T &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at() (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::vector< typename edge_t::index_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::vector< typename edge_t::index_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::vector< typename edge_t::point_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const std::vector< typename edge_t::point_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const map_from_name< typename edge_t::index_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const map_from_name< typename edge_t::index_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const map_from_name< typename edge_t::point_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
at(const map_from_name< typename edge_t::point_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks() (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks(const std::vector< T, A > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks(const std::unordered_map< name_t, T, H, K, A > &arg_map) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks(const T &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks(const std::vector< symmetry_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
blocks(const std::unordered_map< name_t, symmetry_t > &arg) (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
clear_bose_symmetry() constTAT::Tensor< ScalarType, Symmetry, Name >
clear_fermi_symmetry() constTAT::Tensor< ScalarType, Symmetry, Name >
clear_symmetry() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
conjugate(bool trivial_metric=false) constTAT::Tensor< ScalarType, Symmetry, Name >
const_at(const T &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_at() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_at(const std::vector< typename edge_t::index_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_at(const std::vector< typename edge_t::point_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_at(const map_from_name< typename edge_t::index_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_at(const map_from_name< typename edge_t::point_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_blocks() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_blocks(const T &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_blocks(const std::vector< symmetry_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
const_blocks(const std::unordered_map< name_t, symmetry_t > &arg) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
contract(const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names={})TAT::Tensor< ScalarType, Symmetry, Name >inlinestatic
contract(const Tensor< OtherScalarType, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names={}) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
contract_with_fuse (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >friend
contract_without_fuse (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >friend
copy() constTAT::Tensor< ScalarType, Symmetry, Name >inline
core_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
dump() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
edge_operator(const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split_map, const std::unordered_set< Name > &reversed_names, const std::unordered_map< Name, std::vector< Name >> &merge_map, std::vector< Name > new_names, const bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}, const std::unordered_set< Name > &parity_exclude_names_reversed_before_transpose={}, const std::unordered_set< Name > &parity_exclude_names_reversed_after_transpose={}, const std::unordered_set< Name > &parity_exclude_names_merge={}) constTAT::Tensor< ScalarType, Symmetry, Name >inline
edge_operator_implement(const A &split_map, const B &reversed_names, const C &merge_map, std::vector< Name > new_names, const bool apply_parity, const D &parity_exclude_names_split, const E &parity_exclude_names_reversed_before_transpose, const F &parity_exclude_names_reversed_after_transpose, const G &parity_exclude_names_merge, const H &edges_and_symmetries_to_cut_before_all) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
edge_rename(const std::unordered_map< Name, ResultName > &dictionary) constTAT::Tensor< ScalarType, Symmetry, Name >inline
edge_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
edges() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
edges(Rank r) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
edges(const Name &name) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
expand(const std::unordered_map< Name, std::pair< Size, Edge< Symmetry >>> &configure, const Name &old_name=InternalName< Name >::No_Old_Name) constTAT::Tensor< ScalarType, Symmetry, Name >
exponential(const std::unordered_set< std::pair< Name, Name >> &pairs, int step=2) constTAT::Tensor< ScalarType, Symmetry, Name >
find_by_name(const name_t &name) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
identity(const std::unordered_set< std::pair< Name, Name >> &pairs) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
identity(const std::unordered_set< std::pair< Name, Name >> &pairs) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
identity_(const std::unordered_set< std::pair< Name, Name >> &pairs) &TAT::Tensor< ScalarType, Symmetry, Name >
identity_(const std::unordered_set< std::pair< Name, Name >> &pairs) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
load(const std::string &) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
load(const std::string &string) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
map(Function &&function) constTAT::Tensor< ScalarType, Symmetry, Name >inline
map_from_name typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
merge_edge(const std::unordered_map< Name, std::vector< Name >> &merge, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_merge={}, const std::unordered_set< Name > &parity_exclude_names_reverse={}) constTAT::Tensor< ScalarType, Symmetry, Name >
name_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
names() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
names(Rank i) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
norm() constTAT::Tensor< ScalarType, Symmetry, Name >inline
operator scalar_t() constTAT::Tensor< ScalarType, Symmetry, Name >inlineexplicit
operator=(const Tensor &other)=default (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
operator=(Tensor &&other)=default (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
qr(char free_names_direction, const std::unordered_set< Name > &free_names, const Name &common_name_q, const Name &common_name_r) constTAT::Tensor< ScalarType, Symmetry, Name >
range(ScalarType first=0, ScalarType step=1) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
range(ScalarType first=0, ScalarType step=1) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
range_(ScalarType first=0, ScalarType step=1) &TAT::Tensor< ScalarType, Symmetry, Name >inline
range_(ScalarType first=0, ScalarType step=1) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
rank() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
rank_by_name(const name_t &name) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
reverse_edge(const std::unordered_set< Name > &reversed_names, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names={}) constTAT::Tensor< ScalarType, Symmetry, Name >inline
same_shape() constTAT::Tensor< ScalarType, Symmetry, Name >inline
scalar_like() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
scalar_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
self_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
set(Generator &&generator) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
set(Generator &&generator) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
set_(Generator &&generator) &TAT::Tensor< ScalarType, Symmetry, Name >inline
set_(Generator &&generator) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
shape() constTAT::Tensor< ScalarType, Symmetry, Name >inline
show() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
shrink(const std::unordered_map< Name, Size > &configure, const Name &new_name=InternalName< Name >::No_New_Name, Arrow arrow=false) constTAT::Tensor< ScalarType, Symmetry, Name >
split_edge(const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}) constTAT::Tensor< ScalarType, Symmetry, Name >
storage() const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
storage() (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
svd(const std::unordered_set< Name > &free_names_u, const Name &common_name_u, const Name &common_name_v, const Name &singular_name_u, const Name &singular_name_v, Cut cut=Cut()) constTAT::Tensor< ScalarType, Symmetry, Name >
symmetry_t typedef (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
Tensor (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >friend
Tensor(std::vector< Name > input_names, std::vector< Edge< Symmetry >> input_edges)TAT::Tensor< ScalarType, Symmetry, Name >inline
Tensor() (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
Tensor(const Tensor &other)=default (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
Tensor(Tensor &&other)=default (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
Tensor(scalar_t number, std::vector< Name > input_names={}, const std::vector< symmetry_t > &edge_symmetry={}, const std::vector< Arrow > &edge_arrow={})TAT::Tensor< ScalarType, Symmetry, Name >inlineexplicit
to() constTAT::Tensor< ScalarType, Symmetry, Name >inline
trace(const std::unordered_set< std::pair< Name, Name >> &trace_pairs, const std::unordered_map< Name, std::pair< Name, Name >> &fuse_names={}) constTAT::Tensor< ScalarType, Symmetry, Name >
trace_with_fuse (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >friend
trace_without_fuse (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >friend
transform(Function &&function) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
transform(Function &&function) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
transform_(Function &&function) &TAT::Tensor< ScalarType, Symmetry, Name >inline
transform_(Function &&function) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
transpose(std::vector< Name > target_names) constTAT::Tensor< ScalarType, Symmetry, Name >inline
zero() & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zero() && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zero_() &TAT::Tensor< ScalarType, Symmetry, Name >inline
zero_() && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zip_map(const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) const (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zip_transform(const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zip_transform(const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zip_transform_(const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) & (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
zip_transform_(const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) && (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >inline
~Tensor()=default (defined in TAT::Tensor< ScalarType, Symmetry, Name >)TAT::Tensor< ScalarType, Symmetry, Name >
+
+ + + + diff --git a/classTAT_1_1Tensor.html b/classTAT_1_1Tensor.html new file mode 100644 index 000000000..8a2a0b142 --- /dev/null +++ b/classTAT_1_1Tensor.html @@ -0,0 +1,1842 @@ + + + + + + + +TAT: TAT::Tensor< ScalarType, Symmetry, Name > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::Tensor< ScalarType, Symmetry, Name > Class Template Reference
+
+
+ +

Tensor type. + More...

+ +

#include <tensor.hpp>

+ + + + + + + + +

+Classes

struct  qr_result
 QR result type. More...
 
struct  svd_result
 SVD result type. More...
 
+ + + + + + + + + + + + + + + + +

+Public Types

+using self_t = Tensor< ScalarType, Symmetry, Name >
 
+using scalar_t = ScalarType
 
+using symmetry_t = Symmetry
 
+using name_t = Name
 
+using edge_t = Edge< symmetry_t >
 
+using core_t = Core< scalar_t, symmetry_t >
 
+template<typename T >
using map_from_name = std::unordered_map< name_t, T >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+const std::vector< name_t > & names () const
 
+const name_t & names (Rank i) const
 
+Rank rank () const
 
+auto find_by_name (const name_t &name) const
 
+Rank rank_by_name (const name_t &name) const
 
+const auto & storage () const
 
+auto & storage ()
 
+const std::vector< edge_t > & edges () const
 
+const edge_tedges (Rank r) const
 
+const edge_tedges (const Name &name) const
 
+const mdspan< std::optional< mdspan< scalar_t > > > & blocks () const
 
+mdspan< std::optional< mdspan< scalar_t > > > & blocks ()
 
+const mdspan< std::optional< mdspan< scalar_t > > > & const_blocks () const
 
+template<typename T = symmetry_t, typename A >
const auto & blocks (const std::vector< T, A > &arg) const
 
+template<typename T = symmetry_t, typename H , typename K , typename A >
const auto & blocks (const std::unordered_map< name_t, T, H, K, A > &arg_map) const
 
+template<typename T >
auto & blocks (const T &arg)
 
+template<typename T >
const auto & const_blocks (const T &arg) const
 
+auto & blocks (const std::vector< symmetry_t > &arg)
 
+const auto & const_blocks (const std::vector< symmetry_t > &arg) const
 
+auto & blocks (const std::unordered_map< name_t, symmetry_t > &arg)
 
+const auto & const_blocks (const std::unordered_map< name_t, symmetry_t > &arg) const
 
+template<typename T , typename A >
const scalar_t & at (const std::vector< T, A > &arg) const
 
+template<typename T , typename H , typename K , typename A >
const scalar_t & at (const std::unordered_map< name_t, T, H, K, A > &arg_map) const
 
+template<typename T >
scalar_t & at (const T &arg)
 
+template<typename T >
const scalar_t & const_at (const T &arg) const
 
+const scalar_t & at () const
 
+scalar_t & at ()
 
+const scalar_t & const_at () const
 
+const scalar_t & at (const std::vector< typename edge_t::index_t > &arg) const
 
+scalar_t & at (const std::vector< typename edge_t::index_t > &arg)
 
+const scalar_t & const_at (const std::vector< typename edge_t::index_t > &arg) const
 
+const scalar_t & at (const std::vector< typename edge_t::point_t > &arg) const
 
+scalar_t & at (const std::vector< typename edge_t::point_t > &arg)
 
+const scalar_t & const_at (const std::vector< typename edge_t::point_t > &arg) const
 
+const scalar_t & at (const map_from_name< typename edge_t::index_t > &arg) const
 
+scalar_t & at (const map_from_name< typename edge_t::index_t > &arg)
 
+const scalar_t & const_at (const map_from_name< typename edge_t::index_t > &arg) const
 
+const scalar_t & at (const map_from_name< typename edge_t::point_t > &arg) const
 
+scalar_t & at (const map_from_name< typename edge_t::point_t > &arg)
 
+const scalar_t & const_at (const map_from_name< typename edge_t::point_t > &arg) const
 
TensorShape< ScalarType, Symmetry, Name > shape () const
 Get tensor shape to print, used when you don't want to know value of the tensor. More...
 
 Tensor (std::vector< Name > input_names, std::vector< Edge< Symmetry >> input_edges)
 Initialize tensor with tensor edge name and tensor edge shape, blocks will be generated by edges. More...
 
Tensor (const Tensor &other)=default
 
Tensor (Tensor &&other)=default
 
+Tensoroperator= (const Tensor &other)=default
 
+Tensoroperator= (Tensor &&other)=default
 
 Tensor (scalar_t number, std::vector< Name > input_names={}, const std::vector< symmetry_t > &edge_symmetry={}, const std::vector< Arrow > &edge_arrow={})
 Create a high rank tensor but which only contains one element. More...
 
+bool scalar_like () const
 
 operator scalar_t () const
 Get the only element from a tensor which contains only one element. More...
 
+template<typename Function >
Tensor< ScalarType, Symmetry, Name > & transform (Function &&function) &
 
+template<typename Function >
Tensor< ScalarType, Symmetry, Name > && transform (Function &&function) &&
 
+template<typename OtherScalarType , typename Function >
Tensor< ScalarType, Symmetry, Name > & zip_transform (const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) &
 
+template<typename OtherScalarType , typename Function >
Tensor< ScalarType, Symmetry, Name > && zip_transform (const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) &&
 
template<typename Function >
Tensor< ScalarType, Symmetry, Name > & transform_ (Function &&function) &
 Do the same operator to the every value element of the tensor, inplacely. More...
 
+template<typename Function >
Tensor< ScalarType, Symmetry, Name > && transform_ (Function &&function) &&
 
+template<typename OtherScalarType , typename Function >
Tensor< ScalarType, Symmetry, Name > & zip_transform_ (const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) &
 
+template<typename OtherScalarType , typename Function >
Tensor< ScalarType, Symmetry, Name > && zip_transform_ (const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) &&
 
template<typename NewScalarType = ScalarType>
Tensor< NewScalarType, Symmetry, Name > same_shape () const
 Generate a tensor with the same shape. More...
 
template<typename ForceScalarType = void, typename Function >
auto map (Function &&function) const
 Do the same operator to the every value element of the tensor, outplacely. More...
 
+template<typename ForceScalarType = void, typename OtherScalarType , typename Function >
auto zip_map (const Tensor< OtherScalarType, Symmetry, Name > &other, Function &&function) const
 
Tensor< ScalarType, Symmetry, Name > copy () const
 Tensor deep copy, default copy will share the common data, i.e. More...
 
+template<typename Generator >
Tensor< ScalarType, Symmetry, Name > & set (Generator &&generator) &
 
+template<typename Generator >
Tensor< ScalarType, Symmetry, Name > && set (Generator &&generator) &&
 
template<typename Generator >
Tensor< ScalarType, Symmetry, Name > & set_ (Generator &&generator) &
 Set value of tensor by a generator elementwisely. More...
 
+template<typename Generator >
Tensor< ScalarType, Symmetry, Name > && set_ (Generator &&generator) &&
 
+Tensor< ScalarType, Symmetry, Name > & zero () &
 
+Tensor< ScalarType, Symmetry, Name > && zero () &&
 
Tensor< ScalarType, Symmetry, Name > & zero_ () &
 Set all the value of the tensor to zero. More...
 
+Tensor< ScalarType, Symmetry, Name > && zero_ () &&
 
+Tensor< ScalarType, Symmetry, Name > & range (ScalarType first=0, ScalarType step=1) &
 
+Tensor< ScalarType, Symmetry, Name > && range (ScalarType first=0, ScalarType step=1) &&
 
Tensor< ScalarType, Symmetry, Name > & range_ (ScalarType first=0, ScalarType step=1) &
 Set the value of tensor as natural number, used for test. More...
 
+Tensor< ScalarType, Symmetry, Name > && range_ (ScalarType first=0, ScalarType step=1) &&
 
void acquire_data_ownership (const char *message="")
 Acquire tensor data's ownership, it will copy the core if the core is shared. More...
 
template<typename OtherScalarType , typename = std::enable_if_t<is_scalar<OtherScalarType>>>
Tensor< OtherScalarType, Symmetry, Name > to () const
 Change the basic scalar type of the tensor. More...
 
template<int p = 2>
real_scalar< ScalarType > norm () const
 Get the norm of the tensor. More...
 
Tensor< ScalarType, NoSymmetry, Name > clear_bose_symmetry () const
 Convert symmetry tensor to non-symmetry tensor. More...
 
Tensor< ScalarType, ParitySymmetry, Name > clear_fermi_symmetry () const
 Convert fermionic symmetry tensor to parity symmetry tensor. More...
 
+auto clear_symmetry () const
 
Tensor< ScalarType, Symmetry, Name > edge_operator (const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split_map, const std::unordered_set< Name > &reversed_names, const std::unordered_map< Name, std::vector< Name >> &merge_map, std::vector< Name > new_names, const bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}, const std::unordered_set< Name > &parity_exclude_names_reversed_before_transpose={}, const std::unordered_set< Name > &parity_exclude_names_reversed_after_transpose={}, const std::unordered_set< Name > &parity_exclude_names_merge={}) const
 The core method for various edge operations, include split, reverse, merge and transpose. More...
 
template<typename ResultName = Name, typename = std::enable_if_t<is_name<ResultName>>>
Tensor< ScalarType, Symmetry, ResultName > edge_rename (const std::unordered_map< Name, ResultName > &dictionary) const
 Rename the edge name of tensor. More...
 
Tensor< ScalarType, Symmetry, Name > transpose (std::vector< Name > target_names) const
 Transpose the tensor. More...
 
Tensor< ScalarType, Symmetry, Name > reverse_edge (const std::unordered_set< Name > &reversed_names, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names={}) const
 Reverse fermi arrow of some edge for fermi tensor. More...
 
Tensor< ScalarType, Symmetry, Name > merge_edge (const std::unordered_map< Name, std::vector< Name >> &merge, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_merge={}, const std::unordered_set< Name > &parity_exclude_names_reverse={}) const
 Merge some edge of a tensor. More...
 
Tensor< ScalarType, Symmetry, Name > split_edge (const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}) const
 Split some edge of a tensor. More...
 
+template<typename OtherScalarType , typename = std::enable_if_t<is_scalar<OtherScalarType>>>
auto contract (const Tensor< OtherScalarType, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names={}) const
 
Tensor< ScalarType, Symmetry, Name > conjugate (bool trivial_metric=false) const
 Get the conjugated tensor. More...
 
+Tensor< ScalarType, Symmetry, Name > & identity (const std::unordered_set< std::pair< Name, Name >> &pairs) &
 
+Tensor< ScalarType, Symmetry, Name > && identity (const std::unordered_set< std::pair< Name, Name >> &pairs) &&
 
Tensor< ScalarType, Symmetry, Name > & identity_ (const std::unordered_set< std::pair< Name, Name >> &pairs) &
 Set the tensor as identity inplacely. More...
 
+Tensor< ScalarType, Symmetry, Name > && identity_ (const std::unordered_set< std::pair< Name, Name >> &pairs) &&
 
Tensor< ScalarType, Symmetry, Name > exponential (const std::unordered_set< std::pair< Name, Name >> &pairs, int step=2) const
 Get the tensor exponential. More...
 
Tensor< ScalarType, Symmetry, Name > trace (const std::unordered_set< std::pair< Name, Name >> &trace_pairs, const std::unordered_map< Name, std::pair< Name, Name >> &fuse_names={}) const
 Get trace of tensor. More...
 
svd_result svd (const std::unordered_set< Name > &free_names_u, const Name &common_name_u, const Name &common_name_v, const Name &singular_name_u, const Name &singular_name_v, Cut cut=Cut()) const
 Calculate SVD of the tensor. More...
 
qr_result qr (char free_names_direction, const std::unordered_set< Name > &free_names, const Name &common_name_q, const Name &common_name_r) const
 Calculate QR of the tensor. More...
 
Tensor< ScalarType, Symmetry, Name > expand (const std::unordered_map< Name, std::pair< Size, Edge< Symmetry >>> &configure, const Name &old_name=InternalName< Name >::No_Old_Name) const
 Expand a one dimensional edge of a tensor to several wider edge. More...
 
Tensor< ScalarType, Symmetry, Name > shrink (const std::unordered_map< Name, Size > &configure, const Name &new_name=InternalName< Name >::No_New_Name, Arrow arrow=false) const
 Shrink several edge of a tensor to a one dimensional edge. More...
 
+std::string show () const
 
+std::string dump () const
 
+Tensor< ScalarType, Symmetry, Name > & load (const std::string &) &
 
+Tensor< ScalarType, Symmetry, Name > && load (const std::string &string) &&
 
+void _block_order_v0_to_v1 ()
 
+template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
Tensor< ScalarType, Symmetry, Name > edge_operator_implement (const A &split_map, const B &reversed_names, const C &merge_map, std::vector< Name > new_names, const bool apply_parity, const D &parity_exclude_names_split, const E &parity_exclude_names_reversed_before_transpose, const F &parity_exclude_names_reversed_after_transpose, const G &parity_exclude_names_merge, const H &edges_and_symmetries_to_cut_before_all) const
 
+ + + + + +

+Static Public Member Functions

template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2>>>
static auto contract (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names={})
 Calculate product of two tensor. More...
 
+ + + + + + + + + + + + + +

+Friends

+template<typename ScalarTypeT , typename SymmetryT , typename NameT >
Tensor< ScalarTypeT, SymmetryT, NameT > contract_without_fuse (const Tensor< ScalarTypeT, SymmetryT, NameT > &tensor_1, const Tensor< ScalarTypeT, SymmetryT, NameT > &tensor_2, const std::unordered_set< std::pair< NameT, NameT >> &contract_pairs)
 
+template<typename ScalarTypeT , typename NameT >
Tensor< ScalarTypeT, NoSymmetry, NameT > contract_with_fuse (const Tensor< ScalarTypeT, NoSymmetry, NameT > &tensor_1, const Tensor< ScalarTypeT, NoSymmetry, NameT > &tensor_2, const std::unordered_set< std::pair< NameT, NameT >> &contract_pairs, const std::unordered_set< NameT > &fuse_names)
 
+template<typename ScalarTypeT , typename SymmetryT , typename NameT >
Tensor< ScalarTypeT, SymmetryT, NameT > trace_without_fuse (const Tensor< ScalarTypeT, SymmetryT, NameT > &tensor, const std::unordered_set< std::pair< NameT, NameT >> &trace_pairs)
 
+template<typename ScalarTypeT , typename SymmetryT , typename NameT >
Tensor< ScalarTypeT, SymmetryT, NameT > trace_with_fuse (const Tensor< ScalarTypeT, SymmetryT, NameT > &tensor, const std::unordered_set< std::pair< NameT, NameT >> &trace_pairs, const std::unordered_map< NameT, std::pair< NameT, NameT >> &fuse_names)
 
+

Detailed Description

+

template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+class TAT::Tensor< ScalarType, Symmetry, Name >

+ +

Tensor type.

+

tensor type contains edge name, edge shape, and tensor content. every edge has a Name as its name, for nom-symmetric tensor, an edge is just a number describing its dimension. for symmetric tensor, an edge is a segment like structure, describing each symmetry's dimension. tensor content is represented as several blocks, for non-symmetric tensor, there is only one block

+
Template Parameters
+ + + + +
ScalarTypescalar type of tensor content
Symmetrytensor's symmetry
Namename type to distinguish different edge
+
+
+

Constructor & Destructor Documentation

+ +

◆ Tensor() [1/2]

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
TAT::Tensor< ScalarType, Symmetry, Name >::Tensor (std::vector< Name > input_names,
std::vector< Edge< Symmetry >> input_edges 
)
+
+inline
+
+ +

Initialize tensor with tensor edge name and tensor edge shape, blocks will be generated by edges.

+
Parameters
+ + + +
input_namesedge name
input_edgesedge shape
+
+
+
See also
Core
+ +
+
+ +

◆ Tensor() [2/2]

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TAT::Tensor< ScalarType, Symmetry, Name >::Tensor (scalar_t number,
std::vector< Name > input_names = {},
const std::vector< symmetry_t > & edge_symmetry = {},
const std::vector< Arrow > & edge_arrow = {} 
)
+
+inlineexplicit
+
+ +

Create a high rank tensor but which only contains one element.

+
Parameters
+ + + + + +
numberthe only element
input_namesedge name
edge_symmetrythe symmetry for every edge, if valid
edge_arrowthe fermi arrow for every edge, if valid
+
+
+ +
+
+

Member Function Documentation

+ +

◆ acquire_data_ownership()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + +
void TAT::Tensor< ScalarType, Symmetry, Name >::acquire_data_ownership (const char * message = "")
+
+inline
+
+ +

Acquire tensor data's ownership, it will copy the core if the core is shared.

+
Parameters
+ + +
messagewarning message if core is copied
+
+
+ +
+
+ +

◆ clear_bose_symmetry()

+ +
+
+
+template<typename ScalarType , typename SymmetryT , typename Name >
+ + + + +
Tensor< ScalarType, NoSymmetry, Name > TAT::Tensor< ScalarType, SymmetryT, Name >::clear_bose_symmetry
+
+ +

Convert symmetry tensor to non-symmetry tensor.

+
Note
it is dangerous for fermi tensor
+ +
+
+ +

◆ clear_fermi_symmetry()

+ +
+
+
+template<typename ScalarType , typename SymmetryT , typename Name >
+ + + + +
Tensor< ScalarType, ParitySymmetry, Name > TAT::Tensor< ScalarType, SymmetryT, Name >::clear_fermi_symmetry
+
+ +

Convert fermionic symmetry tensor to parity symmetry tensor.

+
Note
it is invalid for bose tensor
+ +
+
+ +

◆ conjugate()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::conjugate (bool trivial_metric = false) const
+
+ +

Get the conjugated tensor.

+
Note
for symmetry tensor, every symmetry is transformed to -symmetry, for fermion tensor, arrow is reversed, for complex tensor value got conjugated
+
Parameters
+ + +
trivial_metricapply a trivial metric when conjugate the tensor.
+
+
+ +
+
+ +

◆ contract()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2>>>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static auto TAT::Tensor< ScalarType, Symmetry, Name >::contract (const Tensor< ScalarType1, Symmetry, Name > & tensor_1,
const Tensor< ScalarType2, Symmetry, Name > & tensor_2,
const std::unordered_set< std::pair< Name, Name >> & contract_pairs,
const std::unordered_set< Name > & fuse_names = {} 
)
+
+inlinestatic
+
+ +

Calculate product of two tensor.

+
Parameters
+ + + + + +
tensor_1tensor 1
tensor_2tensor 2
contract_pairsset of edge name pair to contract
fuse_namesset of edge name to fuse
+
+
+
Returns
the result tensor
+ +
+
+ +

◆ copy()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + +
Tensor<ScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::copy () const
+
+inline
+
+ +

Tensor deep copy, default copy will share the common data, i.e.

+

the same core

See also
map
+ +
+
+ +

◆ edge_operator()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tensor<ScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::edge_operator (const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> & split_map,
const std::unordered_set< Name > & reversed_names,
const std::unordered_map< Name, std::vector< Name >> & merge_map,
std::vector< Name > new_names,
const bool apply_parity = false,
const std::unordered_set< Name > & parity_exclude_names_split = {},
const std::unordered_set< Name > & parity_exclude_names_reversed_before_transpose = {},
const std::unordered_set< Name > & parity_exclude_names_reversed_after_transpose = {},
const std::unordered_set< Name > & parity_exclude_names_merge = {} 
) const
+
+inline
+
+ +

The core method for various edge operations, include split, reverse, merge and transpose.

+
Parameters
+ + + + + + +
split_mapmap describing how to split
reversed_namesset describing how to reverse, only for fermi tensor
merge_mapmap describing how to merge
new_namesthe result tensor edge order
apply_paritysome operations generate half sign, it controls default behavior whether to apply the sign to this tensor
+
+
+
Returns
the result of all the operations
+

If some few edge is not share the same behavior to default sign apply property, please use the last four argument

+
Note
If reversed name not satisfy the merge condition, it will reverse automatically
+
+For fermi tensor, reverse/split/merge will generate half sign, you need to apply the sign to one of the two tensor
+
+Since transpose generate a full sign, it will not be controled by apply_parity, it is always valid
+ +
+
+ +

◆ edge_rename()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename ResultName = Name, typename = std::enable_if_t<is_name<ResultName>>>
+ + + + + +
+ + + + + + + + +
Tensor<ScalarType, Symmetry, ResultName> TAT::Tensor< ScalarType, Symmetry, Name >::edge_rename (const std::unordered_map< Name, ResultName > & dictionary) const
+
+inline
+
+ +

Rename the edge name of tensor.

+
Parameters
+ + +
dictionarythe map of the plan for renaming edge name
+
+
+
Returns
A tensor after renaming, share the core with the original tensor
+ +
+
+ +

◆ expand()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::expand (const std::unordered_map< Name, std::pair< Size, Edge< Symmetry >>> & configure,
const Name & old_name = InternalName<Name>::No_Old_Name 
) const
+
+ +

Expand a one dimensional edge of a tensor to several wider edge.

+
Parameters
+ + + +
configureThe way to expand edge. It is a map from the name of the new edge to a pair containing new index and the new full edge.
old_namethe original edge to be expanded, it should be a one dimensional edge.
+
+
+ +
+
+ +

◆ exponential()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::exponential (const std::unordered_set< std::pair< Name, Name >> & pairs,
int step = 2 
) const
+
+ +

Get the tensor exponential.

+
Parameters
+ + + +
pairspair set describing how to treat the tensor as matrix
stepiteration step
+
+
+ +
+
+ +

◆ identity_()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + + + + +
Tensor< ScalarType, Symmetry, Name > & TAT::Tensor< ScalarType, Symmetry, Name >::identity_ (const std::unordered_set< std::pair< Name, Name >> & pairs) &
+
+ +

Set the tensor as identity inplacely.

+
Parameters
+ + +
pairspair set describing how to treat the tensor as matrix
+
+
+ +
+
+ +

◆ map()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename ForceScalarType = void, typename Function >
+ + + + + +
+ + + + + + + + +
auto TAT::Tensor< ScalarType, Symmetry, Name >::map (Function && function) const
+
+inline
+
+ +

Do the same operator to the every value element of the tensor, outplacely.

+
Parameters
+ + +
functionThe operator
+
+
+
Returns
The result tensor
+
See also
same_shape
+ +
+
+ +

◆ merge_edge()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::merge_edge (const std::unordered_map< Name, std::vector< Name >> & merge,
bool apply_parity = false,
const std::unordered_set< Name > & parity_exclude_names_merge = {},
const std::unordered_set< Name > & parity_exclude_names_reverse = {} 
) const
+
+ +

Merge some edge of a tensor.

+
Parameters
+ + +
mergea map describing how to merge
+
+
+
Note
the strategy to determine the result edge is to move each group of merged edge to the last edge of this merge group
+ +
+
+ +

◆ norm()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<int p = 2>
+ + + + + +
+ + + + + + + +
real_scalar<ScalarType> TAT::Tensor< ScalarType, Symmetry, Name >::norm () const
+
+inline
+
+ +

Get the norm of the tensor.

+
Note
Treat the tensor as vector, not the matrix norm or other things
+
Template Parameters
+ + +
pGet the p-norm of the tensor, if p=-1, that is max absolute value norm, namely inf-norm
+
+
+ +
+
+ +

◆ operator scalar_t()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + +
TAT::Tensor< ScalarType, Symmetry, Name >::operator scalar_t () const
+
+inlineexplicit
+
+ +

Get the only element from a tensor which contains only one element.

+ +
+
+ +

◆ qr()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name >::qr_result TAT::Tensor< ScalarType, Symmetry, Name >::qr (char free_names_direction,
const std::unordered_set< Name > & free_names,
const Name & common_name_q,
const Name & common_name_r 
) const
+
+ +

Calculate QR of the tensor.

+
Parameters
+ + + + + +
free_names_directionspecify what tensor the free_name_set means, it can be 'Q' or 'R'
free_nameone of tensor Q or tensor R free name after QR
common_name_qQ tensor new name after QR
common_name_rR tensor new name after QR
+
+
+
Returns
QR result
+
See also
qr_result
+ +
+
+ +

◆ range_()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Tensor<ScalarType, Symmetry, Name>& TAT::Tensor< ScalarType, Symmetry, Name >::range_ (ScalarType first = 0,
ScalarType step = 1 
) &
+
+inline
+
+ +

Set the value of tensor as natural number, used for test.

+
See also
set
+ +
+
+ +

◆ reverse_edge()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Tensor<ScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::reverse_edge (const std::unordered_set< Name > & reversed_names,
bool apply_parity = false,
const std::unordered_set< Name > & parity_exclude_names = {} 
) const
+
+inline
+
+ +

Reverse fermi arrow of some edge for fermi tensor.

+
Parameters
+ + + + +
reversed_namesreversed name set
apply_paritywhether to apply sign by default
parity_exclude_namesset of edge which apply sign differently with default behavior
+
+
+
Returns
tensor with edge reversed
+ +
+
+ +

◆ same_shape()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename NewScalarType = ScalarType>
+ + + + + +
+ + + + + + + +
Tensor<NewScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::same_shape () const
+
+inline
+
+ +

Generate a tensor with the same shape.

+
Template Parameters
+ + +
NewScalarTypebasic scalar type of the result tensor
+
+
+
Returns
The value of tensor is not initialized
+ +
+
+ +

◆ set_()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename Generator >
+ + + + + +
+ + + + + + + + +
Tensor<ScalarType, Symmetry, Name>& TAT::Tensor< ScalarType, Symmetry, Name >::set_ (Generator && generator) &
+
+inline
+
+ +

Set value of tensor by a generator elementwisely.

+
Parameters
+ + +
generatorGenerator accept non argument, and return scalartype
+
+
+ +
+
+ +

◆ shape()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + +
TensorShape<ScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::shape () const
+
+inline
+
+ +

Get tensor shape to print, used when you don't want to know value of the tensor.

+ +
+
+ +

◆ shrink()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::shrink (const std::unordered_map< Name, Size > & configure,
const Name & new_name = InternalName<Name>::No_New_Name,
Arrow arrow = false 
) const
+
+ +

Shrink several edge of a tensor to a one dimensional edge.

+
Parameters
+ + + + +
configureThe way to shrink edges. It is a map from the name of the old edge to the kept index.
new_nameThe name of the new edge created by shrinking.
arrowThe fermionic arrow of the new edge for fermionic tensor.
+
+
+ +
+
+ +

◆ split_edge()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::split_edge (const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> & split,
bool apply_parity = false,
const std::unordered_set< Name > & parity_exclude_names_split = {} 
) const
+
+ +

Split some edge of a tensor.

+
Parameters
+ + +
splita map describing how to split
+
+
+ +
+
+ +

◆ svd()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name >::svd_result TAT::Tensor< ScalarType, Symmetry, Name >::svd (const std::unordered_set< Name > & free_names_u,
const Name & common_name_u,
const Name & common_name_v,
const Name & singular_name_u,
const Name & singular_name_v,
Cut cut = Cut() 
) const
+
+ +

Calculate SVD of the tensor.

+
Parameters
+ + + + + + + +
free_names_uU tensor free name after SVD
common_name_uU tensor new name after SVD
common_name_vV tensor new name after SVD
singular_name_uS tensor edge name connected to tensor U
singular_name_vS tensor edge name connected to tensor V
cutHow to cut bond dimension during SVD
+
+
+
Returns
SVD result
+
See also
svd_result
+ +
+
+ +

◆ to()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename OtherScalarType , typename = std::enable_if_t<is_scalar<OtherScalarType>>>
+ + + + + +
+ + + + + + + +
Tensor<OtherScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::to () const
+
+inline
+
+ +

Change the basic scalar type of the tensor.

+ +
+
+ +

◆ trace()

+ +
+
+
+template<typename ScalarType , typename Symmetry , typename Name >
+ + + + + + + + + + + + + + + + + + +
Tensor< ScalarType, Symmetry, Name > TAT::Tensor< ScalarType, Symmetry, Name >::trace (const std::unordered_set< std::pair< Name, Name >> & trace_pairs,
const std::unordered_map< Name, std::pair< Name, Name >> & fuse_names = {} 
) const
+
+ +

Get trace of tensor.

+
Parameters
+ + + +
trace_pairspair set describing how to trace the tensor
fuse_namesthe edges need to be fused
+
+
+ +
+
+ +

◆ transform_()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+
+template<typename Function >
+ + + + + +
+ + + + + + + + +
Tensor<ScalarType, Symmetry, Name>& TAT::Tensor< ScalarType, Symmetry, Name >::transform_ (Function && function) &
+
+inline
+
+ +

Do the same operator to the every value element of the tensor, inplacely.

+
Parameters
+ + +
functionThe operator
+
+
+ +
+
+ +

◆ transpose()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + + +
Tensor<ScalarType, Symmetry, Name> TAT::Tensor< ScalarType, Symmetry, Name >::transpose (std::vector< Name > target_names) const
+
+inline
+
+ +

Transpose the tensor.

+
Parameters
+ + +
target_namesedge name order after transpose
+
+
+
Returns
tensor transposed
+ +
+
+ +

◆ zero_()

+ +
+
+
+template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
+ + + + + +
+ + + + + + + +
Tensor<ScalarType, Symmetry, Name>& TAT::Tensor< ScalarType, Symmetry, Name >::zero_ () &
+
+inline
+
+ +

Set all the value of the tensor to zero.

+
See also
set
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/classTAT_1_1Tensor.js b/classTAT_1_1Tensor.js new file mode 100644 index 000000000..6c4e3a472 --- /dev/null +++ b/classTAT_1_1Tensor.js @@ -0,0 +1,123 @@ +var classTAT_1_1Tensor = +[ + [ "qr_result", "structTAT_1_1Tensor_1_1qr__result.html", "structTAT_1_1Tensor_1_1qr__result" ], + [ "svd_result", "structTAT_1_1Tensor_1_1svd__result.html", "structTAT_1_1Tensor_1_1svd__result" ], + [ "core_t", "classTAT_1_1Tensor.html#ab37df69c5a21cd767e5cee876f7456ec", null ], + [ "edge_t", "classTAT_1_1Tensor.html#a305f3bd53e07a499154d0da87b363a06", null ], + [ "map_from_name", "classTAT_1_1Tensor.html#a8e83b8f744b2077f5dc05907b48b6944", null ], + [ "name_t", "classTAT_1_1Tensor.html#ab253208ffbb59d448642e70912247293", null ], + [ "scalar_t", "classTAT_1_1Tensor.html#a15ae4dc3b9a92e28e5caa19348aa6611", null ], + [ "self_t", "classTAT_1_1Tensor.html#aa8a40f78ac568155fa82ea28e41ab5fd", null ], + [ "symmetry_t", "classTAT_1_1Tensor.html#a7291a74010a6cd0637cbbb18f49e5c0a", null ], + [ "Tensor", "classTAT_1_1Tensor.html#acabf96991d54768b5b5c44665bb54e56", null ], + [ "Tensor", "classTAT_1_1Tensor.html#a27919abe66af82d1ed3b89770c05cae0", null ], + [ "Tensor", "classTAT_1_1Tensor.html#a44cbc74cf19e0679da158385dc3eaa0e", null ], + [ "Tensor", "classTAT_1_1Tensor.html#ad445823832dca9140c0ef5af34cc16ab", null ], + [ "~Tensor", "classTAT_1_1Tensor.html#a1d423525b08fa4b1624435798c2be80d", null ], + [ "Tensor", "classTAT_1_1Tensor.html#affe6d2033032b8bf34ca5e80bb984b92", null ], + [ "_block_order_v0_to_v1", "classTAT_1_1Tensor.html#a3fa62286fd1181b516b83e7572fadf80", null ], + [ "acquire_data_ownership", "classTAT_1_1Tensor.html#a524e78cb0007af1862eecb796fab2039", null ], + [ "at", "classTAT_1_1Tensor.html#a3a5f76403b012cd6a211017cce2661cd", null ], + [ "at", "classTAT_1_1Tensor.html#a42042ea4097fde84058541601498b180", null ], + [ "at", "classTAT_1_1Tensor.html#ae23a2b953070e98c70fde0119f2db8bf", null ], + [ "at", "classTAT_1_1Tensor.html#a3b949d2e2681523e045425df1ee73f39", null ], + [ "at", "classTAT_1_1Tensor.html#ade8d1810dddefab5c67571bde8e95747", null ], + [ "at", "classTAT_1_1Tensor.html#a802aa68d4f003a1ea67d8a4dc64ece4a", null ], + [ "at", "classTAT_1_1Tensor.html#aadc72647ced9c95f0615b10a909f9b68", null ], + [ "at", "classTAT_1_1Tensor.html#ad45d39ced481e131912f6e8c49fc278f", null ], + [ "at", "classTAT_1_1Tensor.html#a4ebdde4ce16b0678282a8170ccc885c9", null ], + [ "at", "classTAT_1_1Tensor.html#aadebcfe737d931b1aedf28f220a9152a", null ], + [ "at", "classTAT_1_1Tensor.html#a8efd49f292ff9882843f3b53ef362891", null ], + [ "at", "classTAT_1_1Tensor.html#a04ed4b06cfb8034eb604371771634e27", null ], + [ "at", "classTAT_1_1Tensor.html#a669033b3ce3dd52caf9e077faf95ccbb", null ], + [ "blocks", "classTAT_1_1Tensor.html#a31c7b433bd6bfdd206df4e69dfe587fd", null ], + [ "blocks", "classTAT_1_1Tensor.html#ae4ff31bc4d4e54f30dd275376c9cd7eb", null ], + [ "blocks", "classTAT_1_1Tensor.html#a5af24242d287e2d8735c0586bb32ee8c", null ], + [ "blocks", "classTAT_1_1Tensor.html#a551c2acbfe3700de3935348f83b53caf", null ], + [ "blocks", "classTAT_1_1Tensor.html#a12cb1ed6a01417b3224a03d2b18fb237", null ], + [ "blocks", "classTAT_1_1Tensor.html#a0ee25f3b0451617805f989f77a6b4f66", null ], + [ "blocks", "classTAT_1_1Tensor.html#a94afcb840c10a78ea411278ee0ff8e76", null ], + [ "clear_bose_symmetry", "classTAT_1_1Tensor.html#a37905938d21c150eba14bf9e5cedda2e", null ], + [ "clear_fermi_symmetry", "classTAT_1_1Tensor.html#a5952fd6d1c8829c66920173c6cf908f9", null ], + [ "clear_symmetry", "classTAT_1_1Tensor.html#a1949c8e75b4407b2b0a4020fc50bbf9e", null ], + [ "conjugate", "classTAT_1_1Tensor.html#a2f0a15a569566bda7e0fdf1d67297f99", null ], + [ "const_at", "classTAT_1_1Tensor.html#a6b1d630d9f3a64aec86f7671a647e3ff", null ], + [ "const_at", "classTAT_1_1Tensor.html#a4579298579202d6a5d0a9c2e0b89b558", null ], + [ "const_at", "classTAT_1_1Tensor.html#a6b13310d2ea58679c22c0a5e5dc3d578", null ], + [ "const_at", "classTAT_1_1Tensor.html#ac1ab9f49780914c4363feab2c0717327", null ], + [ "const_at", "classTAT_1_1Tensor.html#aa9b365e5bd0478439194bf7833b550b2", null ], + [ "const_at", "classTAT_1_1Tensor.html#a12ac230a3752f0d0a9371da73749e6f5", null ], + [ "const_blocks", "classTAT_1_1Tensor.html#aa7e641f361ce52724813f5da672e2ac3", null ], + [ "const_blocks", "classTAT_1_1Tensor.html#a90806f1759e20df9a7e8026f45a67841", null ], + [ "const_blocks", "classTAT_1_1Tensor.html#ac9dd1622117d3f28b258ffb366a1f466", null ], + [ "const_blocks", "classTAT_1_1Tensor.html#af975214c175c62ac81c43973803f2bf8", null ], + [ "contract", "classTAT_1_1Tensor.html#ac87f8cf7c18b81681272306b5934440e", null ], + [ "contract", "classTAT_1_1Tensor.html#a033ac5c2f01b3e878ae9ff5415d4f80f", null ], + [ "copy", "classTAT_1_1Tensor.html#a9d94cc5a258afdf3b256779df8a8bd9b", null ], + [ "dump", "classTAT_1_1Tensor.html#a59ec761051073a9191f308e42042a515", null ], + [ "edge_operator", "classTAT_1_1Tensor.html#a901355092a5934d891cf2d790a52928a", null ], + [ "edge_operator_implement", "classTAT_1_1Tensor.html#a02eab28f8490bcdfdd645231b693ee80", null ], + [ "edge_rename", "classTAT_1_1Tensor.html#a2dd30f5a2a819d1394faee8593c5bc07", null ], + [ "edges", "classTAT_1_1Tensor.html#a666c1ee290332c5ad7698a092fbbf900", null ], + [ "edges", "classTAT_1_1Tensor.html#a41f25c5e374cddaba947836cd1788003", null ], + [ "edges", "classTAT_1_1Tensor.html#a8d6264e69db4f54abe6d37d8e4223233", null ], + [ "expand", "classTAT_1_1Tensor.html#abfe5e71bab16ac331796bede0e9cc3b7", null ], + [ "exponential", "classTAT_1_1Tensor.html#a359f958ae38a0fccf3b9ddb61e4fdf2e", null ], + [ "find_by_name", "classTAT_1_1Tensor.html#a28624537807298b199f00cd3a22469bf", null ], + [ "identity", "classTAT_1_1Tensor.html#a65c943f898426248596ba26c0b1669a1", null ], + [ "identity", "classTAT_1_1Tensor.html#a32867866f6c0475f5880b69fdb004c23", null ], + [ "identity_", "classTAT_1_1Tensor.html#a787430069374aa78d856c364774e550c", null ], + [ "identity_", "classTAT_1_1Tensor.html#a97ff833686d07340de5d8be66ce53bf3", null ], + [ "load", "classTAT_1_1Tensor.html#a202ef1071a4e51b6344395ffbad6f1b8", null ], + [ "load", "classTAT_1_1Tensor.html#adccf842a212e8fb6b64cdf6585d2619e", null ], + [ "map", "classTAT_1_1Tensor.html#a13e3ba161ed773635f263a9e7eec9866", null ], + [ "merge_edge", "classTAT_1_1Tensor.html#a4f889adcfeef434b4dfa522396eba618", null ], + [ "names", "classTAT_1_1Tensor.html#ab5461e59848b089e47365131a75f77eb", null ], + [ "names", "classTAT_1_1Tensor.html#a4239dbf00bc13ed88321ca69c43032f4", null ], + [ "norm", "classTAT_1_1Tensor.html#a3f4c8d7b41f7742fe2f4a68d8df3aecd", null ], + [ "operator scalar_t", "classTAT_1_1Tensor.html#af11438e704287b62eed5afd041f1271b", null ], + [ "operator=", "classTAT_1_1Tensor.html#a2e1ca6a58056b952a50e3238ba2a533c", null ], + [ "operator=", "classTAT_1_1Tensor.html#a982cdd534c2804c555b2027865f64f6b", null ], + [ "qr", "classTAT_1_1Tensor.html#a4a821f80cf5e33664f34e47f22f432c0", null ], + [ "range", "classTAT_1_1Tensor.html#a6c85845584812bec2c55800331b4be47", null ], + [ "range", "classTAT_1_1Tensor.html#ad60f09eb479c690d9c372f1da459d124", null ], + [ "range_", "classTAT_1_1Tensor.html#a30e8ff8d5766a8886c6a3f3a4c42a858", null ], + [ "range_", "classTAT_1_1Tensor.html#a9ebac36f39fc26deadf88ca716502d14", null ], + [ "rank", "classTAT_1_1Tensor.html#ad7be51a8158fb4020c1a80a845c1219f", null ], + [ "rank_by_name", "classTAT_1_1Tensor.html#a342a91282acfeb335a11a84d3a14f148", null ], + [ "reverse_edge", "classTAT_1_1Tensor.html#a9c2178813a02d94c2525f7f480d4b1e9", null ], + [ "same_shape", "classTAT_1_1Tensor.html#a08a76703eeeb86723b091d46103ace7c", null ], + [ "scalar_like", "classTAT_1_1Tensor.html#a7c9f23521132a4bb58ced353a064ce24", null ], + [ "set", "classTAT_1_1Tensor.html#ac7fa382fd250903d72418b8e10ed4a65", null ], + [ "set", "classTAT_1_1Tensor.html#a2c908557416bb3b3c72896320aa30106", null ], + [ "set_", "classTAT_1_1Tensor.html#a6cd159e8adeb70bae24ccf880969ef1b", null ], + [ "set_", "classTAT_1_1Tensor.html#a698855f69cc5184e41056174ffc613cb", null ], + [ "shape", "classTAT_1_1Tensor.html#a683101e09360c10b21dbef560e487972", null ], + [ "show", "classTAT_1_1Tensor.html#a5f350c294d755e5988a4d1d815770bca", null ], + [ "shrink", "classTAT_1_1Tensor.html#aa4395331cdff9dc9c15a9951ca6d8f92", null ], + [ "split_edge", "classTAT_1_1Tensor.html#a6d054dd1ae3acfcdb5b0a7def94bcaf4", null ], + [ "storage", "classTAT_1_1Tensor.html#adedfc4baf9558e05ab9da94d37b6d8f3", null ], + [ "storage", "classTAT_1_1Tensor.html#a8eb244caa7ee724600f4a5949758320a", null ], + [ "svd", "classTAT_1_1Tensor.html#a276a47e3b157dd1d62d07218acab669b", null ], + [ "to", "classTAT_1_1Tensor.html#ab102bd3898b58fff24b10ed07f3221e6", null ], + [ "trace", "classTAT_1_1Tensor.html#acb6ab0cdbad2209b90ead845d7a02290", null ], + [ "transform", "classTAT_1_1Tensor.html#ae873994e0ed16334f85febd570ab4117", null ], + [ "transform", "classTAT_1_1Tensor.html#a2a95bf05974e36d8109a1b0ec695edac", null ], + [ "transform_", "classTAT_1_1Tensor.html#ae59e57302105c9f01913c5d192cd4b8a", null ], + [ "transform_", "classTAT_1_1Tensor.html#a40ce89350a15cce99ea933f0a62a974d", null ], + [ "transpose", "classTAT_1_1Tensor.html#a31a18b6c3d6ff8c667dbde1338388163", null ], + [ "zero", "classTAT_1_1Tensor.html#a25052984c028c2913d77fc0ed079f02d", null ], + [ "zero", "classTAT_1_1Tensor.html#ae63a2323a01a71dda38b8856cb5a532b", null ], + [ "zero_", "classTAT_1_1Tensor.html#ac33a91d33b50b4159ed21152ebf1feee", null ], + [ "zero_", "classTAT_1_1Tensor.html#a8b80ea9306ee66a2cee7c6173d9c6d17", null ], + [ "zip_map", "classTAT_1_1Tensor.html#a74b320bfc31a5692eaa118068de62441", null ], + [ "zip_transform", "classTAT_1_1Tensor.html#a4d11b6ee7b8d2bf35fe2038d05f4122e", null ], + [ "zip_transform", "classTAT_1_1Tensor.html#a5180738e4b4771523693ae6270201ae5", null ], + [ "zip_transform_", "classTAT_1_1Tensor.html#a8bf096e43f41d0266f5ab090da3c085b", null ], + [ "zip_transform_", "classTAT_1_1Tensor.html#a5b64e23d3dcdd853a070ce15c66933f9", null ], + [ "contract_with_fuse", "classTAT_1_1Tensor.html#a78abf1d3461bd03857ed796a50e2faf6", null ], + [ "contract_without_fuse", "classTAT_1_1Tensor.html#a792023111c0e411d6355365767b02bbd", null ], + [ "Tensor", "classTAT_1_1Tensor.html#a837dcd9e4e283888ec9f3d11478d0f21", null ], + [ "trace_with_fuse", "classTAT_1_1Tensor.html#a77c4d047ed94c9ca482ad230cfb3ddc9", null ], + [ "trace_without_fuse", "classTAT_1_1Tensor.html#af86ca7345c67fba3dd2fc6598ec3cc03", null ] +]; \ No newline at end of file diff --git a/classTAT_1_1edge__segments__t-members.html b/classTAT_1_1edge__segments__t-members.html new file mode 100644 index 000000000..123cfc105 --- /dev/null +++ b/classTAT_1_1edge__segments__t-members.html @@ -0,0 +1,138 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::edge_segments_t< Symmetry, _is_pointer > Member List
+
+
+ +

This is the complete list of members for TAT::edge_segments_t< Symmetry, _is_pointer >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
conjugate() (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
conjugate() const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
conjugate_() (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
conjugated() const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
coord_by_index(const index_t &index) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
coord_by_point(const point_t &point) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
coord_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
dimension_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
edge_segments_t()=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
edge_segments_t(const edge_segments_t &edge)=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
edge_segments_t(edge_segments_t &&edge)=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
edge_segments_t(segments_t &&segments) (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
edge_segments_t(const segments_t &segments) (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
edge_segments_t(const symlist_t &symmetries)TAT::edge_segments_t< Symmetry, _is_pointer >inline
edge_segments_t(const Size dimension, const symmetry_t symmetry=symmetry_t())TAT::edge_segments_t< Symmetry, _is_pointer >inline
find_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
index_by_coord(const coord_t &coord) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
index_by_point(const point_t &point) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
index_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
is_not_pointer (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >static
is_pointer (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >static
operator=(const edge_segments_t &)=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
operator=(edge_segments_t &&)=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
point_by_coord(const coord_t &coord) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
point_by_index(const index_t &index) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
point_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
position_by_symmetry(const symmetry_t &symmetry) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
position_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
segments() const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
segments(position_t i) const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
segments_size() const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
segments_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
symlist_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >protected
symmetry_t typedef (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
total_dimension() const (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >inline
~edge_segments_t()=default (defined in TAT::edge_segments_t< Symmetry, _is_pointer >)TAT::edge_segments_t< Symmetry, _is_pointer >
+
+ + + + diff --git a/classTAT_1_1edge__segments__t.html b/classTAT_1_1edge__segments__t.html new file mode 100644 index 000000000..081aea9cc --- /dev/null +++ b/classTAT_1_1edge__segments__t.html @@ -0,0 +1,295 @@ + + + + + + + +TAT: TAT::edge_segments_t< Symmetry, _is_pointer > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::edge_segments_t< Symmetry, _is_pointer > Class Template Reference
+
+
+ + + + + + + + + + + + + + +

+Public Types

+using symmetry_t = Symmetry
 
+using segments_t = std::vector< std::pair< symmetry_t, Size > >
 
+using index_t = Size
 
+using position_t = Nums
 
+using point_t = std::pair< symmetry_t, Size >
 
+using coord_t = std::pair< position_t, Size >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

edge_segments_t (const edge_segments_t &edge)=default
 
edge_segments_t (edge_segments_t &&edge)=default
 
+edge_segments_toperator= (const edge_segments_t &)=default
 
+edge_segments_toperator= (edge_segments_t &&)=default
 
edge_segments_t (segments_t &&segments)
 
edge_segments_t (const segments_t &segments)
 
 edge_segments_t (const symlist_t &symmetries)
 construct the edge with list of symmetry, each size of them are 1 More...
 
 edge_segments_t (const Size dimension, const symmetry_t symmetry=symmetry_t())
 construct a trivial edge, only contain a single symmetry More...
 
+const segments_t & segments () const
 
+position_t segments_size () const
 
+const std::pair< symmetry_t, Size > & segments (position_t i) const
 
+coord_t coord_by_point (const point_t &point) const
 
+point_t point_by_coord (const coord_t &coord) const
 
+coord_t coord_by_index (const index_t &index) const
 
+index_t index_by_coord (const coord_t &coord) const
 
+point_t point_by_index (const index_t &index) const
 
+index_t index_by_point (const point_t &point) const
 
+auto find_by_symmetry (const symmetry_t &symmetry) const
 
+position_t position_by_symmetry (const symmetry_t &symmetry) const
 
+Size dimension_by_symmetry (const symmetry_t &symmetry) const
 
+void conjugate ()
 
+void conjugate_ ()
 
+edge_segments_t< symmetry_tconjugated () const
 
+edge_segments_t< symmetry_tconjugate () const
 
+Size total_dimension () const
 
+ + + + + +

+Static Public Attributes

+static constexpr bool is_pointer = _is_pointer
 
+static constexpr bool is_not_pointer = !is_pointer
 
+ + + +

+Protected Types

+using symlist_t = std::vector< symmetry_t >
 
+

Constructor & Destructor Documentation

+ +

◆ edge_segments_t() [1/2]

+ +
+
+
+template<typename Symmetry , bool _is_pointer = false>
+ + + + + +
+ + + + + + + + +
TAT::edge_segments_t< Symmetry, _is_pointer >::edge_segments_t (const symlist_t & symmetries)
+
+inline
+
+ +

construct the edge with list of symmetry, each size of them are 1

+ +
+
+ +

◆ edge_segments_t() [2/2]

+ +
+
+
+template<typename Symmetry , bool _is_pointer = false>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
TAT::edge_segments_t< Symmetry, _is_pointer >::edge_segments_t (const Size dimension,
const symmetry_t symmetry = symmetry_t() 
)
+
+inline
+
+ +

construct a trivial edge, only contain a single symmetry

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classTAT_1_1edge__segments__t.js b/classTAT_1_1edge__segments__t.js new file mode 100644 index 000000000..afec39ca7 --- /dev/null +++ b/classTAT_1_1edge__segments__t.js @@ -0,0 +1,39 @@ +var classTAT_1_1edge__segments__t = +[ + [ "coord_t", "classTAT_1_1edge__segments__t.html#a7d0f858c112aa15147883679da25912d", null ], + [ "index_t", "classTAT_1_1edge__segments__t.html#aa53a1e4c38217fd63493e8cd6225cd2d", null ], + [ "point_t", "classTAT_1_1edge__segments__t.html#a5cc4b58a0407d280ceafe0fc115d92bb", null ], + [ "position_t", "classTAT_1_1edge__segments__t.html#a7c351cfcc38594ae36335b45634f8118", null ], + [ "segments_t", "classTAT_1_1edge__segments__t.html#af025ea952c7528f5fcd74e93a854e304", null ], + [ "symlist_t", "classTAT_1_1edge__segments__t.html#a165a88ba1a52861f2dfd336adf1377e4", null ], + [ "symmetry_t", "classTAT_1_1edge__segments__t.html#aa74ca23ce9dca16534104ef058e8553b", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#a408044aaa2c1560abd482a9f7b0b24fe", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#aacc40508c2ae4b8984b9805f840e7443", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#a827f9aef9e2af30a816b10fb973b571c", null ], + [ "~edge_segments_t", "classTAT_1_1edge__segments__t.html#ab2077f78e5265de4eb0930c0a34d0277", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#a2256b7829e2f308fde951647b66f1a1d", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#a46565d2925e80212f433634822dcf84c", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#aab6178d4988af5ee6d59824e98f4091a", null ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html#a27296e058ee16bb7cb1568a7dd59af08", null ], + [ "conjugate", "classTAT_1_1edge__segments__t.html#afbb09efcd392350ceda8554778ce4b78", null ], + [ "conjugate", "classTAT_1_1edge__segments__t.html#a2b276559fe20588495633fea579da9e3", null ], + [ "conjugate_", "classTAT_1_1edge__segments__t.html#ae5cabec5a36749f09c998cfc0f5f5ce5", null ], + [ "conjugated", "classTAT_1_1edge__segments__t.html#ab128f2fbc1002716183a37f6009bd500", null ], + [ "coord_by_index", "classTAT_1_1edge__segments__t.html#a77531371ebfadcdcdc12cd4bd595162a", null ], + [ "coord_by_point", "classTAT_1_1edge__segments__t.html#a352866e7e39d994a660967d796e7d728", null ], + [ "dimension_by_symmetry", "classTAT_1_1edge__segments__t.html#a80eebcccccdc62cfc41347e267d742ac", null ], + [ "find_by_symmetry", "classTAT_1_1edge__segments__t.html#af61a690eac466543f0d07931acc98424", null ], + [ "index_by_coord", "classTAT_1_1edge__segments__t.html#a71a9e49e9dfb4db4f152698903b70215", null ], + [ "index_by_point", "classTAT_1_1edge__segments__t.html#a1b56647ca38cdca45ea5196af590c6b9", null ], + [ "operator=", "classTAT_1_1edge__segments__t.html#adecff4e840af838768f935b805957a40", null ], + [ "operator=", "classTAT_1_1edge__segments__t.html#a88d0c65c563dbfafb1f92092c9fada51", null ], + [ "point_by_coord", "classTAT_1_1edge__segments__t.html#a1865590a1fcf46ce6bbf04d1ec473246", null ], + [ "point_by_index", "classTAT_1_1edge__segments__t.html#a8a42ca4e69cd227386025801658f4a78", null ], + [ "position_by_symmetry", "classTAT_1_1edge__segments__t.html#a0538066f0787ea5486df3ef0dd82c45d", null ], + [ "segments", "classTAT_1_1edge__segments__t.html#a5326eac80904a69526a46036705dce56", null ], + [ "segments", "classTAT_1_1edge__segments__t.html#ad9d4fbd2cf67b241d353d0fd6576058d", null ], + [ "segments_size", "classTAT_1_1edge__segments__t.html#a9880d1baff8804478f964f6ea88ca6d9", null ], + [ "total_dimension", "classTAT_1_1edge__segments__t.html#a8f1927842a71a01e2559dd07db082317", null ], + [ "is_not_pointer", "classTAT_1_1edge__segments__t.html#abc20177dd046894f4c68fbe425859793", null ], + [ "is_pointer", "classTAT_1_1edge__segments__t.html#a0e7cc13bf4143df1b4fdfc793ad2de4e", null ] +]; \ No newline at end of file diff --git a/classTAT_1_1mdspan-members.html b/classTAT_1_1mdspan-members.html new file mode 100644 index 000000000..b631a9d70 --- /dev/null +++ b/classTAT_1_1mdspan-members.html @@ -0,0 +1,125 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT::mdspan< T, U > Member List
+
+
+ +

This is the complete list of members for TAT::mdspan< T, U >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
at(const Vector &indices) const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
at(const Vector &indices) (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
begin() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
begin() (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
const_iterator typedef (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >
const_iterator (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >
data() (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
data() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
dimensions() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
dimensions(Rank i) const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
end() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
end() (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
iterator typedef (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >
iterator (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >
leadings() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
leadings(Rank i) const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
mdspan(T *pointer, vector_t input_dimensions, vector_t input_leadings) (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
mdspan(T *pointer, vector_t ds) (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
rank() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
set_data(T *pointer) (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
size() const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
transpose(const Vector &plan) (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
transpose(const Vector &plan) const (defined in TAT::mdspan< T, U >)TAT::mdspan< T, U >inline
+
+ + + + diff --git a/classTAT_1_1mdspan.html b/classTAT_1_1mdspan.html new file mode 100644 index 000000000..bf24a3743 --- /dev/null +++ b/classTAT_1_1mdspan.html @@ -0,0 +1,197 @@ + + + + + + + +TAT: TAT::mdspan< T, U > Class Template Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TAT::mdspan< T, U > Class Template Reference
+
+
+ + + + +

+Classes

struct  iterator_general
 
+ + + + + +

+Public Types

+using iterator = iterator_general< false >
 
+using const_iterator = iterator_general< true >
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+Rank rank () const
 
+Size size () const
 
+const vector_t & leadings () const
 
+const vector_t & dimensions () const
 
+Size leadings (Rank i) const
 
+Size dimensions (Rank i) const
 
+T * data ()
 
+const T * data () const
 
+void set_data (T *pointer)
 
mdspan (T *pointer, vector_t input_dimensions, vector_t input_leadings)
 
mdspan (T *pointer, vector_t ds)
 
+template<typename Vector = vector_t>
const T & at (const Vector &indices) const
 
+template<typename Vector = vector_t>
T & at (const Vector &indices)
 
+const_iterator begin () const
 
+const_iterator end () const
 
+iterator begin ()
 
+iterator end ()
 
+template<typename Vector = vector_t>
mdspan< T, U > transpose (const Vector &plan)
 
+template<typename Vector = vector_t>
mdspan< const T, U > transpose (const Vector &plan) const
 
+ + + + + +

+Public Attributes

+friend const_iterator
 
+friend iterator
 
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classTAT_1_1mdspan.js b/classTAT_1_1mdspan.js new file mode 100644 index 000000000..d643beac1 --- /dev/null +++ b/classTAT_1_1mdspan.js @@ -0,0 +1,27 @@ +var classTAT_1_1mdspan = +[ + [ "iterator_general", "structTAT_1_1mdspan_1_1iterator__general.html", "structTAT_1_1mdspan_1_1iterator__general" ], + [ "const_iterator", "classTAT_1_1mdspan.html#a52c57caeed57f085d9932aa2280b3eb6", null ], + [ "iterator", "classTAT_1_1mdspan.html#ac311cce6f1321fb450250e142b8d70ee", null ], + [ "mdspan", "classTAT_1_1mdspan.html#ac097828dadeba5c92edd76c017094311", null ], + [ "mdspan", "classTAT_1_1mdspan.html#a2753e8255380cf59953eb09990f24e72", null ], + [ "at", "classTAT_1_1mdspan.html#a9ef7153bb629d74c39fccd5b6c8902fa", null ], + [ "at", "classTAT_1_1mdspan.html#acf09c350fd47372b791dd7334b597e4f", null ], + [ "begin", "classTAT_1_1mdspan.html#ae9bc18d6b6a7799e7906144a6a882fef", null ], + [ "begin", "classTAT_1_1mdspan.html#aa98e56eaad35f8df589b5f597606afda", null ], + [ "data", "classTAT_1_1mdspan.html#a98101ef68e29dfde264bb26ef064b0aa", null ], + [ "data", "classTAT_1_1mdspan.html#a4e6b561020d54870217306cb5102f1ab", null ], + [ "dimensions", "classTAT_1_1mdspan.html#ac82f4bd8cd4e1aca916bdb0b8959c063", null ], + [ "dimensions", "classTAT_1_1mdspan.html#a7678eccd24205cb333ae8b2b36978f04", null ], + [ "end", "classTAT_1_1mdspan.html#a71b4531adc0be9ef30cdfe01fe702e79", null ], + [ "end", "classTAT_1_1mdspan.html#a81fd4d271386fcb92e61944046da760a", null ], + [ "leadings", "classTAT_1_1mdspan.html#af7a4a82f9cd0608b8c5e6791a425c556", null ], + [ "leadings", "classTAT_1_1mdspan.html#a0daa35b4db739780cecdbf33d39dad76", null ], + [ "rank", "classTAT_1_1mdspan.html#aaaea04fb24fbcf7d59b46c31154c3b93", null ], + [ "set_data", "classTAT_1_1mdspan.html#a024b631995961cac09a2e58a7b808c1e", null ], + [ "size", "classTAT_1_1mdspan.html#a4f26571bcb3d36c5f18567992f9d2327", null ], + [ "transpose", "classTAT_1_1mdspan.html#a6a5ac2e536a5735cf3165273a8a3b608", null ], + [ "transpose", "classTAT_1_1mdspan.html#a744e85837a22cafc0eaaed81ce3e4c92", null ], + [ "const_iterator", "classTAT_1_1mdspan.html#a76138cc1a9af342af6cb79735f12e3bc", null ], + [ "iterator", "classTAT_1_1mdspan.html#a865f7fdc542d3bdfe18506e47ecabd2b", null ] +]; \ No newline at end of file diff --git a/classes.html b/classes.html new file mode 100644 index 000000000..66f6f6f1d --- /dev/null +++ b/classes.html @@ -0,0 +1,147 @@ + + + + + + + +TAT: Class Index + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class Index
+
+
+
A | C | D | E | F | H | I | M | N | O | Q | R | S | T | U
+
+
+
A
+
AbstractLattice (tetragono.abstract_lattice)
AbstractLatticeVirtualBond (tetragono.abstract_lattice)
AbstractState (tetragono.abstract_state)
AbstractStateHamiltonian (tetragono.abstract_state)
AbstractStatePhysicsEdge (tetragono.abstract_state)
AutoCmd (tetragono.shell)
AutoCmdMeta (tetragono.shell)
+
+
C
+
Config (tetragono.shell)
Configuration (tetragono.sampling_lattice.lattice)
ConfigurationPool (tetragono.sampling_lattice.lattice)
Copy (lazy)
Core (TAT)
Cut (TAT)
+
+
D
+
DirectSampling (tetragono.sampling_lattice.sampling)
DoubleLayerAuxiliaries (tetragono.auxiliaries.double_layer_auxiliaries)
+
+
E
+
Edge (TAT)
edge_bose_arrow_t (TAT)
edge_fermi_arrow_t (TAT)
edge_segments_t (TAT)
empty_list (TAT)
ErgodicSampling (tetragono.sampling_lattice.sampling)
ExactState (tetragono.exact_state)
+
+
F
+
FakeEdge (tetragono.common_tensor.tensor_toolkit)
FastName (TAT)
fermi (TAT)
+
+
H
+
hash< pair< Name, Name > > (std)
hash< TAT::FastName > (std)
hash< TAT::Symmetry< T... > > (std)
+
+
I
+
InternalName (TAT)
mdspan::iterator_general (TAT)
+
+
M
+
mdspan (TAT)
mpi_one_output_stream (TAT)
mpi_rank_output_stream (TAT)
mpi_t (TAT)
+
+
N
+
NameTraits (TAT)
NameTraits< FastName > (TAT)
NameTraits< std::string > (TAT)
NoCut (TAT)
Node (lazy)
+
+
O
+
Observer (tetragono.sampling_lattice.observer)
overloaded (TAT)
+
+
Q
+
Tensor::qr_result (TAT)
+
+
R
+
RelativeCut (TAT)
RemainCut (TAT)
remove_cvref (TAT)
+
+
S
+
Sampling (tetragono.sampling_lattice.sampling)
SamplingLattice (tetragono.sampling_lattice.lattice)
scope_resource (TAT)
SeedDiffer (tetragono.utility)
SignalHandler (tetragono.utility)
SimpleUpdateLattice (tetragono.simple_update_lattice)
SimpleUpdateLatticeEnvironment (tetragono.simple_update_lattice)
SingleLayerAuxiliaries (tetragono.auxiliaries.single_layer_auxiliaries)
Tensor::svd_result (TAT)
SweepSampling (tetragono.sampling_lattice.sampling)
Symmetry (TAT)
+
+
T
+
TailDictTree (tetragono.sampling_lattice.lattice)
Tensor (TAT)
TensorShape (TAT)
TetragonoCommandApp (tetragono.shell)
TetragonoScriptApp (tetragono.shell)
ThreeLineAuxiliaries (tetragono.auxiliaries.three_line_auxiliaries)
timer (TAT)
timer::timer_guard (TAT)
type_identity (TAT)
+
+
U
+
UnixColorCode (TAT)
+
+
+
+ + + + diff --git a/classlazy_1_1Copy-members.html b/classlazy_1_1Copy-members.html new file mode 100644 index 000000000..cd9b734a3 --- /dev/null +++ b/classlazy_1_1Copy-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
lazy.Copy Member List
+
+
+ +

This is the complete list of members for lazy.Copy, including all inherited members.

+ + + +
__call__(self, node)lazy.Copy
__init__(self)lazy.Copy
+
+ + + + diff --git a/classlazy_1_1Copy.html b/classlazy_1_1Copy.html new file mode 100644 index 000000000..ee5a3dee2 --- /dev/null +++ b/classlazy_1_1Copy.html @@ -0,0 +1,179 @@ + + + + + + + +TAT: lazy.Copy Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
lazy.Copy Class Reference
+
+
+ +

A helper class used to copy entire lazy node graph. + More...

+ + + + + + + + +

+Public Member Functions

def __init__ (self)
 Create a new Copy class used to copy entire lazy node graph. More...
 
def __call__ (self, node)
 Copy a lazy node into newly created graph and get result node. More...
 
+

Detailed Description

+

A helper class used to copy entire lazy node graph.

+

To copy a lazy node graph totolly, create a copy object first, copier = Copy(). Then copy node one by one in the correct order with respect to the dependence relationship by new_node = copier(old_node).

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + +
def lazy.Copy.__init__ ( self)
+
+ +

Create a new Copy class used to copy entire lazy node graph.

+ +
+
+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def lazy.Copy.__call__ ( self,
 node 
)
+
+ +

Copy a lazy node into newly created graph and get result node.

+

This function will replace the old upstream node to the new upstream node correctly based on the data stored in this copy object. So after copying, there should be no relation between old graph and new graph, only if the entire graph is copied completely.

+

Parameters

+

node : Node[T] The old lazy node from the old graph.

+

Returns

+

Node[T] The newly created lazy node in the new graph.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • lazy_graph/lazy/__init__.py
  • +
+
+
+ + + + diff --git a/classlazy_1_1Copy.js b/classlazy_1_1Copy.js new file mode 100644 index 000000000..41d46635e --- /dev/null +++ b/classlazy_1_1Copy.js @@ -0,0 +1,5 @@ +var classlazy_1_1Copy = +[ + [ "__init__", "classlazy_1_1Copy.html#a8464af7791aa79499178a9b731265ba2", null ], + [ "__call__", "classlazy_1_1Copy.html#a24b2a418a8c00fc6fb8ed54b602733a7", null ] +]; \ No newline at end of file diff --git a/classlazy_1_1Node-members.html b/classlazy_1_1Node-members.html new file mode 100644 index 000000000..b61f83b54 --- /dev/null +++ b/classlazy_1_1Node-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
lazy.Node Member List
+
+
+ +

This is the complete list of members for lazy.Node, including all inherited members.

+ + + + + + +
__bool__(self)lazy.Node
__call__(self)lazy.Node
__del__(self)lazy.Node
__init__(self, func, *args, **kwargs)lazy.Node
reset(self, value=None)lazy.Node
+
+ + + + diff --git a/classlazy_1_1Node.html b/classlazy_1_1Node.html new file mode 100644 index 000000000..8dc0a80e5 --- /dev/null +++ b/classlazy_1_1Node.html @@ -0,0 +1,273 @@ + + + + + + + +TAT: lazy.Node Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
lazy.Node Class Reference
+
+
+ +

Lazy node type, used to build a lazy evaluation graph, the value of it may be reset and when trying to get value of it, the needed node will be calculated automatically. + More...

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

def __del__ (self)
 The destructor of lazy node. More...
 
def __init__ (self, func, *args, **kwargs)
 Create a lazy node with given function and arguments. More...
 
def reset (self, value=None)
 Reset value of this node, it will refresh all its downstream. More...
 
def __bool__ (self)
 Check if the value of this node is already calculated. More...
 
def __call__ (self)
 Obtain the value of this node, it will calculate the value by self._func and cache it. More...
 
+

Detailed Description

+

Lazy node type, used to build a lazy evaluation graph, the value of it may be reset and when trying to get value of it, the needed node will be calculated automatically.

+

Constructor & Destructor Documentation

+ +

◆ __del__()

+ +
+
+ + + + + + + + +
def lazy.Node.__del__ ( self)
+
+ +

The destructor of lazy node.

+ +
+
+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def lazy.Node.__init__ ( self,
 func,
args,
** kwargs 
)
+
+ +

Create a lazy node with given function and arguments.

+

Parameters

+

func : Callable[..., T] The function used to calculate the value of this node. *args, **kwargs Arguments used by the function, if there is lazy node inside args, it will be calculated first when try to calculate this lazy node.

+ +
+
+

Member Function Documentation

+ +

◆ __bool__()

+ +
+
+ + + + + + + + +
def lazy.Node.__bool__ ( self)
+
+ +

Check if the value of this node is already calculated.

+

Returns

+

bool Return True if the value is already calculated, otherwise return False.

+ +
+
+ +

◆ __call__()

+ +
+
+ + + + + + + + +
def lazy.Node.__call__ ( self)
+
+ +

Obtain the value of this node, it will calculate the value by self._func and cache it.

+

Returns

+

T The calculated value of this node.

+ +
+
+ +

◆ reset()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def lazy.Node.reset ( self,
 value = None 
)
+
+ +

Reset value of this node, it will refresh all its downstream.

+

If the value is given, this node will be reset by this value.

+

Parameters

+

value : T | None, default=None Reset the cache of this node by the given value.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • lazy_graph/lazy/__init__.py
  • +
+
+
+ + + + diff --git a/classlazy_1_1Node.js b/classlazy_1_1Node.js new file mode 100644 index 000000000..50e81c8f7 --- /dev/null +++ b/classlazy_1_1Node.js @@ -0,0 +1,8 @@ +var classlazy_1_1Node = +[ + [ "__del__", "classlazy_1_1Node.html#a99d8242739e6786be31bf9b2f96e0ac3", null ], + [ "__init__", "classlazy_1_1Node.html#ad2d70d07992ad7422c187d36e8f9541d", null ], + [ "__bool__", "classlazy_1_1Node.html#a91eb47137cb177938cd6f9159a35ecba", null ], + [ "__call__", "classlazy_1_1Node.html#aca3e678611aef27ad9b50b86c103a9ff", null ], + [ "reset", "classlazy_1_1Node.html#a9bad86b4aca22463f6642a0c11072c69", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLattice-members.html b/classtetragono_1_1abstract__lattice_1_1AbstractLattice-members.html new file mode 100644 index 000000000..3e8684458 --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLattice-members.html @@ -0,0 +1,119 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLattice.html b/classtetragono_1_1abstract__lattice_1_1AbstractLattice.html new file mode 100644 index 000000000..f4ae453eb --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLattice.html @@ -0,0 +1,240 @@ + + + + + + + +TAT: tetragono.abstract_lattice.AbstractLattice Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.abstract_lattice.AbstractLattice Class Reference
+
+
+ +

The abstract lattice. + More...

+
+Inheritance diagram for tetragono.abstract_lattice.AbstractLattice:
+
+
+ + +tetragono.abstract_state.AbstractState +tetragono.sampling_lattice.lattice.SamplingLattice +tetragono.simple_update_lattice.SimpleUpdateLattice + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __init__ (self, abstract)
 Create abstract lattice from a given abstract state. More...
 
def virtual_bond (self)
 Get the virtual bond handler of this abstract lattice. More...
 
- Public Member Functions inherited from tetragono.abstract_state.AbstractState
def sites (self)
 Iterate on site. More...
 
def Edge (self)
 Get the edge type of this abstract state. More...
 
def Symmetry (self)
 Get the symmetry type of this abstract state. More...
 
def __init__ (self, Tensor, L1, L2)
 Create an abstract state. More...
 
def total_symmetry (self)
 Get the total symmetry of this abstract state. More...
 
def total_symmetry (self, value)
 Set the total symmetry of this abstract state. More...
 
def physics_edges (self)
 Get the physics edge handler for this abstract state. More...
 
def hamiltonians (self)
 Get the hamiltonian handler for this abstract state. More...
 
def site_number (self)
 Get the total site number of this abstract state. More...
 
def numpy_hamiltonian (self)
 Get the numpy array as the hamiltonian. More...
 
+ + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from tetragono.abstract_state.AbstractState
Tensor
 
L1
 
L2
 
attribute
 
data_version
 
+

Detailed Description

+

The abstract lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_lattice.AbstractLattice.__init__ ( self,
 abstract 
)
+
+ +

Create abstract lattice from a given abstract state.

+

Parameters

+

abstract : AbstractState The abstract state used to create abstract lattice.

+ +

Reimplemented in tetragono.simple_update_lattice.SimpleUpdateLattice, and tetragono.sampling_lattice.lattice.SamplingLattice.

+ +
+
+

Member Function Documentation

+ +

◆ virtual_bond()

+ +
+
+ + + + + + + + +
def tetragono.abstract_lattice.AbstractLattice.virtual_bond ( self)
+
+ +

Get the virtual bond handler of this abstract lattice.

+

Returns

+

The virtual bond handler.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/abstract_lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLattice.js b/classtetragono_1_1abstract__lattice_1_1AbstractLattice.js new file mode 100644 index 000000000..a1a8df87f --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLattice.js @@ -0,0 +1,5 @@ +var classtetragono_1_1abstract__lattice_1_1AbstractLattice = +[ + [ "__init__", "classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a9be811ba1a386e01f2ba6c72aaba00ca", null ], + [ "virtual_bond", "classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a409bd1d032f034066db21b15cbabc551", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLattice.png b/classtetragono_1_1abstract__lattice_1_1AbstractLattice.png new file mode 100644 index 0000000000000000000000000000000000000000..8e7fa68d2c2ec5152701d6be87a2abcf82ed2fc5 GIT binary patch literal 2296 zcmc&$X;4#H7Dg$+#)PgyX+cm*2{YKT2m%4wWDxBbh&0ef2&;6-uq13@Z9-Zpp_PVc zWS}8Puvsk#2x*BVgwRkB(P1%k5+Ecj5lFj}4b z*sxhaZKAepyL*MmZF!h3h^yvHxwmM{X44qw(kZL<_H0DC66=PNiy|}MSq^=16Dq0q zp?RtACB?6&MA8;omPq&u>+?&Fst(;0aQ1v? zIzx7qK;3Ii$4iyC_;!|uXahH~q~5C=HXQXx>8TK{PB$QoV!^WDVK$HPoh=Lz2xPdJ zZaHLo1{Fk9(X50uc9A z0dYjb{y##M0P4SVvi}k&_Wsc;O`A3M^+7o=4*}N-kz9hSRvn(WZ58R zU-oF--|^s*36)s4pj~^}weSf|mPayaBqwF2BT$NtvOr~DGhkgNyBC6cy&d-MC5ObZ zBcuhKGSKXur%=&~VKI^Q&Nma$4chXUn8hk+J(560{d-gCt!6WUn*DKRNnD$oe>Cqo2dux1^F&{q z0dx)6{G+xnz6S(Q#Q&|p|3m=ByjU!*)wY_oHZs}#cGCOA{}$Gj_n;->ZRCbMAfbVi z#bOsl^q)7SJ>LfQ7~*_BIML{$u&0!~zg?NTY(n;8^%yAa2E_B!O;sOSJC>>jYHj(|gOpDQugVj+ckQ%Y9~yMI8j(U}_^&P| z{A04Y5?2|z$mGrUk+)X5Mpypn+0t|0$HB|FDE94qmdR$*)EX#g2NYt~_L{&DKrIA$ zfACj7^7>an82tqNRwITDcw47nen3KtvxMEygB2MB`WJr!K4+{n+QFItswhbhXpARw zDNY^dD$EP%vfMA-48u2hOm5>!#&p<7!yAeK39Txy@mx8W8^3K2kz4pQ#Qb$=t8S0G zW5F`TI&KtWmg3DNisHAx_3SQqn=6wUjt8~rk--VyEV5I#&Ilv;9?$17nQ#Z|Y?6>< zD{_gOyfb1Dk1NPWM>SK=WY8e}#PO#xp!wQ;IB4U}HoQ_GXL#rzCMtYK6C2W&Mmx9o z%)EV>>yo4+tH8R1!h9(+F?bMK@!?fP=k?D0CcE3VN#?8F{?W3w12b&*iu5ED%h-C$ zo@APekn~JWc9YTu+f$L3S83BVed(+PlA?A_Z69pee(9~eC)xlJuH(bphOmhe1ru0A zhM!NlK(xP_?ap_2x&TB2sJdGL$8P|~d`;URG2q0{9ne~4AaQe@I{J!d1Ivg*eH@lV zBG5F|EsCHg< zTo+Ei&y$*j(oypBTp_VeBJz7yX9bW#jty*ALmvHSvi%3zjNNX`PH`XdqX8}Ft{HnB cqSpKR1-(mg!D$@$P0@n+BCfUmE$YF)04=MF(EtDd literal 0 HcmV?d00001 diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond-members.html b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond-members.html new file mode 100644 index 000000000..ca803e7e6 --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond-members.html @@ -0,0 +1,105 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.abstract_lattice.AbstractLatticeVirtualBond Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html new file mode 100644 index 000000000..8d4faf6b3 --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html @@ -0,0 +1,230 @@ + + + + + + + +TAT: tetragono.abstract_lattice.AbstractLatticeVirtualBond Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.abstract_lattice.AbstractLatticeVirtualBond Class Reference
+
+
+ +

Virtual bond handler for abstract lattice. + More...

+ + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner)
 Create virtual bond handler. More...
 
def __getitem__ (self, where)
 Get the virtual bond edge, or the virtual bond edges of a site. More...
 
def __setitem__ (self, where, value)
 Set the virtual bond edge. More...
 
+

Detailed Description

+

Virtual bond handler for abstract lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_lattice.AbstractLatticeVirtualBond.__init__ ( self,
 owner 
)
+
+ +

Create virtual bond handler.

+

Parameters

+

owner : AbstractLattice The owner of this handler.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_lattice.AbstractLatticeVirtualBond.__getitem__ ( self,
 where 
)
+
+ +

Get the virtual bond edge, or the virtual bond edges of a site.

+

Parameters

+

where : tuple[int, int, str] | tuple[int, int] The coordinate and the direction to find the bond.

+

Returns

+

Edge | dict[str, Edge] The virtual bond edge.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.abstract_lattice.AbstractLatticeVirtualBond.__setitem__ ( self,
 where,
 value 
)
+
+ +

Set the virtual bond edge.

+

Parameters

+

where : tuple[int, int, str] | str The coordinate and the direction to find the bond, if it is str, set this direction for every site to the same edge. value : ?Edge The virtual bond edge.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/abstract_lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.js b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.js new file mode 100644 index 000000000..dc1d29d68 --- /dev/null +++ b/classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.js @@ -0,0 +1,6 @@ +var classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond = +[ + [ "__init__", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a292b1dcbccb969402ffe54c7338105c0", null ], + [ "__getitem__", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a29e4b748ff1521fe85da1c03ad291d7b", null ], + [ "__setitem__", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#ad47d5137056eafddadde5007bb806ae4", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1abstract__state_1_1AbstractState-members.html b/classtetragono_1_1abstract__state_1_1AbstractState-members.html new file mode 100644 index 000000000..975ce25b1 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractState-members.html @@ -0,0 +1,117 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractState.html b/classtetragono_1_1abstract__state_1_1AbstractState.html new file mode 100644 index 000000000..aa1efa646 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractState.html @@ -0,0 +1,431 @@ + + + + + + + +TAT: tetragono.abstract_state.AbstractState Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.abstract_state.AbstractState Class Reference
+
+
+ +

Abstract state, which is used to construct other type of state. + More...

+
+Inheritance diagram for tetragono.abstract_state.AbstractState:
+
+
+ + +tetragono.abstract_lattice.AbstractLattice +tetragono.exact_state.ExactState +tetragono.sampling_lattice.lattice.SamplingLattice +tetragono.simple_update_lattice.SimpleUpdateLattice + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def sites (self)
 Iterate on site. More...
 
def Edge (self)
 Get the edge type of this abstract state. More...
 
def Symmetry (self)
 Get the symmetry type of this abstract state. More...
 
def __init__ (self, Tensor, L1, L2)
 Create an abstract state. More...
 
def total_symmetry (self)
 Get the total symmetry of this abstract state. More...
 
def total_symmetry (self, value)
 Set the total symmetry of this abstract state. More...
 
def physics_edges (self)
 Get the physics edge handler for this abstract state. More...
 
def hamiltonians (self)
 Get the hamiltonian handler for this abstract state. More...
 
def site_number (self)
 Get the total site number of this abstract state. More...
 
def numpy_hamiltonian (self)
 Get the numpy array as the hamiltonian. More...
 
+ + + + + + + + + + + +

+Public Attributes

Tensor
 
L1
 
L2
 
attribute
 
data_version
 
+

Detailed Description

+

Abstract state, which is used to construct other type of state.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractState.__init__ ( self,
 Tensor,
 L1,
 L2 
)
+
+ +

Create an abstract state.

+

Parameters

+

Tensor : type The tensor type of this abstract state. L1 : int The square system size of this abstract state. L2 : int The square system size of this abstract state.

+ +
+
+

Member Function Documentation

+ +

◆ Edge()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.Edge ( self)
+
+ +

Get the edge type of this abstract state.

+

Returns

+

type The edge type of this abstract state.

+ +
+
+ +

◆ hamiltonians()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.hamiltonians ( self)
+
+ +

Get the hamiltonian handler for this abstract state.

+

Returns

+

AbstractStateHamiltonian The hamiltonian handler.

+ +
+
+ +

◆ numpy_hamiltonian()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.numpy_hamiltonian ( self)
+
+ +

Get the numpy array as the hamiltonian.

+

It is dangerous to call this function on a large model.

+

Returns

+

np.ndarray The hamiltonian in numpy array format.

+ +
+
+ +

◆ physics_edges()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.physics_edges ( self)
+
+ +

Get the physics edge handler for this abstract state.

+

Returns

+

AbstractStatePhysicsEdge The physics edge handler.

+ +
+
+ +

◆ site_number()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.site_number ( self)
+
+ +

Get the total site number of this abstract state.

+

Returns

+

int The total site number.

+ +
+
+ +

◆ sites()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.sites ( self)
+
+ +

Iterate on site.

+

Yields

+

int, int The site of the system.

+ +
+
+ +

◆ Symmetry()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.Symmetry ( self)
+
+ +

Get the symmetry type of this abstract state.

+

Returns

+

type The symmetry type of this abstract state.

+ +
+
+ +

◆ total_symmetry() [1/2]

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractState.total_symmetry ( self)
+
+ +

Get the total symmetry of this abstract state.

+

Returns

+

Symmetry The total symmetry of this abstract state

+ +
+
+ +

◆ total_symmetry() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractState.total_symmetry ( self,
 value 
)
+
+ +

Set the total symmetry of this abstract state.

+

Parameters

+

value : ?Symmetry The total symmetry of this abstract state

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/abstract_state.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractState.js b/classtetragono_1_1abstract__state_1_1AbstractState.js new file mode 100644 index 000000000..bff741282 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractState.js @@ -0,0 +1,18 @@ +var classtetragono_1_1abstract__state_1_1AbstractState = +[ + [ "__init__", "classtetragono_1_1abstract__state_1_1AbstractState.html#addaa8c76d0a6ba0d4c36143f8640878d", null ], + [ "Edge", "classtetragono_1_1abstract__state_1_1AbstractState.html#a2ddd4b1e290bd238d667e763a113dbad", null ], + [ "hamiltonians", "classtetragono_1_1abstract__state_1_1AbstractState.html#a07bb0672a9d404dcab63644695aa640f", null ], + [ "numpy_hamiltonian", "classtetragono_1_1abstract__state_1_1AbstractState.html#a996374358c3ac113376aed6da6e59f41", null ], + [ "physics_edges", "classtetragono_1_1abstract__state_1_1AbstractState.html#a7f9f81d4e7e7822fae97b04d4eda3849", null ], + [ "site_number", "classtetragono_1_1abstract__state_1_1AbstractState.html#ab3c4714de4db51d56490cee41b340e3e", null ], + [ "sites", "classtetragono_1_1abstract__state_1_1AbstractState.html#aca5265b10f079ee2edfb21db662e121f", null ], + [ "Symmetry", "classtetragono_1_1abstract__state_1_1AbstractState.html#a2a054b0b40d58a71ac7ed39d9da2d032", null ], + [ "total_symmetry", "classtetragono_1_1abstract__state_1_1AbstractState.html#adc1580b7934e23f31263162e9d7f23da", null ], + [ "total_symmetry", "classtetragono_1_1abstract__state_1_1AbstractState.html#af462d02d8833dd5e10ca87babeefb84c", null ], + [ "attribute", "classtetragono_1_1abstract__state_1_1AbstractState.html#ae3570d18ff97f8ff4fc6f4583ed1d8fb", null ], + [ "data_version", "classtetragono_1_1abstract__state_1_1AbstractState.html#a6ae83448f6f84745f556c4273ccb69d4", null ], + [ "L1", "classtetragono_1_1abstract__state_1_1AbstractState.html#a213437f168a135ddbd5a0f02c6b7119e", null ], + [ "L2", "classtetragono_1_1abstract__state_1_1AbstractState.html#abf8665f78c57b79e48cd684f1a40f5c1", null ], + [ "Tensor", "classtetragono_1_1abstract__state_1_1AbstractState.html#ad2158959af1514b9f98c3dbb3518a24a", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1abstract__state_1_1AbstractState.png b/classtetragono_1_1abstract__state_1_1AbstractState.png new file mode 100644 index 0000000000000000000000000000000000000000..21f3dd9d699b15ce21c13b7ccf61cb1cc1ae9e27 GIT binary patch literal 2607 zcmcImdpK0<8eg&vF{EviK`xmHF}5kUDaw5%cM`I5*^SE>mnh@5Q=E~s86#2%HCs|f zM48EDn6Q)U$hA<)WzM4LaDk1Ar(T>YtYog=|V_u@clMx*qnl-PqWGx(jbVoXTk@LA|dxgTWBX ze69w$5^?U%9smRqUc=pU`(N{Ifo^$bb6cCsIr?bn%eS+XY6429V&zN}OvQszR9C*G=< z@6KuMoSw_Yr!mta&NBx~9)X(FwfrCF>rh0|N(L5K$Xn}iRqE||{6n&qO{6Q zLhp+{AVBHROP}O^C10txF(&!1_Y_}x#eJ5@iTVK{3RIfWJJ7e*y9W z6=7&N(^V=}#1Lq0lL!Fdj1p)CIAaoF|4@VhJXa|a+LDZIZ()FFbW{Xn1MbR00M1v~ z-?b>i>{p?kF)GT?A*Z}Z-&7yS0nFPsi-j^LMB>urBnOBMq6-q*Ka@%1#0R!I?>eA7 zB2%VW?3!wPXZrzr({ccR6qA}AZ6z{s_cXBm<^Q@;p8+4FTUmf-CUPTb4!oCqceKvwPHO){Fbew=Cw{yqdp2Eaq647mbKUWU2K}^tj3;`W)Hn zP3}(ahQB*RSBUtD>5#puN#(d-oQ(;iAsYro!5U3A-J%5wv6EjB=ys6g0?06Ny!#A(V`a;$LNTK&lOo(frZ2S zd>;gN$Lh;d7h-m@(@Tx4ngzmPX6gCQBE**U~^?2}LW;PLMMqL=z$t1oj2 z!yNUlL8g$7FTf`cO*A8rY-j#Ch)ItB70X(t;2P-x5J$hqZL^ZVL-iJS5r9F8M10d_ zOuaIs#olj{O(3*ILb_V(6qZn!pHR4}UtxdK@;ALQ&Bm&9)rtV31LFTL5&o5m8=WOI zl6M9}MsvgA6j^i|E3z~7&PtfYNG`RzNE3+B9>Sj+2q zlzp@lY=+NUIdqeb57y1LIL`@{d5X^CE|m>tnV610#S*sSO3guYSIb*X9!sFXujIJ) zu3mKzV}XN#=FvMw?0eKfaX}&CT9@tWdw$qZ0&hK8btm_19h_>pPqlCa&n+0*ky)=p zi&%fRfzR1R_(0*V*Yxbv8Ot+CBM18qW13M@!!g)x=czDUFO%<24D>5O}R= z+bzvX<)JdYrc(AYKeY_&3S!Wg?CyQIdU#68y{gta@NGx+wfYlBl~|5x_umwDR*f}a z8+FIkJ4SCIByZZJT?dcra#~Iixi@N#bhL&NLrS0hVzbgvSkRDHAs&;DFv^-6JUZZ= z*N1H}wDuR~p&@)Y@w=|1dFzO%l;UH0BkCRA^rSX8FXgru|3=9{7HP%k9_lllZltYA4`UC`(|c0WWMfse-x2lf7NND5-}62ZjK69{&*Tn*Os|g z=8!Pu?b`k+8F_nD7eD4BrbxRtsxbYOoGrEq{%&Do{)Jyf`JaYapqUzk<$%roKB zkv*jQL12}}gCH|pfv7F{7xD_mf#qdT`0}$BZyb}`m)2Ze2~o&v54+fZ1*5uN9^c49 z7(~tV0n4p!Q83WxGQ_D)D3n3%zkO)_gw=0)WvwK%(q(mPPiv$Pz!+;QY6n*MA*<*w RJD|Ti0JL?sp;`r;`zPdix9tD` literal 0 HcmV?d00001 diff --git a/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian-members.html b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian-members.html new file mode 100644 index 000000000..3b95b9001 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.abstract_state.AbstractStateHamiltonian Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html new file mode 100644 index 000000000..5f40170b9 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html @@ -0,0 +1,253 @@ + + + + + + + +TAT: tetragono.abstract_state.AbstractStateHamiltonian Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.abstract_state.AbstractStateHamiltonian Class Reference
+
+
+ +

Hamiltonian handler for abstract state. + More...

+ + + + + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner)
 Create a hamiltonian handler. More...
 
def __getitem__ (self, points)
 Get a hamitlonian for several points. More...
 
def __iter__ (self)
 Iterate on the hamiltonians. More...
 
def __setitem__ (self, arg, tensor)
 Set a hamiltonian for several points. More...
 
+

Detailed Description

+

Hamiltonian handler for abstract state.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStateHamiltonian.__init__ ( self,
 owner 
)
+
+ +

Create a hamiltonian handler.

+

Parameters

+

owner : AbstractState The owner of this handler.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStateHamiltonian.__getitem__ ( self,
 points 
)
+
+ +

Get a hamitlonian for several points.

+

Parameters

+

points : tuple[tuple[int, int, int] | tuple[int, int], ...] List of points which the hamiltonian applies on, every point is a tuple[int, int, int], the first two int is coordinate and the third is orbit index. The orbit index could be eliminate for the first orbit.

+

Returns

+

Tensor The hamiltonian tensor

+ +
+
+ +

◆ __iter__()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractStateHamiltonian.__iter__ ( self)
+
+ +

Iterate on the hamiltonians.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStateHamiltonian.__setitem__ ( self,
 arg,
 tensor 
)
+
+ +

Set a hamiltonian for several points.

+

Parameters

+

arg : tuple[tuple[int, int, int] | tuple[int, int], ...] | str If arg is tuple, it is list of points which the hamiltonian applies on, every point is a tuple[int, int, int] for full specification of a orbit or a tuple[int, int] to specify the first orbit of a site. If arg is str, it is used to set some common used kinds of hamiltonian. tensor : Tensor The hamiltonian tensor.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/abstract_state.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.js b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.js new file mode 100644 index 000000000..385695421 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.js @@ -0,0 +1,7 @@ +var classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian = +[ + [ "__init__", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a5cde2ef6661a20a2cabc1b9583aaccf2", null ], + [ "__getitem__", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#af276b6b7f597291dd75ad68f004bbd84", null ], + [ "__iter__", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a44e0b087e55a4b63c5d73446b1b4d8f4", null ], + [ "__setitem__", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#ae2e051ad78978e745c4e5359c70e4606", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge-members.html b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge-members.html new file mode 100644 index 000000000..834168718 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.abstract_state.AbstractStatePhysicsEdge Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html new file mode 100644 index 000000000..f113be640 --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html @@ -0,0 +1,255 @@ + + + + + + + +TAT: tetragono.abstract_state.AbstractStatePhysicsEdge Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.abstract_state.AbstractStatePhysicsEdge Class Reference
+
+
+ +

Physics edge handler for abstract state. + More...

+ + + + + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner)
 Create a physics edge handler. More...
 
def __getitem__ (self, l1l2o)
 Get the physics edge from abstract state. More...
 
def __iter__ (self)
 Iterate on physics edges. More...
 
def __setitem__ (self, l1l2o, edge)
 Set the physics edge for abstract state. More...
 
+

Detailed Description

+

Physics edge handler for abstract state.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStatePhysicsEdge.__init__ ( self,
 owner 
)
+
+ +

Create a physics edge handler.

+

Parameters

+

owner : AbstractState The owner of this handler.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStatePhysicsEdge.__getitem__ ( self,
 l1l2o 
)
+
+ +

Get the physics edge from abstract state.

+

Get a specific orbit edge from state.physics_edge[l1, l2, orbit]. Get all orbit of a site from state.physics_edge[l1, l2] as a dict from orbit index to edge.

+

Parameters

+

l1l2o : tuple[int, int, int] | tuple[int, int] The position of physics edge, if it is tuple[int, int], it is coordinate of the site, if the third int is given, the third int is the orbit index.

+

Returns

+

Edge | dict[int, Edge] If the orbit index is given, return the Edge of this orbit, if orbit is not specified, return a dict mapping orbit index to Edge.

+ +
+
+ +

◆ __iter__()

+ +
+
+ + + + + + + + +
def tetragono.abstract_state.AbstractStatePhysicsEdge.__iter__ ( self)
+
+ +

Iterate on physics edges.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.abstract_state.AbstractStatePhysicsEdge.__setitem__ ( self,
 l1l2o,
 edge 
)
+
+ +

Set the physics edge for abstract state.

+

Use state.physics_edge[...] = xxx to set all site as single oribt. Use state.physics_edge[l1, l2] = xxx to set a specific site to a single orbit site. Use state.physics_edge[l1, l2, orbit] = xxx to set the edge of specific orbit in some site.

+

Parameters

+

l1l2o : tuple[int, int, int] | tuple[int, int] | type(...) The coordinate and orbit index of the physics edge to be set, if l1l2o is ..., set single orbit for all site and set edges of all sites to the same edge. edge : ?Edge An edge or something that can be used to construct an edge.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/abstract_state.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.js b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.js new file mode 100644 index 000000000..84c0a1e2a --- /dev/null +++ b/classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.js @@ -0,0 +1,7 @@ +var classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge = +[ + [ "__init__", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#af1a3334c4c25a8b082f3be2edc4e908a", null ], + [ "__getitem__", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#a114cd456bc092078028bbc0a9fdec326", null ], + [ "__iter__", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ac1b9e4f95cb2126876f6ff807b8c1889", null ], + [ "__setitem__", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ab137cf85d9b34c4813e8215919e432f0", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries-members.html b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries-members.html new file mode 100644 index 000000000..512da5bcf --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries-members.html @@ -0,0 +1,112 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries Member List
+
+
+ +

This is the complete list of members for tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries, including all inherited members.

+ + + + + + + + + + + +
__getitem__(self, l1l2nc) (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
__init__(self, L1, L2, cut_dimension, normalize, Tensor) (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
__setitem__(self, l1l2nc, tensor) (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
copy(self, cp=None) (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
cut_dimension (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
hole(self, positions, *hint=None) (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
L1 (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
L2 (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
normalize (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
Tensor (defined in tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries)tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
+
+ + + + diff --git a/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html new file mode 100644 index 000000000..92a869186 --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html @@ -0,0 +1,144 @@ + + + + + + + +TAT: tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries Class Reference
+
+
+ + + + + + + + + + + + +

+Public Member Functions

+def copy (self, cp=None)
 
+def __init__ (self, L1, L2, cut_dimension, normalize, Tensor)
 
+def __setitem__ (self, l1l2nc, tensor)
 
+def __getitem__ (self, l1l2nc)
 
+def hole (self, positions, *hint=None)
 
+ + + + + + + + + + + +

+Public Attributes

L1
 
L2
 
cut_dimension
 
normalize
 
Tensor
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/auxiliaries/double_layer_auxiliaries.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.js b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.js new file mode 100644 index 000000000..c8c317c20 --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.js @@ -0,0 +1,13 @@ +var classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries = +[ + [ "__init__", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#ac7c0cf779cfdf44d9a8168f6dd1e616e", null ], + [ "__getitem__", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#a81259048630581045b794ae6f6f4c12e", null ], + [ "__setitem__", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#a2f2edd736ea66a5acbab51438e6b83ea", null ], + [ "copy", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#ab7c59ead155e2e60983cee831bf0da03", null ], + [ "hole", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#afdff0e7369ddccf7382359ee45502104", null ], + [ "cut_dimension", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#a8464363c416676b24e549b722916f506", null ], + [ "L1", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#a4670e01bce14019fe21a4e3a5c4f8fbc", null ], + [ "L2", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#a70f94be8604d8ee825ceae86c49ab30f", null ], + [ "normalize", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#af21177b396efddd7c1f7199045cd8eca", null ], + [ "Tensor", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html#aa56cc7d3b251956f98213e0498b49c3a", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries-members.html b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries-members.html new file mode 100644 index 000000000..622cf82fd --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries-members.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries Member List
+
+
+ +

This is the complete list of members for tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries, including all inherited members.

+ + + + + + + + + + + + +
__getitem__(self, l1l2) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
__init__(self, L1, L2, cut_dimension, normalize, Tensor) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
__setitem__(self, l1l2, tensor) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
copy(self, cp=None) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
cut_dimension (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
hole(self, position, *hint=None) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
L1 (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
L2 (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
normalize (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
replace(self, replacement, *hint=None) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
Tensor (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
+
+ + + + diff --git a/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html new file mode 100644 index 000000000..20f83e291 --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html @@ -0,0 +1,156 @@ + + + + + + + +TAT: tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries Class Reference
+
+
+
+Inheritance diagram for tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries:
+
+
+ + +tetragono.sampling_lattice.lattice.Configuration + +
+ + + + + + + + + + + + + + +

+Public Member Functions

+def copy (self, cp=None)
 
+def __init__ (self, L1, L2, cut_dimension, normalize, Tensor)
 
+def __setitem__ (self, l1l2, tensor)
 
+def __getitem__ (self, l1l2)
 
+def replace (self, replacement, *hint=None)
 
+def hole (self, position, *hint=None)
 
+ + + + + + + + + + + +

+Public Attributes

L1
 
L2
 
cut_dimension
 
normalize
 
Tensor
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/auxiliaries/single_layer_auxiliaries.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.js b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.js new file mode 100644 index 000000000..a9e3445fd --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.js @@ -0,0 +1,14 @@ +var classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries = +[ + [ "__init__", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#abd4e2a18154600e3e6237cb96eb65bad", null ], + [ "__getitem__", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a4278a741963d3d835a97ae37fbf8994e", null ], + [ "__setitem__", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a6d1cc4f5bb67ed37c7eb7f143b2fa87d", null ], + [ "copy", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#abfa5a452537607d4c7beb93b14578959", null ], + [ "hole", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#ada67b13b759250694ec6df6b1bd36923", null ], + [ "replace", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a5ea74d5e10cdb859d188af19e0700c98", null ], + [ "cut_dimension", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a40735271ee17979feb0cdde6a5d31ac3", null ], + [ "L1", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a6e0124988e719e977a1a88339e3f38df", null ], + [ "L2", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a0025b7d7dd4b76d17fc71dae51f42072", null ], + [ "normalize", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a6545d9be55eb70a2230f21d7eb613a82", null ], + [ "Tensor", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html#a8f5ea9b33be4a3ea601a94ba9a7e4378", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.png b/classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.png new file mode 100644 index 0000000000000000000000000000000000000000..0b3d0060477b4eeb32df6bb6e9342fea3d00e80b GIT binary patch literal 1253 zcmeAS@N?(olHy`uVBq!ia0y~yVC(|212~w0q(RZ4`#?$}z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-opX-6Ipd1Zok>AnjZ=btnRzfUHoR9_!cfpSf$0FN6BmOxhbBWz z!ek}wqGq$j-IXEyj8+-<=GZgrXn5^%>4#-sO{??qXGX2*OMYBAof{MrXBGL?`~|DK zwdpgh)|+`&!q2jUimcQhpHJC5Z`Rj`&+O%wAHBJ!qH@a&{r8(r=YFgz$T3KsHF;wp z*YR=z!~NAEW|M2>qVIgycoMzw?WsR@{%_AznC%XUa5g&pOS`A*_H5o;9J;$NZJhc# zR%!KOX07Uy`MA&*n^e+A9SaSRQ!o+I@xH)wYMyx(qJb|<&7?RQ@ib7ASFv)dm` zY+%xV*Lt!jFZSlO<~Hf{5&b9vHpYMqGcbbgIB_0O!6qrRD(jeEU&`s&4os}JYv zuTD)X41Rd_)GmjcJ)8N17uYElxv7Rvk(HY*k{_@kh~dqnF5UyW7Tn*uQ}~?ko_!qC zwab#prY%lgZ=HL)_i?rd!E>JebvO__oqq}Eh2xnU?msT_d0HoTolC@l;elg|2!ozL z5W@}!55@;fimVOXJwZ#R1Su??vX7@>f4_VK!-4IBK@1fK&iiLDK41VUVDIs25o5UT z4ph&g$kM=#VE|18{@5>(XiNO@`G+Kse4Q|1NrOtQxMHiyP6rP~PoM`pCIKBX=?PQ0 z$3(0DDld(D_I4#y4RGgsj{-YYP#ymgQ|;vx_jhkMt{h?(m(zy4gI+nznI_y6?vXr*rl_vqbTo4)hI6!RqBAMeeN8=TXZo~bjf zz*{c+N^9@QHD9(DO*GmdbT!WuKLNoeHRU{)@Vmf*R}Ml z;x6|zEZ^T7Vt99|lK2Xhn+uoN{0b@&)AfJb7H?SP+jVNGv*xMKWvUywQ=c4lecBge z3KT3Zn)F3%o@T(`xQ)T*X7hSalJ)=A^>oSm>$E@kPn>7PArwSgn*q^dRY))6QXz5?WlDtkNb zcmG-;@?LiOy{?;=ujKnKoU}x}@N(hwCEOL?!uD*vo?BW)vXexN7b7-oZ z1QrdRMU4}jCdDW$nV=#ru@o4C96W~&Y9#+N#ySS2<+beZ29`+-p00i_>zopr09W8M ArT_o{ literal 0 HcmV?d00001 diff --git a/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries-members.html b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries-members.html new file mode 100644 index 000000000..c53d05f88 --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries-members.html @@ -0,0 +1,108 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html new file mode 100644 index 000000000..91e3215be --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html @@ -0,0 +1,132 @@ + + + + + + + +TAT: tetragono.auxiliaries.three_line_auxiliaries.ThreeLineAuxiliaries Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.auxiliaries.three_line_auxiliaries.ThreeLineAuxiliaries Class Reference
+
+
+ + + + + + + + +

+Public Member Functions

+def __init__ (self, L2, Tensor, cut_dimension)
 
+def hole (self, l2)
 
+def __setitem__ (self, positions, tensor)
 
+ + + + + + + +

+Public Attributes

L2
 
Tensor
 
cut_dimension
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/auxiliaries/three_line_auxiliaries.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.js b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.js new file mode 100644 index 000000000..fb7c1a9c6 --- /dev/null +++ b/classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.js @@ -0,0 +1,9 @@ +var classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries = +[ + [ "__init__", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a2699c8f47b5d82024e0916e98a4a0cd2", null ], + [ "__setitem__", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a5dceaa53b767e19cdb02288be4d7324d", null ], + [ "hole", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a863061365c76881e6405433a20c0c2ca", null ], + [ "cut_dimension", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a72d98c1341d77469f3ba539786cea813", null ], + [ "L2", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a9352a41f627660013a8e59171e89fad1", null ], + [ "Tensor", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html#a5c186d6ac6237cbdfe3a7ecc2e22718e", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge-members.html b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge-members.html new file mode 100644 index 000000000..20684820d --- /dev/null +++ b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge-members.html @@ -0,0 +1,105 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.common_tensor.tensor_toolkit.FakeEdge Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html new file mode 100644 index 000000000..dece39f62 --- /dev/null +++ b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html @@ -0,0 +1,123 @@ + + + + + + + +TAT: tetragono.common_tensor.tensor_toolkit.FakeEdge Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.common_tensor.tensor_toolkit.FakeEdge Class Reference
+
+
+ + + + + + +

+Public Member Functions

+def __init__ (self, direction)
 
+def __getitem__ (self, x)
 
+ + + +

+Public Attributes

direction
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/common_tensor/tensor_toolkit.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.js b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.js new file mode 100644 index 000000000..da516e0e0 --- /dev/null +++ b/classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.js @@ -0,0 +1,6 @@ +var classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge = +[ + [ "__init__", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html#a49d078f31e54150268e79d5c97a7fbc9", null ], + [ "__getitem__", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html#a5916e8324ab3673a4f5ddc0065322a3c", null ], + [ "direction", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html#a2a63283029223a19f162ccd0445dd6d1", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1exact__state_1_1ExactState-members.html b/classtetragono_1_1exact__state_1_1ExactState-members.html new file mode 100644 index 000000000..e6ee39206 --- /dev/null +++ b/classtetragono_1_1exact__state_1_1ExactState-members.html @@ -0,0 +1,124 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.exact_state.ExactState Member List
+
+
+ +

This is the complete list of members for tetragono.exact_state.ExactState, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
__getstate__(self) (defined in tetragono.exact_state.ExactState)tetragono.exact_state.ExactState
__init__(self, abstract)tetragono.exact_state.ExactState
tetragono::abstract_state::AbstractState.__init__(self, Tensor, L1, L2)tetragono.abstract_state.AbstractState
__setstate__(self, state) (defined in tetragono.exact_state.ExactState)tetragono.exact_state.ExactState
attribute (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
data_version (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
Edge(self)tetragono.abstract_state.AbstractState
hamiltonians(self)tetragono.abstract_state.AbstractState
L1 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
L2 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
numpy_hamiltonian(self)tetragono.abstract_state.AbstractState
observe(self, positions, observer)tetragono.exact_state.ExactState
observe_energy(self)tetragono.exact_state.ExactState
physics_edges(self)tetragono.abstract_state.AbstractState
site_number(self)tetragono.abstract_state.AbstractState
sites(self)tetragono.abstract_state.AbstractState
Symmetry(self)tetragono.abstract_state.AbstractState
Tensor (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
total_symmetry(self)tetragono.abstract_state.AbstractState
total_symmetry(self, value)tetragono.abstract_state.AbstractState
update(self, total_step, approximate_energy)tetragono.exact_state.ExactState
vector (defined in tetragono.exact_state.ExactState)tetragono.exact_state.ExactState
+
+ + + + diff --git a/classtetragono_1_1exact__state_1_1ExactState.html b/classtetragono_1_1exact__state_1_1ExactState.html new file mode 100644 index 000000000..317a4ec1e --- /dev/null +++ b/classtetragono_1_1exact__state_1_1ExactState.html @@ -0,0 +1,333 @@ + + + + + + + +TAT: tetragono.exact_state.ExactState Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.exact_state.ExactState Class Reference
+
+
+ +

State for exact diagonalization. + More...

+
+Inheritance diagram for tetragono.exact_state.ExactState:
+
+
+ + +tetragono.abstract_state.AbstractState + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __setstate__ (self, state)
 
+def __getstate__ (self)
 
def __init__ (self, abstract)
 Create an exact state from abstract state. More...
 
def update (self, total_step, approximate_energy)
 Exact update the state by power iteration. More...
 
def observe (self, positions, observer)
 Observe the state. More...
 
def observe_energy (self)
 Observe the energy per site. More...
 
- Public Member Functions inherited from tetragono.abstract_state.AbstractState
def sites (self)
 Iterate on site. More...
 
def Edge (self)
 Get the edge type of this abstract state. More...
 
def Symmetry (self)
 Get the symmetry type of this abstract state. More...
 
def __init__ (self, Tensor, L1, L2)
 Create an abstract state. More...
 
def total_symmetry (self)
 Get the total symmetry of this abstract state. More...
 
def total_symmetry (self, value)
 Set the total symmetry of this abstract state. More...
 
def physics_edges (self)
 Get the physics edge handler for this abstract state. More...
 
def hamiltonians (self)
 Get the hamiltonian handler for this abstract state. More...
 
def site_number (self)
 Get the total site number of this abstract state. More...
 
def numpy_hamiltonian (self)
 Get the numpy array as the hamiltonian. More...
 
+ + + + + + + + + + + + + + +

+Public Attributes

vector
 
- Public Attributes inherited from tetragono.abstract_state.AbstractState
Tensor
 
L1
 
L2
 
attribute
 
data_version
 
+

Detailed Description

+

State for exact diagonalization.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.exact_state.ExactState.__init__ ( self,
 abstract 
)
+
+ +

Create an exact state from abstract state.

+

Parameters

+

abstract : AbstractState The abstract state used to be converted to exact state.

+ +
+
+

Member Function Documentation

+ +

◆ observe()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.exact_state.ExactState.observe ( self,
 positions,
 observer 
)
+
+ +

Observe the state.

+

If the oboserver is None and positions is an empty tuple, return normalization parameter $\langle\psi|\psi\rangle$.

+

Parameters

+

positions : tuple[tuple[int, int, int] | tuple[int, int], ...] The site and their orbits used to observe. observer : Tensor The operator used to observe.

+

Returns

+

float The observer result, which is not normalized.

+ +
+
+ +

◆ observe_energy()

+ +
+
+ + + + + + + + +
def tetragono.exact_state.ExactState.observe_energy ( self)
+
+ +

Observe the energy per site.

+

Returns

+

float The energy per site calculated by observing.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.exact_state.ExactState.update ( self,
 total_step,
 approximate_energy 
)
+
+ +

Exact update the state by power iteration.

+

Parameters

+

total_step : int The step of power iteration. approximate_energy : float The approximate energy of this system, the matrix used by power iteration is $a I - H$, so the lowest energy become the largest, to avoid high energy also gets large absolute value, $a$ should be bigger than $(Eh + El)/2$, where $Eh$ and $El$ is the largest and lowest eigenenergy of $H$.

+

Returns

+

float The result energy per site calculated by power iteration.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/exact_state.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1exact__state_1_1ExactState.js b/classtetragono_1_1exact__state_1_1ExactState.js new file mode 100644 index 000000000..931b27e56 --- /dev/null +++ b/classtetragono_1_1exact__state_1_1ExactState.js @@ -0,0 +1,10 @@ +var classtetragono_1_1exact__state_1_1ExactState = +[ + [ "__init__", "classtetragono_1_1exact__state_1_1ExactState.html#a74cb58effb55227719a2ef0b5fc87a8d", null ], + [ "__getstate__", "classtetragono_1_1exact__state_1_1ExactState.html#a383d4acbb3c6fadd4097a5a0e5d40dee", null ], + [ "__setstate__", "classtetragono_1_1exact__state_1_1ExactState.html#af9c5162082b0904b889f1c08ebd6d4b6", null ], + [ "observe", "classtetragono_1_1exact__state_1_1ExactState.html#a54f90bd26eac86c6f8df78baf364bc09", null ], + [ "observe_energy", "classtetragono_1_1exact__state_1_1ExactState.html#a70856ea49a4d149b61be482f1973a813", null ], + [ "update", "classtetragono_1_1exact__state_1_1ExactState.html#a8d6029895d29dad6c97cf18bcfe28eba", null ], + [ "vector", "classtetragono_1_1exact__state_1_1ExactState.html#ac2c6e784264c8837aa72cf7f2aad0893", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1exact__state_1_1ExactState.png b/classtetragono_1_1exact__state_1_1ExactState.png new file mode 100644 index 0000000000000000000000000000000000000000..9f13e7fefe369fea4cb2f08e21b7307a9b3c1320 GIT binary patch literal 853 zcmeAS@N?(olHy`uVBq!ia0vp^kAOIUgBeH~pNX6eq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ0o_M-AhEy=Vo%?XpY6YGa`)f1z{a3y( z$I9cO^Y-OS5q;V1UJBZ?TYgMWjhvR<>^f;(k7nQ`x8qYZJQpi_^W5BG?-``ewcgA% z*S7L$+KVSV-|utYE%)M?y|mw0w^pT)x8-Ma?X?GY@-@S5pI&VE`HHY_*I&zDGVz(q zFYl|iSUlT1eY3>oy)QR9TX#*f4QuaIJF0kw)&Jy-`PP<;CHl`zj=0uXzWS8v>5Kpq zu440Qp=!&wkv7wJ%)M0b-QtY0c;k3PUHFAoGm(8S# z4H0| k+eht@2yd~Wh~nP+*>inp6zc=1fyJ4fT|oTIU!6W&~XR-!7mX~ymVz2+P1 zR`t!&K2$U9TG;mT{cNq7+)r1Xy=ihvsW5iV$~Dm?VT)9DR=f??^o(yfF0}fYrl)># zE|c2KNnf77IPvKCcNNckm-vNVmp050Qq3&!>6~O@^-c&FZhE{8=O3{Z0#GBv;$$xt3E5z!121L>F#-b{ zRmp?19EvU3%?t&paHaE(-2Jsr;EK;Z>m+#=iwDPL(yO=sm@335bLaWBmnHSFkEGN; zZx70w*n5Ab$jOv5CKna+4*T3b6Y}M0$)0MN%v;6mU9VNTH%geNRc=}2)c?+*(DsCqfY+CljiD)}Q=(g=O8MIlZ<)Q!Iw0n6>n*!( zzlFzg|Gd(vl38~oee;ajSMDin&kHNP5@Yaeb!ge)rj;63_8i!9B&5XB$DOZOgzp`L zs7)t>-o5WDS$<^O=zd(H#Bgro)8~f;tL(bv?<*b1{}8m0sizqhijSY~mUQ9>KV~1h XL+}65(^qZ+^8kaVtDnm{r-UW|3-*YJ literal 0 HcmV?d00001 diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration-members.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration-members.html new file mode 100644 index 000000000..a66ced4ca --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration-members.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.lattice.Configuration Member List
+
+
+ +

This is the complete list of members for tetragono.sampling_lattice.lattice.Configuration, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
__delitem__(self, l1l2o)tetragono.sampling_lattice.lattice.Configuration
__getitem__(self, l1l2o)tetragono.sampling_lattice.lattice.Configuration
__init__(self, owner, cut_dimension)tetragono.sampling_lattice.lattice.Configuration
__init__(self, L1, L2, cut_dimension, normalize, Tensor) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
__setitem__(self, l1l2o, value)tetragono.sampling_lattice.lattice.Configuration
copy(self, cp=None)tetragono.sampling_lattice.lattice.Configuration
cut_dimension (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
export_configuration(self)tetragono.sampling_lattice.lattice.Configuration
hole(self, position, *hint=None) (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
holes(self)tetragono.sampling_lattice.lattice.Configuration
import_configuration(self, config)tetragono.sampling_lattice.lattice.Configuration
L1 (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
L2 (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
normalize (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
refresh_all(self)tetragono.sampling_lattice.lattice.Configuration
refresh_site(self, l1l2o)tetragono.sampling_lattice.lattice.Configuration
replace(self, replacement, *hint=None)tetragono.sampling_lattice.lattice.Configuration
site_valid(self, l1, l2)tetragono.sampling_lattice.lattice.Configuration
Tensor (defined in tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries)tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
valid(self)tetragono.sampling_lattice.lattice.Configuration
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html new file mode 100644 index 000000000..4dc2b6548 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html @@ -0,0 +1,606 @@ + + + + + + + +TAT: tetragono.sampling_lattice.lattice.Configuration Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.lattice.Configuration Class Reference
+
+
+ +

Configuration system for square sampling lattice. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.lattice.Configuration:
+
+
+ + +tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def copy (self, cp=None)
 Copy the configuration system. More...
 
def __init__ (self, owner, cut_dimension)
 Create configuration system for the given sampling lattice. More...
 
def site_valid (self, l1, l2)
 Check if specific site have valid configuration. More...
 
def valid (self)
 Check if all site have valid configuration. More...
 
def __getitem__ (self, l1l2o)
 Get the configuration of the specific site. More...
 
def __setitem__ (self, l1l2o, value)
 Set the configuration of the specific site. More...
 
def __delitem__ (self, l1l2o)
 Clear the configuration of the specific site. More...
 
def import_configuration (self, config)
 Import the configuration of all the sites. More...
 
def export_configuration (self)
 Export the configuration of all the sites. More...
 
def replace (self, replacement, *hint=None)
 Calculate $\langle s\psi\rangle$ with several $s$ replaced. More...
 
def refresh_site (self, l1l2o)
 Refresh the single site configuration, need to be called after lattice tensor changed. More...
 
def refresh_all (self)
 Refresh the configuration of all sites, need to be called after lattice tensor changed. More...
 
def holes (self)
 Get the lattice holes of this configuration. More...
 
- Public Member Functions inherited from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
+def __init__ (self, L1, L2, cut_dimension, normalize, Tensor)
 
+def hole (self, position, *hint=None)
 
+ + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
L1
 
L2
 
cut_dimension
 
normalize
 
Tensor
 
+

Detailed Description

+

Configuration system for square sampling lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.__init__ ( self,
 owner,
 cut_dimension 
)
+
+ +

Create configuration system for the given sampling lattice.

+

Parameters

+

owner : SamplingLattice The sampling lattice owning this configuration system. cut_dimension : int The cut dimension in single layer auxiliaries.

+ +
+
+

Member Function Documentation

+ +

◆ __delitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.__delitem__ ( self,
 l1l2o 
)
+
+ +

Clear the configuration of the specific site.

+

Parameters

+

l1l2o : tuple[int, int, int] The coordinate and orbit index of the site.

+ +
+
+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.__getitem__ ( self,
 l1l2o 
)
+
+ +

Get the configuration of the specific site.

+

Parameters

+

l1l2o : tuple[int, int, int] The coordinate and orbit index of the site.

+

Returns

+

EdgePoint | None The configuration of the specific site.

+ +

Reimplemented from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.__setitem__ ( self,
 l1l2o,
 value 
)
+
+ +

Set the configuration of the specific site.

+

Parameters

+

l1l2o : tuple[int, int, int] The coordinate and orbit index of the site. value : ?EdgePoint The configuration of this site.

+ +

Reimplemented from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries.

+ +
+
+ +

◆ copy()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.copy ( self,
 cp = None 
)
+
+ +

Copy the configuration system.

+

Parameters

+

cp : Copy, default=None The copy object used to copy the internal lazy node graph.

+

Returns

+

Configuration The new configuration system.

+ +

Reimplemented from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries.

+ +
+
+ +

◆ export_configuration()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.export_configuration ( self)
+
+ +

Export the configuration of all the sites.

+

Returns

+

array The configuration data of all the sites, three dimensional numpy array. non-negative for edge_index, -1 for not exist, -2 for None.

+ +
+
+ +

◆ holes()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.holes ( self)
+
+ +

Get the lattice holes of this configuration.

+

so called holes is <psi|s|partial_x psi> / <psi|s|psi> where psi is the state and s is configuration, x is each tensor.

+

Returns

+

list[list[Tensor]] The holes of this configuration.

+ +
+
+ +

◆ import_configuration()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.import_configuration ( self,
 config 
)
+
+ +

Import the configuration of all the sites.

+

Parameters

+

config : array The configuration data of all the sites, three dimensional numpy array. non-negative for edge_index, -1 for not exist, -2 for None.

+ +
+
+ +

◆ refresh_all()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.refresh_all ( self)
+
+ +

Refresh the configuration of all sites, need to be called after lattice tensor changed.

+ +
+
+ +

◆ refresh_site()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.refresh_site ( self,
 l1l2o 
)
+
+ +

Refresh the single site configuration, need to be called after lattice tensor changed.

+

Parameters

+

l1l2o : tuple[int, int, int] The coordinate and orbit index of the site.

+ +
+
+ +

◆ replace()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.replace ( self,
 replacement,
hint = None 
)
+
+ +

Calculate $\langle s\psi\rangle$ with several $s$ replaced.

+

Parameters

+

replacement : dict[tuple[int, int, int], ?EdgePoint] Replacement plan to modify $s$. hint : Any, default=None Hint passed to base class replace

+

Returns

+

Tensor | None $\langle s\psi\rangle$ with several $s$ replaced. If replace style is not implemented yet, None will be returned.

+ +

Reimplemented from tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries.

+ +
+
+ +

◆ site_valid()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.site_valid ( self,
 l1,
 l2 
)
+
+ +

Check if specific site have valid configuration.

+

Parameters

+

l1, l2 : int The coordinate of the specific site.

+

Returns

+

bool The validity of this single site configuration.

+ +
+
+ +

◆ valid()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.lattice.Configuration.valid ( self)
+
+ +

Check if all site have valid configuration.

+

Returns

+

bool The validity of this configuration system.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.js b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.js new file mode 100644 index 000000000..bc2e276c7 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.js @@ -0,0 +1,16 @@ +var classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a3b38513fee73afb58d6630ae82ecb060", null ], + [ "__delitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4fe67d27dfd9853183ae9d38bb8e3d08", null ], + [ "__getitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a2af731df5b07c3858a62a499cc2543ed", null ], + [ "__setitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a6b756f4e93d5bc025da50be32b65567f", null ], + [ "copy", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aee7d3b2e7b98f0d2f4a4c29b4782f9be", null ], + [ "export_configuration", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4216dd65372792477e7771b38db3d09c", null ], + [ "holes", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#affd58dbd77dea0af17f93809bfc7340b", null ], + [ "import_configuration", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a13c15f4941fa89fbbf5e7ad73982f60a", null ], + [ "refresh_all", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4adf53a7494cd2aab1862ae5e7445f89", null ], + [ "refresh_site", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad52508aa961509227955d5079c7b119f", null ], + [ "replace", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aa10dcad28ece36a404b112c5a27db0aa", null ], + [ "site_valid", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#afca7bcd2612c863cc94110bf42189605", null ], + [ "valid", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad0499922274724e33eaa3cb021cb526b", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.png b/classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.png new file mode 100644 index 0000000000000000000000000000000000000000..64b124631f29c5bb3c8499413fa752a3b2262476 GIT binary patch literal 1250 zcmeAS@N?(olHy`uVBq!ia0y~yVC(|212~w0q(RZ4`#?$}z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-opA=kho$YIjH?g>tlVicB4P!Z?QR5{7& z#N}Dk7}~W(@9BS)mqKphmsg0Xu55mG`eT#I+yj+LnSXBf*R(kwe`eB}zU0T1)44%& z?)}>IYUaLDy-epcPpczJM_>ERh}Tz*|DN*a^QWzMW~CN>oxlF_nUq^L`e&bg-u|ZO z?w%MK=`%B)rR2;x^ikI3%za(0)hEsRP2Y)feG6T)+^F_^u(k2LvznsUf{YIT((dWH zKAZOzhwko68>hb3nt1dg-_*4=#{FELtB&cl>T2@!Eznvm>&N@uY~@w=^R>#Z^HZXm z*9&Tzm#i%LtXrYt$$D>5fQRAMb#HF^ZC|QU9{SMN{EXl()>Y@~&2+g!UT&ZENLeYh z{cT|8r`(DgCx45)3Rl#eYBA|iOzaE$_Pu{pp9bz&HScXTYgY4#qSfUqOpXVCeqr-b z<>p53#N`fOtB>}H6xVNGn-zR*S@@NM+p1bEo3?q?xjgAOwM;~H`e~6(B9~_y>i#x8 z8~1wq^woW?8S)$!kZ4Q%VZ`vS_74LK!@k}L zOb3|j>YTV4*f}&AY!X70wlMs#bK+u9=TKw-rU{0EMxY8{l3)O)4H^kN_&-5u=@cf- zrC)LRu;#gZ8YO`tz$-?XIlPPiLh){{Q)r)FnNi z-<$3hP3QLisW7df{{J(HV?Q&MCm)r`JD1#Pwb^jy)PG`q4Dt__g-<-6cS==$>CC52 zhR1cp{-v3#XYZTgS$tOb#>G;B#` zsFA$uYnw*d+Qqf2eui$*i!NfAUNBuG_(fgMMV{7LPrlJ<^y%5MPcG-A_NpH>v~2LMSO!X7ZkG9cI*qda-@1M-%g^30;b-`g z8Cp{^bJoAS)AfAj+dA)mI~{y&rfr-tU3ar)z~ofH!xr|bTSVq`C5x8+Og`~Vi1`OY zxd-Eh&hK~g-&V}faA4mr{xwi@UF`IGeJ3xkzCX)}^@B>@u6GRTAKt9qQIdC8cmK)* w(-+yrEda)bJ4UoiEcMV_>fohWD_PILF+U*RLc018us~w)boFyt=akR{0GjbBpa1{> literal 0 HcmV?d00001 diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool-members.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool-members.html new file mode 100644 index 000000000..4bfc97f1e --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.lattice.ConfigurationPool Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html new file mode 100644 index 000000000..f1bd8c71b --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html @@ -0,0 +1,239 @@ + + + + + + + +TAT: tetragono.sampling_lattice.lattice.ConfigurationPool Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.lattice.ConfigurationPool Class Reference
+
+
+ +

Configuration pool for one sampling lattice and multiple configuration. + More...

+ + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner)
 Create configuration system pool for the given sampling lattice. More...
 
def wss (self, configuration, replacement)
 Calculate wss of the configuration with the given replacement. More...
 
def add (self, configuration)
 Add the configuration into pool, the configuration is not copied, it is inserted into a dict directly. More...
 
+ + + +

+Public Attributes

tree
 
+

Detailed Description

+

Configuration pool for one sampling lattice and multiple configuration.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.ConfigurationPool.__init__ ( self,
 owner 
)
+
+ +

Create configuration system pool for the given sampling lattice.

+

Parameters

+

owner : SamplingLattice The sampling lattice owning this configuration pool.

+ +
+
+

Member Function Documentation

+ +

◆ add()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.ConfigurationPool.add ( self,
 configuration 
)
+
+ +

Add the configuration into pool, the configuration is not copied, it is inserted into a dict directly.

+

Parameters

+

configuration : Configuration The configuration to be added.

+

Returns

+

Configuration If the configuration exists already, return the former configuration, otherwise return the input configuration.

+ +
+
+ +

◆ wss()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.ConfigurationPool.wss ( self,
 configuration,
 replacement 
)
+
+ +

Calculate wss of the configuration with the given replacement.

+

Parameters

+

configuration : Configuration The given configuration. replacement : dict[tuple[int, int, int], ?EdgePoint] Replacement plan to modify configuration.

+

Returns

+

Tensor $\langle s\psi\rangle$ with several $s$ replaced.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.js b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.js new file mode 100644 index 000000000..ff9a75dc9 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.js @@ -0,0 +1,7 @@ +var classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a634c8d53e46e9a84b8df8d42ae929063", null ], + [ "add", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a59bd03a95abc855ce8b31ee7d0a34231", null ], + [ "wss", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#af6fa0081907c8f9434d601399a931f1f", null ], + [ "tree", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a3387ade4313859b1b5bac7bc47a1addc", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice-members.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice-members.html new file mode 100644 index 000000000..c12c52eb6 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice-members.html @@ -0,0 +1,128 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.lattice.SamplingLattice Member List
+
+
+ +

This is the complete list of members for tetragono.sampling_lattice.lattice.SamplingLattice, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
__getitem__(self, l1l2)tetragono.sampling_lattice.lattice.SamplingLattice
__getstate__(self) (defined in tetragono.sampling_lattice.lattice.SamplingLattice)tetragono.sampling_lattice.lattice.SamplingLattice
__init__(self, abstract)tetragono.sampling_lattice.lattice.SamplingLattice
tetragono::abstract_state::AbstractState.__init__(self, Tensor, L1, L2)tetragono.abstract_state.AbstractState
__setitem__(self, l1l2, value)tetragono.sampling_lattice.lattice.SamplingLattice
__setstate__(self, state) (defined in tetragono.sampling_lattice.lattice.SamplingLattice)tetragono.sampling_lattice.lattice.SamplingLattice
apply_gradient(self, gradient, step_size)tetragono.sampling_lattice.lattice.SamplingLattice
attribute (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
bcast_lattice(self, root=0)tetragono.sampling_lattice.lattice.SamplingLattice
clear_symmetry(self)tetragono.sampling_lattice.lattice.SamplingLattice
data_version (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
Edge(self)tetragono.abstract_state.AbstractState
expand_dimension(self, new_dimension, epsilon)tetragono.sampling_lattice.lattice.SamplingLattice
hamiltonians(self)tetragono.abstract_state.AbstractState
L1 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
L2 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
lattice_dot(self, a=None, b=None)tetragono.sampling_lattice.lattice.SamplingLattice
numpy_hamiltonian(self)tetragono.abstract_state.AbstractState
physics_edges(self)tetragono.abstract_state.AbstractState
site_number(self)tetragono.abstract_state.AbstractState
sites(self)tetragono.abstract_state.AbstractState
Symmetry(self)tetragono.abstract_state.AbstractState
Tensor (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
total_symmetry(self)tetragono.abstract_state.AbstractState
total_symmetry(self, value)tetragono.abstract_state.AbstractState
virtual_bond(self)tetragono.abstract_lattice.AbstractLattice
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html new file mode 100644 index 000000000..7a6d08a45 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html @@ -0,0 +1,485 @@ + + + + + + + +TAT: tetragono.sampling_lattice.lattice.SamplingLattice Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.lattice.SamplingLattice Class Reference
+
+
+ +

Square lattice used for sampling. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.lattice.SamplingLattice:
+
+
+ + +tetragono.abstract_lattice.AbstractLattice +tetragono.abstract_state.AbstractState + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __setstate__ (self, state)
 
+def __getstate__ (self)
 
def __init__ (self, abstract)
 Create a sampling lattice from abstract lattice. More...
 
def __getitem__ (self, l1l2)
 Get the tensor at the given coordinate. More...
 
def __setitem__ (self, l1l2, value)
 Set the tensor at the given coordinate. More...
 
def expand_dimension (self, new_dimension, epsilon)
 Expand dimension of sampling lattice. More...
 
def lattice_dot (self, a=None, b=None)
 Calculate the dot of two lattice shape data. More...
 
def apply_gradient (self, gradient, step_size)
 Apply the gradient to the lattice. More...
 
def bcast_lattice (self, root=0)
 Bcast the lattice, to ensure the data keep the same across different process. More...
 
def clear_symmetry (self)
 Clear symmetry for the model. More...
 
- Public Member Functions inherited from tetragono.abstract_lattice.AbstractLattice
def virtual_bond (self)
 Get the virtual bond handler of this abstract lattice. More...
 
- Public Member Functions inherited from tetragono.abstract_state.AbstractState
def sites (self)
 Iterate on site. More...
 
def Edge (self)
 Get the edge type of this abstract state. More...
 
def Symmetry (self)
 Get the symmetry type of this abstract state. More...
 
def __init__ (self, Tensor, L1, L2)
 Create an abstract state. More...
 
def total_symmetry (self)
 Get the total symmetry of this abstract state. More...
 
def total_symmetry (self, value)
 Set the total symmetry of this abstract state. More...
 
def physics_edges (self)
 Get the physics edge handler for this abstract state. More...
 
def hamiltonians (self)
 Get the hamiltonian handler for this abstract state. More...
 
def site_number (self)
 Get the total site number of this abstract state. More...
 
def numpy_hamiltonian (self)
 Get the numpy array as the hamiltonian. More...
 
+ + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from tetragono.abstract_state.AbstractState
Tensor
 
L1
 
L2
 
attribute
 
data_version
 
+

Detailed Description

+

Square lattice used for sampling.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.__init__ ( self,
 abstract 
)
+
+ +

Create a sampling lattice from abstract lattice.

+

Parameters

+

abstract : AbstractLattice The abstract lattice used to create sampling lattice.

+ +

Reimplemented from tetragono.abstract_lattice.AbstractLattice.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.__getitem__ ( self,
 l1l2 
)
+
+ +

Get the tensor at the given coordinate.

+

Parameters

+

l1l2 : tuple[int, int] The coordinate.

+

Returns

+

Tensor The tensor at the given coordinate.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.__setitem__ ( self,
 l1l2,
 value 
)
+
+ +

Set the tensor at the given coordinate.

+

Parameters

+

l1l2 : tuple[int, int] The coordinate. value : Tensor The tensor used to set.

+ +
+
+ +

◆ apply_gradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.apply_gradient ( self,
 gradient,
 step_size 
)
+
+ +

Apply the gradient to the lattice.

+

Parameters

+

gradient : list[list[Tensor]] The gradient calculated by observer object. step_size : float The gradient step size.

+ +
+
+ +

◆ bcast_lattice()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.bcast_lattice ( self,
 root = 0 
)
+
+ +

Bcast the lattice, to ensure the data keep the same across different process.

+ +
+
+ +

◆ clear_symmetry()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.clear_symmetry ( self)
+
+ +

Clear symmetry for the model.

+

Returns

+

SamplingLattice The result lattice with NoSymmetry tensor(for bosonic system) or ParitySymmetry tensor(for fermionic system).

+ +
+
+ +

◆ expand_dimension()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.expand_dimension ( self,
 new_dimension,
 epsilon 
)
+
+ +

Expand dimension of sampling lattice.

+

If new_dimension equals to the origin dimension and epsilon is zero, this function will only fix the lattice gauge.

+

Parameters

+

new_dimension : int | float The new dimension, or the amplitude of dimension expandance. epsilon : float The relative error added into tensor.

+ +
+
+ +

◆ lattice_dot()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.lattice.SamplingLattice.lattice_dot ( self,
 a = None,
 b = None 
)
+
+ +

Calculate the dot of two lattice shape data.

+

If None is given, its own lattice data will be used.

+

Parameters

+

a, b : list[list[Tensor]] | None The lattice shape data.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.js b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.js new file mode 100644 index 000000000..6491cafde --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.js @@ -0,0 +1,13 @@ +var classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#aa2d2822ed9057548bbd4e47a47bb9d1a", null ], + [ "__getitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a33e33c11fb72f236c62476af5388abd1", null ], + [ "__getstate__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a76200f48cbe4b94e3f9a793158c14602", null ], + [ "__setitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a00d9ba01470fe063a7e6fcc906230334", null ], + [ "__setstate__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a9106bdd7506110fd707cb7f0846fd910", null ], + [ "apply_gradient", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#ac33e5b348b8fbc04d9ca8e10bcaf19a5", null ], + [ "bcast_lattice", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a3a96db0e6faf64e53a49a446cb7d8caa", null ], + [ "clear_symmetry", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a104933f247c75322ca13abdd8bcff5be", null ], + [ "expand_dimension", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a90757cd7737645b3adb58587e7c6ef70", null ], + [ "lattice_dot", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a1b3fc2a54744b7b6c62da5ea2c0d80af", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.png b/classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.png new file mode 100644 index 0000000000000000000000000000000000000000..3b5c994bf462dd600c8eb6259e07d1048e3f75ce GIT binary patch literal 1536 zcmb`HZ8Vg57{;Foy(m#bM|pX|Xv#+Nk_q)FWS+?mJ4q`gaw12e%t~IKS#4z#O{Qq| z;#nEw%n@>iu$a?Sh?+H+A!+uQ7}mQPgE2F9wEMx?&;8H2{@3rreSf*`bKkf8$v%3z z+jIc{(1VFy6ac`08vb>ymgXOM0@`cL*xxt6dueG&gTrI9Kha;^)zDXQI2@f@pOzce zQYqwPfTn2qb-xR600132>~$z05i|Z|Jb}5>(Ay=QJ)@?(8?m)z=0!HGzIBp>`ePY! zuWdnEDOn;*mc-JUGMz>i7OE$mQ-DtC3m(rVgM^hIv_ zxq~eAGjtG3rRA=%LkFj&N>Vhh=2Zi>*(A)%P4w|G*egOBWxhj#F-tOIw^STy!enKt zUo?FreLUgXzt)NjCbn$F&PiL_-(SzVhvOw9r=tAvaRy%6(o!Qgs47pTkp6-QZp6^d z?HbU^?$6zxuMeGPsZDWxHj5XW33a?r=@bJzoG*M!XF6P#NCNn64r0lCUV7`5JGCFi z1QL5P!!9uyc{56%J;qeqXG99nVkS|wDe@#Fazo_KG_av>D6XeTp7uvukc}+)dxMU$ z!tgTor5am3&j=goev?81To=KouEN&F_xgJxcAvIVR- z(io1wd=Y6ye9KYtxPE2q9c;li%+#ZKfCwDs>;F6`w$i~6mZ1QzgE8jobBv8P^nWHcqZ%pw3L;dX6T5gGUulDzd>_W>7`TX5WT(}96Y)#eQ9SzGkBdF&|( ziJvVR^I@!dmo%9QF`U}iDCHow4;{pyktozwC}1@&1ipmSiB_5CCApjCxt3NPFwaPSxhJQnn5@Rc^`@O)rcui4ch*V4xH=CJh zZ|YFmP-xn=$uUp;`YUT0)QDF+haJIPaU-hCvg+1^48lThY}RDu7JW&4N6AFbDcIG~ z1;OQHyFn$4kX#Vza3|=!JMnbSkg%&*I-|@Gf}K(HXN&V#7HRHURZw*x*J zaF=PoQ-OJDISwRh#*bHhV?&;x6cS9@Wqp0sT|k=&0)7h2)PFXHJS?6xl($^I#ML_8 zP)cgsvcUlBY_i_YZK@LiEbo+Wj62)Npi!v!8Lha1k;sKr{bi@eLw|Bln zSLS0(4kK*L$uHd_D|qCjqY!tc_4vs)%Z=`I5)xVAQ$drZ!p@wB7CXg<3e3{M&Vin^ z=j%sZYeZ&tW$3;pUD=u&39pfBM}nh7o%N&>&ap~gYN#pXv9)$K-f?}%1t+`ws+^E< z?i;0RMBjo@ITUe=aG=zKru?D^R~Zh|%gdm}o9r6VmRYX4`=ZT7TUy{mzSEdl@_VV8 z{k*tCUO8#xl2aWtLjv<1hh6LEv_kVrwW#UQ(@C2-$tgbIgesG@nzP}D+s;u7R4!k4 z3Oj!gXy3aR`J9wj(b`lv7`$lj(gdi{|3$udaaR$p=)S{@epYCFNSM(FC(XGAU~jV5 J^TVOn{sHYJ{$Bt9 literal 0 HcmV?d00001 diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree-members.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree-members.html new file mode 100644 index 000000000..0514bf46b --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.lattice.TailDictTree Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html new file mode 100644 index 000000000..d5d327477 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html @@ -0,0 +1,130 @@ + + + + + + + +TAT: tetragono.sampling_lattice.lattice.TailDictTree Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.lattice.TailDictTree Class Reference
+
+
+ +

A dict tree from the tail of list key. + More...

+ + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self)
 
+def __setitem__ (self, key, value)
 
+def __getitem__ (self, key)
 
+def nearest (self, key)
 
+def __contains__ (self, key)
 
+

Detailed Description

+

A dict tree from the tail of list key.

+

The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.js b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.js new file mode 100644 index 000000000..6bd558922 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.js @@ -0,0 +1,8 @@ +var classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html#a3d55e34efef65d53624353e68ae15871", null ], + [ "__contains__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html#a9de791d91c280a3432a1fcb8efbbf446", null ], + [ "__getitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html#a9f0faa8db257ad9deb4f34ddd44898f6", null ], + [ "__setitem__", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html#a485c0cd83f4e37081776fc2acc7701f2", null ], + [ "nearest", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html#af696b98f6a0ecc732782e3c2e6a6ded0", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer-members.html b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer-members.html new file mode 100644 index 000000000..f61611fbb --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer-members.html @@ -0,0 +1,124 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.observer.Observer Member List
+
+
+ +

This is the complete list of members for tetragono.sampling_lattice.observer.Observer, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
__call__(self, possibility, configuration)tetragono.sampling_lattice.observer.Observer
__enter__(self)tetragono.sampling_lattice.observer.Observer
__exit__(self, exc_type, exc_val, exc_tb)tetragono.sampling_lattice.observer.Observer
__init__(self, owner, *observer_set=None, enable_energy=False, enable_gradient=False, enable_natural_gradient=False, cache_natural_delta=None, cache_configuration=False, restrict_subspace=None, classical_energy=None)tetragono.sampling_lattice.observer.Observer
add_energy(self)tetragono.sampling_lattice.observer.Observer
add_observer(self, name, observers)tetragono.sampling_lattice.observer.Observer
cache_configuration(self, cache_configuration)tetragono.sampling_lattice.observer.Observer
cache_natural_delta(self, cache_natural_delta)tetragono.sampling_lattice.observer.Observer
enable_gradient(self)tetragono.sampling_lattice.observer.Observer
enable_natural_gradient(self)tetragono.sampling_lattice.observer.Observer
energy(self)tetragono.sampling_lattice.observer.Observer
gradient(self)tetragono.sampling_lattice.observer.Observer
natural_gradient_by_conjugate_gradient(self, step, error)tetragono.sampling_lattice.observer.Observer
natural_gradient_by_direct_pseudo_inverse(self, r_pinv, a_pinv, libraries)tetragono.sampling_lattice.observer.Observer
normalize_lattice(self)tetragono.sampling_lattice.observer.Observer
owner (defined in tetragono.sampling_lattice.observer.Observer)tetragono.sampling_lattice.observer.Observer
restrict_subspace(self, restrict_subspace)tetragono.sampling_lattice.observer.Observer
result(self)tetragono.sampling_lattice.observer.Observer
set_classical_energy(self, classical_energy=None)tetragono.sampling_lattice.observer.Observer
stability(self)tetragono.sampling_lattice.observer.Observer
total_energy(self)tetragono.sampling_lattice.observer.Observer
whole_result(self)tetragono.sampling_lattice.observer.Observer
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html new file mode 100644 index 000000000..876c3feea --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html @@ -0,0 +1,830 @@ + + + + + + + +TAT: tetragono.sampling_lattice.observer.Observer Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.observer.Observer Class Reference
+
+
+ +

Helper type for Observing the sampling lattice. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __enter__ (self)
 Enter sampling loop, flush all cached data in the observer object. More...
 
def __exit__ (self, exc_type, exc_val, exc_tb)
 Exit sampling loop, reduce observed values, used when running with multiple processes. More...
 
def __init__ (self, owner, *observer_set=None, enable_energy=False, enable_gradient=False, enable_natural_gradient=False, cache_natural_delta=None, cache_configuration=False, restrict_subspace=None, classical_energy=None)
 Create observer object for the given sampling lattice. More...
 
def set_classical_energy (self, classical_energy=None)
 Set another classical energy term to total energy. More...
 
def restrict_subspace (self, restrict_subspace)
 Set restrict subspace for observers. More...
 
def cache_configuration (self, cache_configuration)
 Enable caching the configurations into one pool. More...
 
def cache_natural_delta (self, cache_natural_delta)
 Set the cache folder to store deltas used in natural gradient. More...
 
def add_observer (self, name, observers)
 Add an observer set into this observer object, cannot add observer once observer started. More...
 
def add_energy (self)
 Add energy as an observer. More...
 
def enable_gradient (self)
 Enable observing gradient. More...
 
def enable_natural_gradient (self)
 Enable observing natural gradient. More...
 
def __call__ (self, possibility, configuration)
 Collect observer value from current configuration, the sampling should have distribution based on $|\langle\psi s\rangle|^2$, If it is not, a reweight argument should be passed with a non-one float number. More...
 
def stability (self)
 The stability of the sampling method. More...
 
def result (self)
 Get the observer result. More...
 
def whole_result (self)
 Get the observer result of the whole observer set. More...
 
def total_energy (self)
 Get the observed energy. More...
 
def energy (self)
 Get the observed energy per site. More...
 
def gradient (self)
 Get the energy gradient for every tensor. More...
 
def natural_gradient_by_conjugate_gradient (self, step, error)
 Get the energy natural gradient for every tensor. More...
 
def natural_gradient_by_direct_pseudo_inverse (self, r_pinv, a_pinv, libraries)
 Get the energy natural gradient for every tensor. More...
 
def normalize_lattice (self)
 Normalize the owner sampling lattice by the total ws measured during observing. More...
 
+ + + +

+Public Attributes

owner
 
+

Detailed Description

+

Helper type for Observing the sampling lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.__init__ ( self,
 owner,
observer_set = None,
 enable_energy = False,
 enable_gradient = False,
 enable_natural_gradient = False,
 cache_natural_delta = None,
 cache_configuration = False,
 restrict_subspace = None,
 classical_energy = None 
)
+
+ +

Create observer object for the given sampling lattice.

+

Parameters

+

owner : SamplingLattice The owner of this obsever object. observer_set : dict[str, dict[tuple[tuple[int, int, int], ...], Tensor]], optional The given observers to observe. enable_energy : bool, optional Enable observing the energy. enable_gradient : bool, optional Enable calculating the gradient. enable_natural_gradient : bool, optional Enable calculating the natural gradient. cache_natural_delta : str, optional The folder name to cache deltas used in natural gradient. cache_configuration : bool | str, optional Enable cache the configuration during observing, if it is a string, it will describe the cache strategy for the configuration, currently only "drop" is allowed. restrict_subspace : optional A function return bool to restrict sampling subspace. classical_energy : optional A function for the classical term of energy.

+ +
+
+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.__call__ ( self,
 possibility,
 configuration 
)
+
+ +

Collect observer value from current configuration, the sampling should have distribution based on $|\langle\psi s\rangle|^2$, If it is not, a reweight argument should be passed with a non-one float number.

+

Parameters

+

possibility : float the sampled weight used in importance sampling. configuration : Configuration The configuration system of the lattice.

+ +
+
+ +

◆ __enter__()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.__enter__ ( self)
+
+ +

Enter sampling loop, flush all cached data in the observer object.

+ +
+
+ +

◆ __exit__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.__exit__ ( self,
 exc_type,
 exc_val,
 exc_tb 
)
+
+ +

Exit sampling loop, reduce observed values, used when running with multiple processes.

+ +
+
+ +

◆ add_energy()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.add_energy ( self)
+
+ +

Add energy as an observer.

+ +
+
+ +

◆ add_observer()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.add_observer ( self,
 name,
 observers 
)
+
+ +

Add an observer set into this observer object, cannot add observer once observer started.

+

Parameters

+

name : str This observer set name. observers : dict[tuple[tuple[int, int, int], ...], Tensor] The observer map.

+ +
+
+ +

◆ cache_configuration()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.cache_configuration ( self,
 cache_configuration 
)
+
+ +

Enable caching the configurations into one pool.

+

Parameters

+

cache_configuration : bool | str The cache clean strategy of configuration cache.

+ +
+
+ +

◆ cache_natural_delta()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.cache_natural_delta ( self,
 cache_natural_delta 
)
+
+ +

Set the cache folder to store deltas used in natural gradient.

+

Parameters

+

cache_natural_delta : str | None The folder to store deltas.

+ +
+
+ +

◆ enable_gradient()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.enable_gradient ( self)
+
+ +

Enable observing gradient.

+ +
+
+ +

◆ enable_natural_gradient()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.enable_natural_gradient ( self)
+
+ +

Enable observing natural gradient.

+ +
+
+ +

◆ energy()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.energy ( self)
+
+ +

Get the observed energy per site.

+

Returns

+

tuple[float, float] The energy per site.

+ +
+
+ +

◆ gradient()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.gradient ( self)
+
+ +

Get the energy gradient for every tensor.

+

Returns

+

list[list[Tensor]] The gradient for every tensor.

+ +
+
+ +

◆ natural_gradient_by_conjugate_gradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.natural_gradient_by_conjugate_gradient ( self,
 step,
 error 
)
+
+ +

Get the energy natural gradient for every tensor.

+

Parameters

+

step : int conjugate gradient method step count. error : float conjugate gradient method expected error.

+

Returns

+

list[list[Tensor]] The gradient for every tensor.

+ +
+
+ +

◆ natural_gradient_by_direct_pseudo_inverse()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.natural_gradient_by_direct_pseudo_inverse ( self,
 r_pinv,
 a_pinv,
 libraries 
)
+
+ +

Get the energy natural gradient for every tensor.

+

Parameters

+

r_pinv, a_pinv : float Parameters control how to calculate pseudo inverse. libraries : list[str] The dynamic link libraries containing scalapack functions.

+

Returns

+

list[list[Tensor]] The gradient for every tensor.

+ +
+
+ +

◆ normalize_lattice()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.normalize_lattice ( self)
+
+ +

Normalize the owner sampling lattice by the total ws measured during observing.

+ +
+
+ +

◆ restrict_subspace()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.restrict_subspace ( self,
 restrict_subspace 
)
+
+ +

Set restrict subspace for observers.

+

Parameters

+

restrict_subspace A function return bool to restrict measure subspace.

+ +
+
+ +

◆ result()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.result ( self)
+
+ +

Get the observer result.

+

Returns

+

dict[str, dict[tuple[tuple[int, int, int], ...], tuple[float, float]]] The observer result of each observer set name and each site positions list.

+ +
+
+ +

◆ set_classical_energy()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.set_classical_energy ( self,
 classical_energy = None 
)
+
+ +

Set another classical energy term to total energy.

+

Parameters

+

classical_energy A function return energy with Configuration as input.

+ +
+
+ +

◆ stability()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.stability ( self)
+
+ +

The stability of the sampling method.

+ +
+
+ +

◆ total_energy()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.total_energy ( self)
+
+ +

Get the observed energy.

+

Returns

+

tuple[float, float] The total energy.

+ +
+
+ +

◆ whole_result()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.observer.Observer.whole_result ( self)
+
+ +

Get the observer result of the whole observer set.

+

It is useful if the deviation of the whole is wanted.

+

Returns

+

dict[str, tuple[float, float]] The observer result of each observer set name.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/observer.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.js b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.js new file mode 100644 index 000000000..bc9a6118b --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.js @@ -0,0 +1,25 @@ +var classtetragono_1_1sampling__lattice_1_1observer_1_1Observer = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa59ed339af790d2350c5d1d5e290b963", null ], + [ "__call__", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a662dadc370dbf1236fee5990e1a97ab3", null ], + [ "__enter__", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#adedc59e57abe60fb94a14b6815172e4d", null ], + [ "__exit__", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a3c4de7e03f1d10ad16e02e160ff9af3b", null ], + [ "add_energy", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#acfe813b4b57515c2edda7aeb2d818cd1", null ], + [ "add_observer", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ac190aeb1a169ca230412f5955cb550ea", null ], + [ "cache_configuration", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98730f2a5c3b5066f2b54dc16d7dd872", null ], + [ "cache_natural_delta", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae0d799fc50d80607d42d4d4eb8713142", null ], + [ "enable_gradient", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#abe57b26bcd77ec88d49c932d43d0373a", null ], + [ "enable_natural_gradient", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a8fe04b9cfe8183116cfca513a89826a1", null ], + [ "energy", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a73fc4732537a2a0bd270d7a34b244be1", null ], + [ "gradient", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae1c6035db5cb0d57dc7eb1eefb390023", null ], + [ "natural_gradient_by_conjugate_gradient", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a4c4ba912bfe0764f84a91c2951da518e", null ], + [ "natural_gradient_by_direct_pseudo_inverse", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a35dc33bd71e1297d5ae5c51164ac18b8", null ], + [ "normalize_lattice", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a30ecbf1ca4f5757406228a89df6d4164", null ], + [ "restrict_subspace", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ab5c5927e64f676a853288152d56844fc", null ], + [ "result", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#af5d570413871fd6c1036eee5bbd7be71", null ], + [ "set_classical_energy", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a7ffaebc98e02b2ffb23ecf1db00e496e", null ], + [ "stability", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98317e982660eb498f2d0073d067eb71", null ], + [ "total_energy", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa65c05ddf03ffc9f539d6ba58aa3288d", null ], + [ "whole_result", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a465775ad0ac85da1f9f2763efc46b64a", null ], + [ "owner", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a758601331dbba6042c2b354700b43b00", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling-members.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling-members.html new file mode 100644 index 000000000..83bc96007 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.sampling.DirectSampling Member List
+
+
+ +

This is the complete list of members for tetragono.sampling_lattice.sampling.DirectSampling, including all inherited members.

+ + + + + +
__call__(self)tetragono.sampling_lattice.sampling.DirectSampling
__init__(self, owner, cut_dimension, restrict_subspace, double_layer_cut_dimension) (defined in tetragono.sampling_lattice.sampling.DirectSampling)tetragono.sampling_lattice.sampling.DirectSampling
tetragono::sampling_lattice::sampling::Sampling.__init__(self, owner, cut_dimension, restrict_subspace)tetragono.sampling_lattice.sampling.Sampling
refresh_all(self)tetragono.sampling_lattice.sampling.DirectSampling
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html new file mode 100644 index 000000000..1c80060ba --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html @@ -0,0 +1,184 @@ + + + + + + + +TAT: tetragono.sampling_lattice.sampling.DirectSampling Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.sampling.DirectSampling Class Reference
+
+
+ +

Direct sampling. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.sampling.DirectSampling:
+
+
+ + +tetragono.sampling_lattice.sampling.Sampling + +
+ + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, owner, cut_dimension, restrict_subspace, double_layer_cut_dimension)
 
def refresh_all (self)
 Refresh the sampling system, need to be called after lattice tensor changed. More...
 
def __call__ (self)
 Get the next sampling configuration. More...
 
- Public Member Functions inherited from tetragono.sampling_lattice.sampling.Sampling
def __init__ (self, owner, cut_dimension, restrict_subspace)
 Create sampling object for the given sampling lattice. More...
 
+

Detailed Description

+

Direct sampling.

+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.DirectSampling.__call__ ( self)
+
+ +

Get the next sampling configuration.

+

Returns

+

tuple[float, Configuration] The sampled weight in importance sampling, and the result configuration system.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+ +

◆ refresh_all()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.DirectSampling.refresh_all ( self)
+
+ +

Refresh the sampling system, need to be called after lattice tensor changed.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/sampling.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.js b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.js new file mode 100644 index 000000000..ad0cf04cb --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.js @@ -0,0 +1,6 @@ +var classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a484bd9975b6e150b2608097437af2b14", null ], + [ "__call__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a6226011ce4975ebff1549eacac24fcf8", null ], + [ "refresh_all", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a2a4b02a05c41ac9a060dff64df5a1dcb", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.png b/classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.png new file mode 100644 index 0000000000000000000000000000000000000000..06f00842ef36d3e427670c752da14c59af4f9c4a GIT binary patch literal 1085 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!12~w0z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-op~+qP-ST-2f8-=4&t1xACaI_=PE)bu+^llabB3y? z-?6l%=gd8;j=N{8Tra5*RQIfH^L+UkNZqOZ%eq-*-*1t|N8V^|KE$AT-}j-*~F{#OmzGG|Jm~SM}0p%nV~YXZ0F`xmy}Xk z&Ia2Wmu8$jzx2D*b-Ov=f+ywt7X0}2^dF#-XJ*-7wpq_le*5xAfr#DhK>o-69ovOJ zEb}yaduvUQ#P>hX3NylNH9a@^dT#xC_La)o{P-^Zr}gL7lqIf@u{v8_vq){SU-NwN z`&@rO#+eoK{5E~PY)y&Rp}?1wXN$V{&w5SD)z7+C_c!;NPJeczNqG0pq$P^VmY%PSPt6FQw1k=eX!>Qj8KtGGR9E`z zFV@g~TD{||>dR>xcc}2r^sU~sS?=tb*`F>g-u`HFCV&4zmA~~Zk&~XNAP4fv<7?&= z^A(-@Db`RwLBE0F!8`-*1IMq2?_hnPbcX4}$B$Zfm_7)kG49}8%`m4WlELqg4ug84 zSi@wXGS3;T4^+-D6$qsV2x%^iuvlQZ49DYZ1M@p^BU|l%6T)@ zHvWs*k{$EA;FdpU&Tr0-*Vasa_pK~?gXF_~k$WY1pBJyOm6h*1ly3bhu|~V@Mx?LD z-<@+81>fM=HD&ML>ySjjnWG#SeSeMLB;5=AN6)8Sow-FiF>1%%NQbPQrmvs5_^Qo) z^?FZ5dAjWPPsR@)8os%{X7;8_mLJ@gJ~utBx$l1I;Z*rqQx9xQJbO#OxAyqD@5dgR znS7t2J5BY*mn(O)tDpQd(>c1eT-r`({nI778qeNEJ3n*JZRfvmT$p)=88CS;S$xQT zWPa#-+SaLT2b@8v<8@x2@&T3P!Upj>9M)ym7SAjVj;s3e8>nbsGKT;#a^sK!{bb$L f<>2TL|HHW6+-~WgEsK+Zd7Z)2)z4*}Q$iB}TmJq; literal 0 HcmV?d00001 diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling-members.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling-members.html new file mode 100644 index 000000000..33d936131 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.sampling.ErgodicSampling Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html new file mode 100644 index 000000000..6658208c1 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html @@ -0,0 +1,237 @@ + + + + + + + +TAT: tetragono.sampling_lattice.sampling.ErgodicSampling Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.sampling.ErgodicSampling Class Reference
+
+
+ +

Ergodic sampling. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.sampling.ErgodicSampling:
+
+
+ + +tetragono.sampling_lattice.sampling.Sampling + +
+ + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner, cut_dimension, restrict_subspace)
 Create sampling object for the given sampling lattice. More...
 
def refresh_all (self)
 Refresh the sampling system, need to be called after lattice tensor changed. More...
 
def __call__ (self)
 Get the next sampling configuration. More...
 
+ + + + + +

+Public Attributes

configuration
 
total_step
 
+

Detailed Description

+

Ergodic sampling.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.sampling.ErgodicSampling.__init__ ( self,
 owner,
 cut_dimension,
 restrict_subspace 
)
+
+ +

Create sampling object for the given sampling lattice.

+

Parameters

+

owner : SamplingLattice The owner of this sampling object. cut_dimension : int The cut dimension in single layer auxiliaries. restrict_subspace A function return bool to restrict sampling subspace.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.ErgodicSampling.__call__ ( self)
+
+ +

Get the next sampling configuration.

+

Returns

+

tuple[float, Configuration] The sampled weight in importance sampling, and the result configuration system.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+ +

◆ refresh_all()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.ErgodicSampling.refresh_all ( self)
+
+ +

Refresh the sampling system, need to be called after lattice tensor changed.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/sampling.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.js b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.js new file mode 100644 index 000000000..e2a9d750e --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.js @@ -0,0 +1,8 @@ +var classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a3a20d7e33555bdec48c35df7d1f8a401", null ], + [ "__call__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a712b8f4a0170f858e3217628b48974ee", null ], + [ "refresh_all", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a1f409d256befcd0b24b1dea6cac6bc9c", null ], + [ "configuration", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a298689c893c67f8841d03e9b8d89633d", null ], + [ "total_step", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a9d1307bd08bda86fd2a620988fefb47c", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.png b/classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.png new file mode 100644 index 0000000000000000000000000000000000000000..559a6ea42e4d7ff4f894f8b0adf235de4c354585 GIT binary patch literal 1095 zcmeAS@N?(olHy`uVBq!ia0y~yU^D}=12~w05UEc8yefzyz{Dd3lWm=yREn3@AS-B%MxZSJK5+tiOF-9f5v2$*%#D2%@+Dj%5j>l zax*5wdv5%sFMXETBH^YLMe|j@N{TK0=|AaLMeg7DTPiEvSNl$~@smGcaWVUK%XhpJraykqyw*Xy4Ael_{9^|U3Qet7+O-hN-*GwZ{a-gRZ}*VYBfD(8L(^qIHn zKF50Yg6%$&r1CPNr(d#NX(gL=`m=`T(}hcFzHBY+vI~!I} zeqq34UvpdNkDX^wv#sav?Au2_U5>Q6wd8sB?Xw>iZc~|hJp9_W+ShkfbeGRp-FjnM zm#sm*{Oz-@>sQ5Q@Bh4G@;dIaeDzw9dFs!bfkqr|HS?4zlG5>HcN49fq+)8rQy=mz z9OQ5DP|IC2^I zIWif{fHG=Z7;gZ@XJ24T5WdBb<0ReSo58$+GnW#{`pw&>1aSpYC~D> z&3opy=OP#HSaopnZ-!qzU3S&74*k2{e7ROATpuIt&>tq#do`QtS z+bs0$rfpnvKJnk5zj5cE-JjoGorIJSwm=iYyzc9PS1wkcn6`0$X_)ZNwKeyPq65R` zJe3R;eO6y@HBCYO>iS=@-T`vJSf68l*S_aLaEkfG>(``j7o@zEx@vfdP5$VUmA}kt z;%{^D#k&^S-l+DSayLHu_W$U)d|RJZPFY~%@nrG(wZU6>f4f!~dcMz)E_=Fen{#sc zy=|+1risa3OSHdpaa%5DnebuHTk*H`rp-TBbV1EF{&rs5_FLz!ZCkjF<*8xJ?Qd&~ zvr{c|w=dc=>0NaBy*JxxHS+D+pMD1>j_v|*;@JMIRwUi}WqQ%BzxwP<7oMN9btvr7 z`lHgoX8y-OX+szD>kqHg + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.sampling.Sampling Member List
+
+
+ +

This is the complete list of members for tetragono.sampling_lattice.sampling.Sampling, including all inherited members.

+ + + + +
__call__(self)tetragono.sampling_lattice.sampling.Sampling
__init__(self, owner, cut_dimension, restrict_subspace)tetragono.sampling_lattice.sampling.Sampling
refresh_all(self)tetragono.sampling_lattice.sampling.Sampling
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html new file mode 100644 index 000000000..164e43379 --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html @@ -0,0 +1,229 @@ + + + + + + + +TAT: tetragono.sampling_lattice.sampling.Sampling Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.sampling.Sampling Class Reference
+
+
+ +

Helper type for run sampling for sampling lattice. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.sampling.Sampling:
+
+
+ + +tetragono.sampling_lattice.sampling.DirectSampling +tetragono.sampling_lattice.sampling.ErgodicSampling +tetragono.sampling_lattice.sampling.SweepSampling + +
+ + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner, cut_dimension, restrict_subspace)
 Create sampling object for the given sampling lattice. More...
 
def refresh_all (self)
 Refresh the sampling system, need to be called after lattice tensor changed. More...
 
def __call__ (self)
 Get the next sampling configuration. More...
 
+

Detailed Description

+

Helper type for run sampling for sampling lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.sampling_lattice.sampling.Sampling.__init__ ( self,
 owner,
 cut_dimension,
 restrict_subspace 
)
+
+ +

Create sampling object for the given sampling lattice.

+

Parameters

+

owner : SamplingLattice The owner of this sampling object. cut_dimension : int The cut dimension in single layer auxiliaries. restrict_subspace A function return bool to restrict sampling subspace.

+ +

Reimplemented in tetragono.sampling_lattice.sampling.ErgodicSampling.

+ +
+
+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.Sampling.__call__ ( self)
+
+ +

Get the next sampling configuration.

+

Returns

+

tuple[float, Configuration] The sampled weight in importance sampling, and the result configuration system.

+ +

Reimplemented in tetragono.sampling_lattice.sampling.DirectSampling, tetragono.sampling_lattice.sampling.ErgodicSampling, and tetragono.sampling_lattice.sampling.SweepSampling.

+ +
+
+ +

◆ refresh_all()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.Sampling.refresh_all ( self)
+
+ +

Refresh the sampling system, need to be called after lattice tensor changed.

+ +

Reimplemented in tetragono.sampling_lattice.sampling.DirectSampling, tetragono.sampling_lattice.sampling.ErgodicSampling, and tetragono.sampling_lattice.sampling.SweepSampling.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/sampling.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.js b/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.js new file mode 100644 index 000000000..e259756ed --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.js @@ -0,0 +1,6 @@ +var classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a850e41d47affeb0306e3ce536e6d0a84", null ], + [ "__call__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a08dc5b51a621174d2daa89ed087c8d0e", null ], + [ "refresh_all", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#aae10aa761a54fee2aed73bbf017f86e6", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.png b/classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.png new file mode 100644 index 0000000000000000000000000000000000000000..c6b217a643b1777c6627a7dd24bfdbbdcf1c3aee GIT binary patch literal 1861 zcmd5-Yg7~077nC{#VQv?sKJunHu6%7RV2tme882^nna;chyi(t$RrRzf;SM50^Sgn zGFW55g0vA@s7XOc4NyQau#{2?C}1ZL5-T)@NuXQ;Bq6yIz3rc_)zzP!wPv5azjMA> zd-guxIUF+a$a))$4GM)?PY4M*jzXbDh)-UNMl5D%%a_RTI{E$ZV3Wy&xWCLUo-Mog zG2*>=ySuxsI8rPUuFX153_~G{%+KS8;k!|&HIE2E2g7qL;0bw#qGMx`ybtzJn?TaW zU81`#SC_M+d=BSq0{G>Rlv+cvrSF!KIJc6x*P{z8ZI)G6(6!|o*W2W*e|F$BKjAt@|BNY8ezZaNU|5`-w`w%9I(52S@wr=~4n{S;tO}!S z81AS_xvS|~zzjOXzE78Kl9HQ>En|ApwATYx6O_dg$H)q$@L2@D^Kd%Hps12asAX?_ z*lDUz@N8jLp_7M*+?{%w15Zv2B;Hyhb4hQX%iHCNp1u?CL2h2b7b8<8r918CFzie4 zQmXvt$Is}1r=55Modfss`zKtvnybR`Ll$ZG%IVy=0b$d`#rw76^rLN1GHX6_n5BIM z9}d(OjHTm5>s&og7~Mor`FLuk^=)JL{KWW%9kQk0GROf2v1rq^bI(~aUNWU7P55iB zx8945=?IZ{<*vNx6B+HbxWHdv9b4omc)Rm{qy54>ssH}FEhd7EFPC|=5lKZ@J9s{f zQuq`Y@QKvXi+S|50ke)5sBLv0m=pO?*)6z8Bc9uRYtTVc8DXx}pLFaGP2Kfc5Bas8 zT`edpd-C_fP4?si7A9Y$Pd5sfQ&|ntLl#yY7XJ^ow|-*A^J|duk-MwNwZ)b;IqQ&W zAFxO}i1gcSYUh_ox>g-lF9_e>h+k)AKj&aBm*r&P3lhcL$(N+=*q^g}KPw$kW_b|n zN0dUeRSUWKVBk&cf5UVK_iS@A4@l${_ICgmJXQG1PnXLwFntUI-hH)~u~q-lzUx9L z$Mr@1^bVmEw~wgg;a0eK~4L}e{kX%IbBU#N*RWE6q0Ha zV~+@nlY2J%yH3iuG!S5HKLNJP&&B@QzT|v41f&_`fr>)-S2XOa8DFT zY8J5r8aF29&#PvsZP)GF7_#{6dbFku_BSRk$LkblJnl$k&sF{T%#i7&=Od$q zs<%iEv3**BI*a+0N>0^eL4zQDzhpX2aCvqkLkO`;i^3iWq<1t?*84A-HG3P;?3r(< z%Q2Px1riR6E6ai&f4rhvv@28V4gj*~woHw<0?wX(SWA0vD+l&_&*wq&oqq?h0eAvrbo`wdkK zi@xc%A(t(q1`p|U#)TrNGAq+qt*DyNYF~xKD(eaF2j5InZ~8evL_6$R2-j1I|731v zbY*5TZ*X7w9ufXjO|_$K5fnq$*kzF6`ce`&OF0?Y^3SMF4RiHP5%%qgVJh>B(bTg$ z=G{alTQzI+JiaMlXm{D1%`>6v60W;`CgV1c>;th0 z$4*A2@0TfvBLaMaK5lqtB8AuagZQd?+>{Lj9=R8Fm9{hxtk3SeOao_|TWFx+hslfD zP(nrzb~~FtR|kWMRd}8tVJJ3q@AIV;wLa;QMq=Bm)%_R(_5cIdoV~~B*Ko*@LIPcV zj^DYPo%Rm3p5Jxl3>WSb3*Q#06i3==WA6BR|F6bsJlXtoEhmUuU8( + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.sampling_lattice.sampling.SweepSampling Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html b/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html new file mode 100644 index 000000000..3feb9dc8c --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html @@ -0,0 +1,191 @@ + + + + + + + +TAT: tetragono.sampling_lattice.sampling.SweepSampling Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.sampling_lattice.sampling.SweepSampling Class Reference
+
+
+ +

Sweep sampling. + More...

+
+Inheritance diagram for tetragono.sampling_lattice.sampling.SweepSampling:
+
+
+ + +tetragono.sampling_lattice.sampling.Sampling + +
+ + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, owner, cut_dimension, restrict_subspace, hopping_hamiltonians)
 
def __call__ (self)
 Get the next sampling configuration. More...
 
def refresh_all (self)
 Refresh the sampling system, need to be called after lattice tensor changed. More...
 
- Public Member Functions inherited from tetragono.sampling_lattice.sampling.Sampling
def __init__ (self, owner, cut_dimension, restrict_subspace)
 Create sampling object for the given sampling lattice. More...
 
+ + + +

+Public Attributes

configuration
 
+

Detailed Description

+

Sweep sampling.

+

Member Function Documentation

+ +

◆ __call__()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.SweepSampling.__call__ ( self)
+
+ +

Get the next sampling configuration.

+

Returns

+

tuple[float, Configuration] The sampled weight in importance sampling, and the result configuration system.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+ +

◆ refresh_all()

+ +
+
+ + + + + + + + +
def tetragono.sampling_lattice.sampling.SweepSampling.refresh_all ( self)
+
+ +

Refresh the sampling system, need to be called after lattice tensor changed.

+ +

Reimplemented from tetragono.sampling_lattice.sampling.Sampling.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/sampling_lattice/sampling.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.js b/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.js new file mode 100644 index 000000000..5a96fa9ce --- /dev/null +++ b/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.js @@ -0,0 +1,7 @@ +var classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling = +[ + [ "__init__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#ae595916e66f42dd8e5dc1ca6df3a5e52", null ], + [ "__call__", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a4dc433cbfc80e6b30085c24b34419225", null ], + [ "refresh_all", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a61de64b6038599e05d9adedd0dddf009", null ], + [ "configuration", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#ab1482b3d3f536a8c5e15b8c08b072c08", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.png b/classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.png new file mode 100644 index 0000000000000000000000000000000000000000..1646d0622cab16483bb5c4414fdde19a3d1821ec GIT binary patch literal 1101 zcmeAS@N?(olHy`uVBq!ia0y~yU^D=-12~w0ZUz+myp4<=1TgLag#7~~H^jvl9taw`1 z<_N{OIgx*Fd|7q-G>^_YJImT|Pp#wON3P5N11f1dyy4!}XS4eDu6TGf@JCLk=ri*p zuUUJR0X5G}^xk~Obk*f`iD9OmTJ4i^w(w@FtPPLvDu22^JK}HC`Z-o>_r}MbTXLD{ z&!gze-_LsnnbxS@e3xjRyX>M;pV#^78w)C~Z%~=~IFO#{Vd6yb#z+roBVB# zIR}r{tdh;_w|PIw+dJ>=r2ZpoMdZ%_4OquBd5K=Fr)Sp1(;u`wFEzG5`nScsEjE0o z%GQij9j{{V{Tj@kyB6x}dB*<9Jil*)`|9jvd%nC}yTkr%p{LiSd=;L_D(s0fR4h3T ztDJO{Q1j$dJ6v?m@`UAcMTURgbqq`mhKCFq3hU|)88#$>SZe!$tiVGC4C0C64b28T z2OK5X9w_iI7YMX5T5ud@07eo6A5fY-QG!zG|JOE53E~R!%H$DpU@&k(v*%6Q%>4T$ z1(#l(4CUX`!JKi~cb2(vgZH|{RgdcL8#IWyA7-eD+1C|)boPpUKZ?@JcKXw&6_>j*z5Yf^=yB1G?Cl-M9%h{mwbhjx9_lAuaHmmw$*}RVT zr5oOh@4j`9^>pl}8~0B=+sPvCzv}i0vC4a@)6;I>QkCzFo_O`_(=FanQ?j2u6=Jy6 zbA;jOi_{-e8Tj@H@9*3txZnKE4PVB0nW;JJx97ZK$out(q1?t`&DFyUw``(fjh`;{ zj~A-{)GB)WTX`4DgL3p3{%tlt$ji}7^X>=s78(1dTSqq~1M@zEr>mdKI;Vst0O4`_ Aq5uE@ literal 0 HcmV?d00001 diff --git a/classtetragono_1_1shell_1_1AutoCmd-members.html b/classtetragono_1_1shell_1_1AutoCmd-members.html new file mode 100644 index 000000000..cee974474 --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmd-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.shell.AutoCmd Member List
+
+
+ +

This is the complete list of members for tetragono.shell.AutoCmd, including all inherited members.

+ + + +
__new__(cls, name, bases, attrs) (defined in tetragono.shell.AutoCmdMeta)tetragono.shell.AutoCmdMeta
decorator(function) (defined in tetragono.shell.AutoCmd)tetragono.shell.AutoCmdstatic
+
+ + + + diff --git a/classtetragono_1_1shell_1_1AutoCmd.html b/classtetragono_1_1shell_1_1AutoCmd.html new file mode 100644 index 000000000..4612c1fa5 --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmd.html @@ -0,0 +1,131 @@ + + + + + + + +TAT: tetragono.shell.AutoCmd Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.shell.AutoCmd Class Reference
+
+
+
+Inheritance diagram for tetragono.shell.AutoCmd:
+
+
+ + +tetragono.shell.AutoCmdMeta +tetragono.shell.TetragonoCommandApp +tetragono.shell.TetragonoScriptApp + +
+ + + + +

+Static Public Member Functions

+def decorator (function)
 
+ + + + +

+Additional Inherited Members

- Public Member Functions inherited from tetragono.shell.AutoCmdMeta
+def __new__ (cls, name, bases, attrs)
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/shell.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1shell_1_1AutoCmd.js b/classtetragono_1_1shell_1_1AutoCmd.js new file mode 100644 index 000000000..c2589af5c --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmd.js @@ -0,0 +1,4 @@ +var classtetragono_1_1shell_1_1AutoCmd = +[ + [ "decorator", "classtetragono_1_1shell_1_1AutoCmd.html#aaec16ef4a8eb1b095b97ec4e47f1b5f9", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1shell_1_1AutoCmd.png b/classtetragono_1_1shell_1_1AutoCmd.png new file mode 100644 index 0000000000000000000000000000000000000000..7f8aad27dda3f4263d936fa0ec70f371742d2661 GIT binary patch literal 2990 zcmd5;dstFw8n>phokpFlHZL_g&QR8rF&5f*LmPAKWN2GarUtc6DVkd06$Py}cuHLg zE4)B*=J zy}$4GzGrp>1z3D)_ox;+jsjLjYcqh`AVBe zzjF?Z-keQMP4mz6IDqNGgq=aV%z%;Uklx?D!OU!tH?(E*?vy#hy+g-k+m@bg?kYK( zYTSgjIdR?$KiZ6V61vo)-f|Co2)3SEP*_5cEm#;8XBUy}yj5H|AF`WUuvPr|!z~PI z<|+ni9%`(fV;s%6jIanh$8o%JhI!fzBdHoZ)pBPnQt6iC(i(^$bf08)id7udKO{1n zhz4H<)p_b`sG_merhh&Ib)>m87oD8WDzmC^X-zo;{EUh@R+k{UOKZDnsSg7t-La3z zRx&vU7vZ`erQM-bsx-QoY!?b1cuEIgh5*AL)M|KRs5#V1b%?|f~ zDb5*cS%x4ijQR@l^Ih^ThPxflc zx7l33iSTZe{BybMU0o5!qD}Az}%; zn9Ge1ElLP69B3H0A2ttri-hc)zK4fZ3^WCAOkn_+Rk}dN^`>1Y3L^ghOhq&zz#4#71>)uTP z?iF8L3SN%vP{avyVcnI-pZlzFB%Z!NR>^5S8ogh z7v7<}reMaog?F{t^jmv*1tR~#szz6=e;gFH9#d|)k5!#_(7MZq7&rOob!y(O+2kND zSN}lcL{2o0JP`9d!74Ql6{w`93u3vimKT^MCw z!W~=!kpKdbiLT5iQwnOS2++3Pp+k&yy-Ci8*+CVNU4=RWAHvh|SZ%&Cm}D2BMH>}f z{y8qrN&%x0SI-+-Yybhv=?vVX>ea8RIq@EX@-b50z?7?0FHmHR8?SH&Hwp`3`PWHg zryK1n5-HO-4S-lVD&vTllxaGtp>ncaa3s%Y3pNqcD-WJ#`5-$AUp#p|m8wWh3iotY z91&j53Z}6O*&?!`F?zzw6K|F5p&ly9a0gtP3Tr@^ZdqQJ60lNQql?cT>`baDE*WX3 zSegEO@B3-jI&YupQtm9}?b|(ogT}M}rk_h|)LLjSR?GYqCoQ312`cu^S875*2_^&~ zkPjynnpN;qshO+-r(m;hK%L+} zWa@Y9)TVI^h~krZC|@xniW5k@%D4X*}9Vr)JdCZ@? zqO~m?Rlb(I*r$m2B&~0c30BAau`d!*Ce#-c zGa=*)O?z%8K^G+c{OG_K>TjFB*yU-itM!ONp?rrvsruyR0k1XqS9H!Yfwvk9eE%TkM7H--;J`~`G3@+p9W$I0(+!0g76c)hJ%K=ohy`fuq++*NWt_cwq zeC&tt^cAJ7$a^g+`D8;<2s*X_mBycOQ`2a;X=_gnds8E_hgG{xU!!Z-1hxDSepv0F zO-xfs2V{iymGx4`EMnYYc^ehS_R+Af3)Y1fP0ZpCj%`$p<)V(M~4bEM(N&V!aTs{Wsp#?>`!HTe72KZ-Eq|0+w^@`h38?x=1$=S&cW+l z)d^Tk41N{a=`R1x(1=tA2k{NGRiGv(ih1Ocfcu(egmk1 zmcVZFyME;T4t)i(_kUO2LI2S-4#?HpKAg<&9g%){r4AHr(3*6g{HTq%jUm-ngIa|d z%C(FcrxGYLKfWADb(qdk+N=ldOv5+oQg5rz$X;+ue{h=69tocHAjqu6)(&mos0gn| zbraqniZBMG*SbYG=~*;G(XUZUQdN@D=&>Nc&*aFDiB%#ur=jQ9hYN@gJ1%oW8v&)7 znNUWJb|Md(s)Y1%zly^{26N}Kk_m)G;c*`|@A0)9=^zcl-w(4mb`iFs&7#z)=MWZS zee3pPB{F93{&@V2l>Fk-=upGpkc6WwvIIoYv~c1b2HWZ;b2-Qpy=&s~;RruuF3x*F zTrQ5j8=I93RO5CoTy<7=f?_#XiQ*k6bs~p6%Gt}}YmwJ|iYKQYGBwhSv*W&5`}7I= z^aEIDg-Lqc04c0`3B}w&Tl*FI&OYW1f2{PPNjH7P8c8fxN}M_H65t&}e;~f$l!292 wd!qrHGH(Si%DMW;mA{pZZjiOu%$qtZd9r)r{K(j5&|I5A{y|&HzdvyDU#}?8@Bjb+ literal 0 HcmV?d00001 diff --git a/classtetragono_1_1shell_1_1AutoCmdMeta-members.html b/classtetragono_1_1shell_1_1AutoCmdMeta-members.html new file mode 100644 index 000000000..fb845e951 --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmdMeta-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.shell.AutoCmdMeta Member List
+
+
+ +

This is the complete list of members for tetragono.shell.AutoCmdMeta, including all inherited members.

+ + +
__new__(cls, name, bases, attrs) (defined in tetragono.shell.AutoCmdMeta)tetragono.shell.AutoCmdMeta
+
+ + + + diff --git a/classtetragono_1_1shell_1_1AutoCmdMeta.html b/classtetragono_1_1shell_1_1AutoCmdMeta.html new file mode 100644 index 000000000..b66858522 --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmdMeta.html @@ -0,0 +1,124 @@ + + + + + + + +TAT: tetragono.shell.AutoCmdMeta Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.shell.AutoCmdMeta Class Reference
+
+
+
+Inheritance diagram for tetragono.shell.AutoCmdMeta:
+
+
+ + +tetragono.shell.AutoCmd +tetragono.shell.TetragonoCommandApp +tetragono.shell.TetragonoScriptApp + +
+ + + + +

+Public Member Functions

+def __new__ (cls, name, bases, attrs)
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/shell.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1shell_1_1AutoCmdMeta.js b/classtetragono_1_1shell_1_1AutoCmdMeta.js new file mode 100644 index 000000000..94dc4fe53 --- /dev/null +++ b/classtetragono_1_1shell_1_1AutoCmdMeta.js @@ -0,0 +1,4 @@ +var classtetragono_1_1shell_1_1AutoCmdMeta = +[ + [ "__new__", "classtetragono_1_1shell_1_1AutoCmdMeta.html#a76495f671473fc4007a91e5d0798b11b", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1shell_1_1AutoCmdMeta.png b/classtetragono_1_1shell_1_1AutoCmdMeta.png new file mode 100644 index 0000000000000000000000000000000000000000..408c10ba9bb9217f33dd56dee38f0ccacfb9357d GIT binary patch literal 1792 zcmb_deOQv`8Yj6-XQFQBWQHlaXlIdOmgF>9r8b2e8ojTef;KIi*h~a69C2A0mYNnF zwblISEKOb%%~Z5BSzcmhiRpQr=ErO}-@mjpY+)+!4j%tOg)-STWP?#mZB*&9^xEl^Ch z&OUJjuDF4}L(TRWQDgwp7KhlTv&-PU?>QW;@3$#;N|)Hr`aG1UZ821Wv7(DLzH8>E zKhxJl-c+T8z{}q>W*X>h6XM_~rc0DH0N*!O*`{VW2 zV0o#B<>-1Eu)va^DI?OoibIDzJptRIu~ukn$Wt`PrV%is;Kfp&cU2>$OwvgEI3K z(_D1pBjw$RS}^q(uWf6v`w{ct@hD1)6y;qVyn(@m@^V#baxW zRJ{VTdcCIk=KW&@-tG21oB=GAe?BG*PSvGh{r{3RbLC@RJr zNi&+gW%2JNJjl{@sB3e&-L%MsL>z_0M^UsqYyu8NkB)%Q{x<3a?rzG@8RP%K3XQd=!=ABDLCEHNd)(uiXx<^7_NSFG{Vyp6wIU zlyq7yal;uA(%s^p7)Zu}Rhm>1`r zyHui+A&s>ysAy^rjGLFQle`z+tQeP((JWz^A%@Pm2`?|@A_G$_+Pp0ysEiKN){6$ApbG4*oJD0 zJ}8L^D&BUhlf5Uw*KYb_80@^%t&%-hxznc|BLKzn>P5b6_i&$XL9;hcsgWeJ2l`He zAsP5bs;KxmUjemH`Rb)OQ`;r8&k9a>(pKXMyJbo4|1);?AZO=X?MzMoWNrLaKxkV& z4JR%G+kF0$`VqJ8!5fM>d}uL@aO@mE7#sqbVZa5tB+7b)$|Exh0BMQ)25NhyCQ_wd z>gM;$)Pfr_DABfE{f7=NTuFq}%}VvuaUSW!Y{1t2vYsCWsc{#+IKvCe@=e9f{S-Z1 zv8lWtzP6G6_AzL^H{O5VOwJWU+O6>XE*H|?alc79H2x1PspZ*Hw-(I1ZM0uq1FJg3 f0w~vX{GtUj*x}vk>cX?+QUWKnalf9Xa + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.shell.Config Member List
+
+
+ +

This is the complete list of members for tetragono.shell.Config, including all inherited members.

+ + + + +
__init__(self, line) (defined in tetragono.shell.Config)tetragono.shell.Config
args (defined in tetragono.shell.Config)tetragono.shell.Config
kwargs (defined in tetragono.shell.Config)tetragono.shell.Config
+
+ + + + diff --git a/classtetragono_1_1shell_1_1Config.html b/classtetragono_1_1shell_1_1Config.html new file mode 100644 index 000000000..1ac796134 --- /dev/null +++ b/classtetragono_1_1shell_1_1Config.html @@ -0,0 +1,123 @@ + + + + + + + +TAT: tetragono.shell.Config Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.shell.Config Class Reference
+
+
+ + + + +

+Public Member Functions

+def __init__ (self, line)
 
+ + + + + +

+Public Attributes

args
 
kwargs
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/shell.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1shell_1_1Config.js b/classtetragono_1_1shell_1_1Config.js new file mode 100644 index 000000000..3626cd917 --- /dev/null +++ b/classtetragono_1_1shell_1_1Config.js @@ -0,0 +1,6 @@ +var classtetragono_1_1shell_1_1Config = +[ + [ "__init__", "classtetragono_1_1shell_1_1Config.html#addc5583826bc2c04789e5b288bf64577", null ], + [ "args", "classtetragono_1_1shell_1_1Config.html#a1174473710feadfd8b0f8b8551ea6176", null ], + [ "kwargs", "classtetragono_1_1shell_1_1Config.html#a0513b5dbcc4bcab54a18804eced85e97", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1shell_1_1TetragonoCommandApp-members.html b/classtetragono_1_1shell_1_1TetragonoCommandApp-members.html new file mode 100644 index 000000000..c86fb9b5e --- /dev/null +++ b/classtetragono_1_1shell_1_1TetragonoCommandApp-members.html @@ -0,0 +1,150 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.shell.TetragonoCommandApp Member List
+
+
+ +

This is the complete list of members for tetragono.shell.TetragonoCommandApp, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__init__(self, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
__new__(cls, name, bases, attrs) (defined in tetragono.shell.AutoCmdMeta)tetragono.shell.AutoCmdMeta
bin_estimate(self, values) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
decorator(function) (defined in tetragono.shell.AutoCmd)tetragono.shell.AutoCmdstatic
do_EOF(self, line)tetragono.shell.TetragonoCommandApp
do_exit(self, line)tetragono.shell.TetragonoCommandApp
do_quit(self, line)tetragono.shell.TetragonoCommandApp
do_shell(self, line)tetragono.shell.TetragonoCommandApp
emptyline(self) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
ex (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
ex_ap_create(lattice_type, model_name, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandAppstatic
ex_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
ex_dump(self, name)tetragono.shell.TetragonoCommandApp
ex_energy(self)tetragono.shell.TetragonoCommandApp
ex_load(self, name)tetragono.shell.TetragonoCommandApp
ex_update(self, total_step, approximate_energy)tetragono.shell.TetragonoCommandApp
gm (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_clear_symmetry(self)tetragono.shell.TetragonoCommandApp
gm_conf (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_conf_create(self, module_name, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_conf_dump(self, name)tetragono.shell.TetragonoCommandApp
gm_conf_eq(self, step, configuration_cut_dimension, sweep_hopping_hamiltonians=None, restrict_subspace=None)tetragono.shell.TetragonoCommandApp
gm_conf_load(self, name)tetragono.shell.TetragonoCommandApp
gm_conf_load_compat(self, name)tetragono.shell.TetragonoCommandApp
gm_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_dump(self, name)tetragono.shell.TetragonoCommandApp
gm_expand(self, new_dimension, epsilon)tetragono.shell.TetragonoCommandApp
gm_hamiltonian(self, model, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_load(self, name)tetragono.shell.TetragonoCommandApp
gm_run(self, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_run_g(self, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_to_ex(self)tetragono.shell.TetragonoCommandApp
intro (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
license (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
numpy_hamiltonian(self, file, model, *args, **kwargs)tetragono.shell.TetragonoCommandApp
precmd(self, line) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
prompt (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
seed(self, random_seed)tetragono.shell.TetragonoCommandApp
stored_line (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
su (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
su_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
su_dump(self, name)tetragono.shell.TetragonoCommandApp
su_energy(self, cut_dimension)tetragono.shell.TetragonoCommandApp
su_gm_create(lattice_type, model_name, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandAppstatic
su_load(self, name)tetragono.shell.TetragonoCommandApp
su_to_ex(self)tetragono.shell.TetragonoCommandApp
su_to_gm(self)tetragono.shell.TetragonoCommandApp
su_update(self, total_step, delta_tau, new_dimension)tetragono.shell.TetragonoCommandApp
+
+ + + + diff --git a/classtetragono_1_1shell_1_1TetragonoCommandApp.html b/classtetragono_1_1shell_1_1TetragonoCommandApp.html new file mode 100644 index 000000000..07704e8fa --- /dev/null +++ b/classtetragono_1_1shell_1_1TetragonoCommandApp.html @@ -0,0 +1,1270 @@ + + + + + + + +TAT: tetragono.shell.TetragonoCommandApp Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.shell.TetragonoCommandApp Class Reference
+
+
+
+Inheritance diagram for tetragono.shell.TetragonoCommandApp:
+
+
+ + +tetragono.shell.AutoCmd +tetragono.shell.AutoCmdMeta +tetragono.shell.TetragonoScriptApp + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, *args, **kwargs)
 
+def precmd (self, line)
 
+def emptyline (self)
 
def do_shell (self, line)
 Run shell command. More...
 
def do_EOF (self, line)
 Exit tetra shell. More...
 
def do_exit (self, line)
 Exit tetra shell. More...
 
def do_quit (self, line)
 Exit tetra shell. More...
 
def seed (self, random_seed)
 Set random seed. More...
 
def numpy_hamiltonian (self, file, model, *args, **kwargs)
 Export hamiltonian as a numpy array to a file. More...
 
def ex_create (self, *args, **kwargs)
 Create a state used for exact update. More...
 
def su_create (self, *args, **kwargs)
 Create a lattice used for simple update. More...
 
def su_dump (self, name)
 Dump the simple update lattice into file. More...
 
def su_load (self, name)
 Load the simple update lattice from file. More...
 
def su_update (self, total_step, delta_tau, new_dimension)
 Do simple update. More...
 
def su_energy (self, cut_dimension)
 Calculate simple update lattice with double layer auxiliaries. More...
 
def su_to_ex (self)
 Convert simple update lattice to exact lattice. More...
 
def su_to_gm (self)
 Convert simple update lattice to sampling lattice. More...
 
def ex_update (self, total_step, approximate_energy)
 Do exact update. More...
 
def ex_energy (self)
 Calculate exact energy. More...
 
def ex_dump (self, name)
 Dump the exact update lattice into file. More...
 
def ex_load (self, name)
 Load the exact update lattice from file. More...
 
def gm_create (self, *args, **kwargs)
 Create a lattice used for gradient method. More...
 
+def gm_run (self, *args, **kwargs)
 
+def gm_run_g (self, *args, **kwargs)
 
+def bin_estimate (self, values)
 
def gm_dump (self, name)
 Dump the sampling lattice into file. More...
 
def gm_conf_dump (self, name)
 Dump the sampling lattice configuration into file. More...
 
def gm_load (self, name)
 Load the sampling lattice from file. More...
 
def gm_conf_load_compat (self, name)
 Load the sampling lattice configuration from file. More...
 
def gm_conf_load (self, name)
 Load the sampling lattice configuration from file. More...
 
def gm_conf_create (self, module_name, *args, **kwargs)
 Create configuration of sampling lattice. More...
 
def gm_clear_symmetry (self)
 Clear the symmetry of sampling lattice. More...
 
def gm_hamiltonian (self, model, *args, **kwargs)
 Replace the hamiltonian of the sampling lattice with another one. More...
 
def gm_expand (self, new_dimension, epsilon)
 Expand dimension of sampling lattice. More...
 
def gm_to_ex (self)
 Convert sampling lattice to exact lattice. More...
 
def gm_conf_eq (self, step, configuration_cut_dimension, sweep_hopping_hamiltonians=None, restrict_subspace=None)
 Equilibium the configuration of sampling lattice. More...
 
- Public Member Functions inherited from tetragono.shell.AutoCmdMeta
+def __new__ (cls, name, bases, attrs)
 
+ + + + + + + + +

+Static Public Member Functions

+def ex_ap_create (lattice_type, model_name, *args, **kwargs)
 
+def su_gm_create (lattice_type, model_name, *args, **kwargs)
 
- Static Public Member Functions inherited from tetragono.shell.AutoCmd
+def decorator (function)
 
+ + + + + + + + + + + + + + + + + +

+Public Attributes

prompt
 
stored_line
 
license
 
intro
 
su
 
ex
 
gm
 
gm_conf
 
+

Member Function Documentation

+ +

◆ do_EOF()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.do_EOF ( self,
 line 
)
+
+ +

Exit tetra shell.

+ +
+
+ +

◆ do_exit()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.do_exit ( self,
 line 
)
+
+ +

Exit tetra shell.

+ +
+
+ +

◆ do_quit()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.do_quit ( self,
 line 
)
+
+ +

Exit tetra shell.

+ +
+
+ +

◆ do_shell()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.do_shell ( self,
 line 
)
+
+ +

Run shell command.

+ +
+
+ +

◆ ex_create()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.ex_create ( self,
args,
** kwargs 
)
+
+ +

Create a state used for exact update.

+

Parameters

+

model : str The model names. args, kwargs Arguments passed to model creater function.

+ +
+
+ +

◆ ex_dump()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.ex_dump ( self,
 name 
)
+
+ +

Dump the exact update lattice into file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ ex_energy()

+ +
+
+ + + + + + + + +
def tetragono.shell.TetragonoCommandApp.ex_energy ( self)
+
+ +

Calculate exact energy.

+ +
+
+ +

◆ ex_load()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.ex_load ( self,
 name 
)
+
+ +

Load the exact update lattice from file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ ex_update()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.ex_update ( self,
 total_step,
 approximate_energy 
)
+
+ +

Do exact update.

+

Parameters

+

total_step : int The update total step to do. approximate_energy : float The approximate energy per site, it should ensure the ground state energy is the largest after shifting.

+ +
+
+ +

◆ gm_clear_symmetry()

+ +
+
+ + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_clear_symmetry ( self)
+
+ +

Clear the symmetry of sampling lattice.

+ +
+
+ +

◆ gm_conf_create()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_conf_create ( self,
 module_name,
args,
** kwargs 
)
+
+ +

Create configuration of sampling lattice.

+

Parameters

+

module_name : str The module name to create initial configuration of sampling lattice. args, kwargs Arguments passed to module configuration creater function.

+ +
+
+ +

◆ gm_conf_dump()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_conf_dump ( self,
 name 
)
+
+ +

Dump the sampling lattice configuration into file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ gm_conf_eq()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_conf_eq ( self,
 step,
 configuration_cut_dimension,
 sweep_hopping_hamiltonians = None,
 restrict_subspace = None 
)
+
+ +

Equilibium the configuration of sampling lattice.

+

Parameters

+

step : int The step of sweep sampling for each process. configuration_cut_dimension : int The dimension cut in auxiliary tensor network. sweep_hopping_hamiltonians : str, optional The sweep hopping hamiltonians setter module name. restrict_subspace : str, optional The subspace restricter module name.

+ +
+
+ +

◆ gm_conf_load()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_conf_load ( self,
 name 
)
+
+ +

Load the sampling lattice configuration from file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ gm_conf_load_compat()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_conf_load_compat ( self,
 name 
)
+
+ +

Load the sampling lattice configuration from file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ gm_create()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_create ( self,
args,
** kwargs 
)
+
+ +

Create a lattice used for gradient method.

+

Parameters

+

model : str The model names. args, kwargs Arguments passed to model creater function.

+ +
+
+ +

◆ gm_dump()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_dump ( self,
 name 
)
+
+ +

Dump the sampling lattice into file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ gm_expand()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_expand ( self,
 new_dimension,
 epsilon 
)
+
+ +

Expand dimension of sampling lattice.

+

Parameters

+

new_dimension : int | float The new dimension, or the amplitude of dimension expandance. epsilon : float The relative error added into tensor.

+ +
+
+ +

◆ gm_hamiltonian()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_hamiltonian ( self,
 model,
args,
** kwargs 
)
+
+ +

Replace the hamiltonian of the sampling lattice with another one.

+

Parameters

+

model : str The model names. args, kwargs Arguments passed to model creater function.

+ +
+
+ +

◆ gm_load()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_load ( self,
 name 
)
+
+ +

Load the sampling lattice from file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ gm_to_ex()

+ +
+
+ + + + + + + + +
def tetragono.shell.TetragonoCommandApp.gm_to_ex ( self)
+
+ +

Convert sampling lattice to exact lattice.

+ +
+
+ +

◆ numpy_hamiltonian()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.numpy_hamiltonian ( self,
 file,
 model,
args,
** kwargs 
)
+
+ +

Export hamiltonian as a numpy array to a file.

+

Parameters

+

file : str | None The file that the hamiltonian is exported to. model : str The model names. args, kwargs Arguments passed to model creater function.

+ +
+
+ +

◆ seed()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.seed ( self,
 random_seed 
)
+
+ +

Set random seed.

+

Parameters

+

random_seed : int The new random seed.

+ +
+
+ +

◆ su_create()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_create ( self,
args,
** kwargs 
)
+
+ +

Create a lattice used for simple update.

+

Parameters

+

model : str The model names. args, kwargs Arguments passed to model creater function.

+ +
+
+ +

◆ su_dump()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_dump ( self,
 name 
)
+
+ +

Dump the simple update lattice into file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ su_energy()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_energy ( self,
 cut_dimension 
)
+
+ +

Calculate simple update lattice with double layer auxiliaries.

+

Parameters

+

cut_dimension : int The cut_dimension used in double layer auxiliaries.

+ +
+
+ +

◆ su_load()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_load ( self,
 name 
)
+
+ +

Load the simple update lattice from file.

+

Parameters

+

name : str The file name.

+ +
+
+ +

◆ su_to_ex()

+ +
+
+ + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_to_ex ( self)
+
+ +

Convert simple update lattice to exact lattice.

+ +
+
+ +

◆ su_to_gm()

+ +
+
+ + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_to_gm ( self)
+
+ +

Convert simple update lattice to sampling lattice.

+ +
+
+ +

◆ su_update()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.shell.TetragonoCommandApp.su_update ( self,
 total_step,
 delta_tau,
 new_dimension 
)
+
+ +

Do simple update.

+

Parameters

+

total_step : int The simple update total step to do. delta_tau : float The imaginary time, delta tau. new_dimension : int The new cut dimension used in simple update, or the amplitude of dimension expandance.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/shell.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1shell_1_1TetragonoCommandApp.js b/classtetragono_1_1shell_1_1TetragonoCommandApp.js new file mode 100644 index 000000000..92fcfbcc3 --- /dev/null +++ b/classtetragono_1_1shell_1_1TetragonoCommandApp.js @@ -0,0 +1,49 @@ +var classtetragono_1_1shell_1_1TetragonoCommandApp = +[ + [ "__init__", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a180a30f6f7b3ad83f3504396645cf2c3", null ], + [ "bin_estimate", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aabf6e42ce3c8c03eb20682a4fb11159f", null ], + [ "do_EOF", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#ab4e14ff6d40a3e2821f4c4473badc3c3", null ], + [ "do_exit", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a21e15ef2581ed029c488442f4ffa20b3", null ], + [ "do_quit", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aede8eff5c75a8fb8af49507ae511c7c2", null ], + [ "do_shell", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#abd664cd29ef614a3ce77b56a98bd9881", null ], + [ "emptyline", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aaea1eaa95fa7c11b1a491e4a36a55694", null ], + [ "ex_ap_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a271901162144e88a2e81a6604c675c67", null ], + [ "ex_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a4fa90d0eac5f9194a12d2df43630c945", null ], + [ "ex_dump", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a67f243ed364067d68a675d1c1356ed05", null ], + [ "ex_energy", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#af0492b0632ff20ebb0f0fa11679fddc2", null ], + [ "ex_load", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#adf1fae5cd1f485dac94b92b90631d94b", null ], + [ "ex_update", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a7b761bc3792405bdb1ad219daec8f6d0", null ], + [ "gm_clear_symmetry", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#af2e5f4bbe482127f38d58147e84d1906", null ], + [ "gm_conf_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1be9a2c1a86e7ce42ed6d73a42c393c2", null ], + [ "gm_conf_dump", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a3a9a286b8d416e5c06596351cd3060db", null ], + [ "gm_conf_eq", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#adff7b4f6367215a1dcb70683ad99555c", null ], + [ "gm_conf_load", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1bc6b273c2248cc5b7db2f71906fcb3d", null ], + [ "gm_conf_load_compat", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#ac0d7660885818916e0dff95f2a646eeb", null ], + [ "gm_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a08333a5ab973e3191f139b9aa5b808b9", null ], + [ "gm_dump", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#ae6a0a3f322b0728804cdd80cd26baf07", null ], + [ "gm_expand", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a04a45748ad7f749aab863f10f2cce755", null ], + [ "gm_hamiltonian", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a314b331d0edbc4cc7de5af1fbfa12a38", null ], + [ "gm_load", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa2883f8cbab52c84b0e66e9b18f02b11", null ], + [ "gm_run", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa64dd8c9739a91d9e9c96f0537a015d7", null ], + [ "gm_run_g", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aeda8d0ba88c919003dac395993e8e194", null ], + [ "gm_to_ex", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aac2a4689442d01ff031c1802680c83af", null ], + [ "numpy_hamiltonian", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#abe5ab99a0716d879976773b8f1d1b513", null ], + [ "precmd", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a4909c340993e6e67824f9b926442161b", null ], + [ "seed", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a8ae3452f9a0d2524927a228682ca125a", null ], + [ "su_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a63c29980fe5e1a92fcd473d068c06e46", null ], + [ "su_dump", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a56e950281f1c26599912f2dc77e428a5", null ], + [ "su_energy", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa072452f5469a8600a27154e3e5b25ab", null ], + [ "su_gm_create", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a7bd281c4c8e38f7e89a665fec7720a57", null ], + [ "su_load", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a71331c4009f3711ac27fc69f022f3aae", null ], + [ "su_to_ex", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#ad12a9b392e57e977ff871f4ba3742eee", null ], + [ "su_to_gm", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a664e6207504d9f2c1101b8bc1794c18b", null ], + [ "su_update", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a190270fabf8c99610c6c43970ec5ca5e", null ], + [ "ex", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#afd7ac0677b2cdc9034a81f43d83f600c", null ], + [ "gm", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#abd7255ffd418d63b1e3c7ea8c7e46288", null ], + [ "gm_conf", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a0e3981df4944298057f0f3647c7af06a", null ], + [ "intro", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a40c804940460650109c024c3e895910a", null ], + [ "license", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa6ee088b7fb5473d3ad5d9e78718e927", null ], + [ "prompt", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a18991f99b3afa4ed9813a65d06b78432", null ], + [ "stored_line", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a2107c80bcb702cb1ba68b2bfbddd1c08", null ], + [ "su", "classtetragono_1_1shell_1_1TetragonoCommandApp.html#a4e915a99117b1497dada9c855e5a99cb", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1shell_1_1TetragonoCommandApp.png b/classtetragono_1_1shell_1_1TetragonoCommandApp.png new file mode 100644 index 0000000000000000000000000000000000000000..8b45031704ae6a827b3bb21c99f0d66413b69a63 GIT binary patch literal 2975 zcmb_eYgAKL76w|E)>rJ3CCJ-_ww98IwXUz}iu61wDzS-y8 zv-keKZ=VZ0aGx$&=(y0v#%2k$Wz$X@8#@GyUoLnHJf~Jn4uBtr9ou$CSS%JW9DS}o zm4ELN7|q>HO-=JI^r3;dAay5hmkn^TUb3HdueGsR*({3lCIylF-7V?IugcWdT&9Nb!=iWvpiV- zZ~Om~xANMBZg+FOMe9a>e8z2wZB&C-C7F|lN3XEY3!Sbe=lT*>LCy9JsfAe25KKu| zi^I@7mj98vp%6vCuEha!iMM|dp;%WtG<1-banZLW(z*`YgI2MP0;YO^sWSz@akH&d_og-cWcGCWB1iqa%@J6N_dc z0&q=)9IIWS@QuqMM?21|7;ca`)wXtaB}ph-TMG^RMR}}|`oCRy3B;8h-br?}3$prd zKJ%aPTBCF$FF3sFwdG!=Dh{qay$31%Hd}iDBpK;?5{8Jc(V|zGAN3c3Vd6hnTr^0p^)i%bYP1^Qoegge+&$p zZs?)xDpX5sc|*hwe3@aejXM)z@lg#K^!c7D-6tt&Luyn=6phT$xh;m|`GKWH} zdvZJmP0A%sOn3>uJRvbP)WroKt@W=BI(R~IfEmBn(pKBQt5vxlXHph4 zLk5ZxaDdtEL2J|vF&+(_7ZS%0HP5uKX>kz!e3z$G&YUL8{o4!0?OMt0p&s(&=hOPQ z%%JCe&ojq+4fxy2Cq~L0DMSn~w*tVl5GPqy(x6UzsX#JlB>FAbWMJtWNR@gXPh|X2 z@XEXuL!rNn#+zw#5Toot@OaDn{{w^0tdbk#o^ugaAQx3^q15!M*V_`3QBDO(%<7ZW zQjt1NOBV^Ji+(c)wg#j#QXY2fIfl{I+)R?o{Q|oeUmTwLgaJAB{Io7SwpQ3dWP#bg zxUhMp-^Te>UhZ9Fb|)YHsC)5It8465ib$a$ftz|ZEAJ!~sMDKJQQ2!HU{=;h8Xg~O zRjStrJ~+VR2S?)Zib|}iV(M;2>t)ph49lhm(A$xUc??e#xp-1GsLyvNFSzsKFd}{@ zW%9(WlO>x_++>BeXTPy>5_ztk3Wm5S3Ob$E^nwk;jowz#J6K5gAuxePh%Ya$j^o5R ze;=6OtM<9Y7?~j+IA-+UhL;)Kfl^umRQc6%7e7Y-bGoal%o*&24fY9u)tmHLSE9a| zr@W%4{Uwx}@`T#Q;;np|O%IBUmQ_w2LehicQE3UYIG~a7p;462x>nt5XEmx)*F|Cq z2yF_sXPB%q)6=@|3`Be_?`HAY%-CYTq5#1@?ocqAQDvt1V4c$>ruW7NrW40Y7=Vbq zRtau~qVcrRfesiZtOk*6z^Jq{v3UJ_>vlaQh*X!IgF`Cb*}km~ex}(9vh+Jewr2P{ zkoI01Tif=k?5r#ckbT>b=LVp~`>a~rTsrE%#Map=z^lXlsOPWM=l`qGCCQu{WGB~a zwGaDLpcz@a#P9LN52n=)gx2ZD3YI2mnPj^8@aXV`i7ILGJ!jB=o<2m=_bqsSts4;dUp?L-{dLlxd*!1Iv90Re4dfD1iSh3wso+ zi9#ygWyet79qN;xK2@96bCNblnT|s8QNkdGJor;;%pI)SEV?(CAQ|!`KmKwWBBqts z$X!x6=LPAEt2zU-5#o@|jh1L)tucJ%H9^FRWI@EdG8w9X5S7PXSp@Yb-OPSVQVwPFY|`Cp*lg83%7&9Q8`wqDYsT0C-f?<>}ltvP3##deG6T#lCbB`NmnHf=8mME)J%Q(QGky ziXK7$@9sdRKzAQ(9$q5-c|fbC5`w+B>j@lTKfOrT9FAc!H0juBvu+o{*Gl-&vcY1Y z4&xFe$3ZzIDQm5g7DlF)h1)Cpw$-4P(iW!HQk2(a$E3T6+FseQ{{G#2P; zvI!5n45)p3qtu`R!*m1y$H@wu#;ugeZ&YFG>*bBO$+dH0 zBkSfvqEKf54S6=Cz&^@P(Re~cyZT*yYgJ+98AVSihv(ixlJeGOK$90gqoT_@d&m-%f7 z)D<^lw&%d`M^?^#!Bg;iVOVLp3!r1y<#Ofv_U*GUoIuSS1@%hGcZ + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.shell.TetragonoScriptApp Member List
+
+
+ +

This is the complete list of members for tetragono.shell.TetragonoScriptApp, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__init__(self, *args, **kwargs) (defined in tetragono.shell.TetragonoScriptApp)tetragono.shell.TetragonoScriptApp
__new__(cls, name, bases, attrs) (defined in tetragono.shell.AutoCmdMeta)tetragono.shell.AutoCmdMeta
bin_estimate(self, values) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
decorator(function) (defined in tetragono.shell.AutoCmd)tetragono.shell.AutoCmdstatic
do_EOF(self, line)tetragono.shell.TetragonoCommandApp
do_exit(self, line)tetragono.shell.TetragonoCommandApp
do_quit(self, line)tetragono.shell.TetragonoCommandApp
do_shell(self, line)tetragono.shell.TetragonoCommandApp
emptyline(self) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
ex (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
ex_ap_create(lattice_type, model_name, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandAppstatic
ex_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
ex_dump(self, name)tetragono.shell.TetragonoCommandApp
ex_energy(self)tetragono.shell.TetragonoCommandApp
ex_load(self, name)tetragono.shell.TetragonoCommandApp
ex_update(self, total_step, approximate_energy)tetragono.shell.TetragonoCommandApp
gm (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_clear_symmetry(self)tetragono.shell.TetragonoCommandApp
gm_conf (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_conf_create(self, module_name, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_conf_dump(self, name)tetragono.shell.TetragonoCommandApp
gm_conf_eq(self, step, configuration_cut_dimension, sweep_hopping_hamiltonians=None, restrict_subspace=None)tetragono.shell.TetragonoCommandApp
gm_conf_load(self, name)tetragono.shell.TetragonoCommandApp
gm_conf_load_compat(self, name)tetragono.shell.TetragonoCommandApp
gm_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_dump(self, name)tetragono.shell.TetragonoCommandApp
gm_expand(self, new_dimension, epsilon)tetragono.shell.TetragonoCommandApp
gm_hamiltonian(self, model, *args, **kwargs)tetragono.shell.TetragonoCommandApp
gm_load(self, name)tetragono.shell.TetragonoCommandApp
gm_run(self, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_run_g(self, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
gm_to_ex(self)tetragono.shell.TetragonoCommandApp
intro (defined in tetragono.shell.TetragonoScriptApp)tetragono.shell.TetragonoScriptApp
license (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
numpy_hamiltonian(self, file, model, *args, **kwargs)tetragono.shell.TetragonoCommandApp
precmd(self, line) (defined in tetragono.shell.TetragonoScriptApp)tetragono.shell.TetragonoScriptApp
prompt (defined in tetragono.shell.TetragonoScriptApp)tetragono.shell.TetragonoScriptApp
seed(self, random_seed)tetragono.shell.TetragonoCommandApp
stored_line (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
su (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandApp
su_create(self, *args, **kwargs)tetragono.shell.TetragonoCommandApp
su_dump(self, name)tetragono.shell.TetragonoCommandApp
su_energy(self, cut_dimension)tetragono.shell.TetragonoCommandApp
su_gm_create(lattice_type, model_name, *args, **kwargs) (defined in tetragono.shell.TetragonoCommandApp)tetragono.shell.TetragonoCommandAppstatic
su_load(self, name)tetragono.shell.TetragonoCommandApp
su_to_ex(self)tetragono.shell.TetragonoCommandApp
su_to_gm(self)tetragono.shell.TetragonoCommandApp
su_update(self, total_step, delta_tau, new_dimension)tetragono.shell.TetragonoCommandApp
use_rawinput (defined in tetragono.shell.TetragonoScriptApp)tetragono.shell.TetragonoScriptApp
+
+ + + + diff --git a/classtetragono_1_1shell_1_1TetragonoScriptApp.html b/classtetragono_1_1shell_1_1TetragonoScriptApp.html new file mode 100644 index 000000000..3d2821005 --- /dev/null +++ b/classtetragono_1_1shell_1_1TetragonoScriptApp.html @@ -0,0 +1,286 @@ + + + + + + + +TAT: tetragono.shell.TetragonoScriptApp Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.shell.TetragonoScriptApp Class Reference
+
+
+
+Inheritance diagram for tetragono.shell.TetragonoScriptApp:
+
+
+ + +tetragono.shell.TetragonoCommandApp +tetragono.shell.AutoCmd +tetragono.shell.AutoCmdMeta + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, *args, **kwargs)
 
+def precmd (self, line)
 
- Public Member Functions inherited from tetragono.shell.TetragonoCommandApp
+def emptyline (self)
 
def do_shell (self, line)
 Run shell command. More...
 
def do_EOF (self, line)
 Exit tetra shell. More...
 
def do_exit (self, line)
 Exit tetra shell. More...
 
def do_quit (self, line)
 Exit tetra shell. More...
 
def seed (self, random_seed)
 Set random seed. More...
 
def numpy_hamiltonian (self, file, model, *args, **kwargs)
 Export hamiltonian as a numpy array to a file. More...
 
def ex_create (self, *args, **kwargs)
 Create a state used for exact update. More...
 
def su_create (self, *args, **kwargs)
 Create a lattice used for simple update. More...
 
def su_dump (self, name)
 Dump the simple update lattice into file. More...
 
def su_load (self, name)
 Load the simple update lattice from file. More...
 
def su_update (self, total_step, delta_tau, new_dimension)
 Do simple update. More...
 
def su_energy (self, cut_dimension)
 Calculate simple update lattice with double layer auxiliaries. More...
 
def su_to_ex (self)
 Convert simple update lattice to exact lattice. More...
 
def su_to_gm (self)
 Convert simple update lattice to sampling lattice. More...
 
def ex_update (self, total_step, approximate_energy)
 Do exact update. More...
 
def ex_energy (self)
 Calculate exact energy. More...
 
def ex_dump (self, name)
 Dump the exact update lattice into file. More...
 
def ex_load (self, name)
 Load the exact update lattice from file. More...
 
def gm_create (self, *args, **kwargs)
 Create a lattice used for gradient method. More...
 
+def gm_run (self, *args, **kwargs)
 
+def gm_run_g (self, *args, **kwargs)
 
+def bin_estimate (self, values)
 
def gm_dump (self, name)
 Dump the sampling lattice into file. More...
 
def gm_conf_dump (self, name)
 Dump the sampling lattice configuration into file. More...
 
def gm_load (self, name)
 Load the sampling lattice from file. More...
 
def gm_conf_load_compat (self, name)
 Load the sampling lattice configuration from file. More...
 
def gm_conf_load (self, name)
 Load the sampling lattice configuration from file. More...
 
def gm_conf_create (self, module_name, *args, **kwargs)
 Create configuration of sampling lattice. More...
 
def gm_clear_symmetry (self)
 Clear the symmetry of sampling lattice. More...
 
def gm_hamiltonian (self, model, *args, **kwargs)
 Replace the hamiltonian of the sampling lattice with another one. More...
 
def gm_expand (self, new_dimension, epsilon)
 Expand dimension of sampling lattice. More...
 
def gm_to_ex (self)
 Convert sampling lattice to exact lattice. More...
 
def gm_conf_eq (self, step, configuration_cut_dimension, sweep_hopping_hamiltonians=None, restrict_subspace=None)
 Equilibium the configuration of sampling lattice. More...
 
- Public Member Functions inherited from tetragono.shell.AutoCmdMeta
+def __new__ (cls, name, bases, attrs)
 
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

use_rawinput
 
prompt
 
intro
 
- Public Attributes inherited from tetragono.shell.TetragonoCommandApp
prompt
 
stored_line
 
license
 
intro
 
su
 
ex
 
gm
 
gm_conf
 
+ + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from tetragono.shell.TetragonoCommandApp
+def ex_ap_create (lattice_type, model_name, *args, **kwargs)
 
+def su_gm_create (lattice_type, model_name, *args, **kwargs)
 
- Static Public Member Functions inherited from tetragono.shell.AutoCmd
+def decorator (function)
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/shell.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1shell_1_1TetragonoScriptApp.js b/classtetragono_1_1shell_1_1TetragonoScriptApp.js new file mode 100644 index 000000000..ee1d4802b --- /dev/null +++ b/classtetragono_1_1shell_1_1TetragonoScriptApp.js @@ -0,0 +1,8 @@ +var classtetragono_1_1shell_1_1TetragonoScriptApp = +[ + [ "__init__", "classtetragono_1_1shell_1_1TetragonoScriptApp.html#a3c4d2ec34e0b0082832c2c249564f83f", null ], + [ "precmd", "classtetragono_1_1shell_1_1TetragonoScriptApp.html#a34b0bc87310d50c9fffe9148afe64f72", null ], + [ "intro", "classtetragono_1_1shell_1_1TetragonoScriptApp.html#a37e9b597c6dd12a4a2c331cdc543ba02", null ], + [ "prompt", "classtetragono_1_1shell_1_1TetragonoScriptApp.html#a6ea96a1c4471a9b0f2765be4d6311b20", null ], + [ "use_rawinput", "classtetragono_1_1shell_1_1TetragonoScriptApp.html#acd0a9a56569b63cd94a8a6d2f44c04bf", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1shell_1_1TetragonoScriptApp.png b/classtetragono_1_1shell_1_1TetragonoScriptApp.png new file mode 100644 index 0000000000000000000000000000000000000000..8a0a8a54280f5d1638c433d7092236e94857e63a GIT binary patch literal 2978 zcmcguYgAKL76xQSrxvhvSzlo4G{Ukz(g*^A5Ggu(i-fM$5FIcn%>s--@DX_$;*tvE zNJSGN5+(_@K{O~-g&;^06@@_{U}6Y@fHabrK*X33;F8CjtL>U;?OO9=9(S$WoOAC! z`|h*%_kH`E{2agCcOrJE-v%2(AJ1uS+2%GW5#!#AN=WI zdq&YC`>+Xn{Jlr?uTNi_9o+0$^=eN+(h<{QH*WbwYX97M`)JE3MPWM>Kg@-exp8+W z7W8ao6&&+r1-J*8nuN|*Og`Ep_l$65#YxVIz-Z-V!}prI`sCrDZ?UaWXlh?RN3PHb zb@vm~im;>)p_Uc45@8UTQe<+2mRX;wAVFw&bZ?t_38fjh4a=e`wvP$hmS_@L0poYb zP)=w zhif!=zVDAvLSLzIjL|5SX`{T)`ez4Ke<$+B~4uOHpbe))SFj8 z#W7h~rKJ18$qdro+I4a3qiLRdcsIBSL^19#Et5L4xs&DOu|*=svnjT;iJ6(CAK(E< z(J|c0^hhbGKXqDF_{_<%B*&!}@6kRQ8}vdmZfNid4p}6EcOePWHO6<%rZiqEt~BS5 z)g@&6N(}9mF5xh_IzFgc;LG6d!LX-i{?;+1EG=X?o@d(^ceU&y*k4yb_c*>QF;Lnt zVgOs`zu10*PKb^p`!cGOV`Y;`4hK!4)({Ey_6fhRZ?9zwnCblQTF>`RkRUQ1O6oNkQj_Hv3uKff)Z z6I9G?{|19?!YV2^BcTKV^7<>RaBt7Ty~otK`Mmaxk#UWZp5eTj8DkoADoFiq+NkwY z=4_)@Q}W`4L(9Ez^$F>DI#Jy$OFmGubXkY-go71OSCUd7K9qYwhW1DsePe=wfTN^+ zYZ?{<0`$bzEbV^)Os(fE0|Ntb%@T=Z^7pPj!1aGd)$Yt-Z_im5*DfEC$cpIJTLN&e z<=3=Qnh1pQsTLexnBe8$39HgtiKo=KQsK&{559lHkIN6T-w(@^GP_gSMiVuaj|YsI ztZH3DDB$0>_O1T3kZ?jKdlCUp&S{329!dEo8MS6Pax3jAeW{!uc| zzdR`Y&jL*-idk>ZSx@o|O_qF;vVNn{u<0a-%2$S?Hs#{^fnupLHp$E$I>p5vl1on!?w*!Tj)1#897aQNMr z!xJc$Ls&Z?M0vwUho;!!#r34dRM30p>x3~=%sjdvH)MSmVQq}%$eF78L{rji2)ycg zVPT%r5iH){l#R)c$KT>sa+IYH0a{vEKx?YPFFp~8bnw*+nC>&?H6T$(ODt{lIKpJS zESSzJ;K7GV`6wHK5HnRC3HDiuVb_QZzs=Q=1Ht2S+}$^;m%F>$rdAS6AoBa6OJdymCsCOdoC$-J!UzkYltR` z22~}tFfE}1`$3pxIW#mwzcPe?@&%$ew23#0)7l3VN0-#ZIPiQ`&!mBuPqThy2eh3_ z_O(Cm9iRk`GW_)EUXrq_6R5iDW&P}c@dtLKa|Q+?opW`%|2={N=M5J_-T7$hUt*G} zJLAY1nG#0%kBOzNb(1PJitWe>0ThzNu%(Pk0__kE&G^GO{@|DpwLFJs(P9sjTQbmZ zLX%5y1T3znJHm&fjV;yLnrf8&*RyUgeC(_tO(a6z* zli5B>btNLoGba9c&ceXu7}-a8EUA@c=n*bNM`S_U$Wox@sdr W8XqN*&Vd893$zWtwdT{Wj{gJKDBNWL literal 0 HcmV?d00001 diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice-members.html b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice-members.html new file mode 100644 index 000000000..09666d7a4 --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice-members.html @@ -0,0 +1,128 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.simple_update_lattice.SimpleUpdateLattice Member List
+
+
+ +

This is the complete list of members for tetragono.simple_update_lattice.SimpleUpdateLattice, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
__getitem__(self, l1l2)tetragono.simple_update_lattice.SimpleUpdateLattice
__getstate__(self) (defined in tetragono.simple_update_lattice.SimpleUpdateLattice)tetragono.simple_update_lattice.SimpleUpdateLattice
__init__(self, abstract)tetragono.simple_update_lattice.SimpleUpdateLattice
tetragono::abstract_state::AbstractState.__init__(self, Tensor, L1, L2)tetragono.abstract_state.AbstractState
__setitem__(self, l1l2, value)tetragono.simple_update_lattice.SimpleUpdateLattice
__setstate__(self, state) (defined in tetragono.simple_update_lattice.SimpleUpdateLattice)tetragono.simple_update_lattice.SimpleUpdateLattice
attribute (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
data_version (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
Edge(self)tetragono.abstract_state.AbstractState
environment(self)tetragono.simple_update_lattice.SimpleUpdateLattice
hamiltonians(self)tetragono.abstract_state.AbstractState
initialize_auxiliaries(self, cut_dimension)tetragono.simple_update_lattice.SimpleUpdateLattice
L1 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
L2 (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
numpy_hamiltonian(self)tetragono.abstract_state.AbstractState
observe(self, positions, observer)tetragono.simple_update_lattice.SimpleUpdateLattice
observe_energy(self)tetragono.simple_update_lattice.SimpleUpdateLattice
physics_edges(self)tetragono.abstract_state.AbstractState
site_number(self)tetragono.abstract_state.AbstractState
sites(self)tetragono.abstract_state.AbstractState
Symmetry(self)tetragono.abstract_state.AbstractState
Tensor (defined in tetragono.abstract_state.AbstractState)tetragono.abstract_state.AbstractState
total_symmetry(self)tetragono.abstract_state.AbstractState
total_symmetry(self, value)tetragono.abstract_state.AbstractState
update(self, total_step, delta_tau, new_dimension)tetragono.simple_update_lattice.SimpleUpdateLattice
virtual_bond(self)tetragono.abstract_lattice.AbstractLattice
+
+ + + + diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html new file mode 100644 index 000000000..5c1a94fa7 --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html @@ -0,0 +1,478 @@ + + + + + + + +TAT: tetragono.simple_update_lattice.SimpleUpdateLattice Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.simple_update_lattice.SimpleUpdateLattice Class Reference
+
+
+ +

The lattice used to do simple update. + More...

+
+Inheritance diagram for tetragono.simple_update_lattice.SimpleUpdateLattice:
+
+
+ + +tetragono.abstract_lattice.AbstractLattice +tetragono.abstract_state.AbstractState + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __setstate__ (self, state)
 
+def __getstate__ (self)
 
def __init__ (self, abstract)
 Create a simple update lattice from abstract lattice. More...
 
def __getitem__ (self, l1l2)
 Get the tensor at the given coordinate. More...
 
def __setitem__ (self, l1l2, value)
 Set the tensor at the given coordinate. More...
 
def environment (self)
 Get the environment handler of this simple update lattice. More...
 
def update (self, total_step, delta_tau, new_dimension)
 Do simple update on the lattice. More...
 
def initialize_auxiliaries (self, cut_dimension)
 Initialize auxiliares. More...
 
def observe (self, positions, observer)
 Observe the state. More...
 
def observe_energy (self)
 Observe the energy per site. More...
 
- Public Member Functions inherited from tetragono.abstract_lattice.AbstractLattice
def virtual_bond (self)
 Get the virtual bond handler of this abstract lattice. More...
 
- Public Member Functions inherited from tetragono.abstract_state.AbstractState
def sites (self)
 Iterate on site. More...
 
def Edge (self)
 Get the edge type of this abstract state. More...
 
def Symmetry (self)
 Get the symmetry type of this abstract state. More...
 
def __init__ (self, Tensor, L1, L2)
 Create an abstract state. More...
 
def total_symmetry (self)
 Get the total symmetry of this abstract state. More...
 
def total_symmetry (self, value)
 Set the total symmetry of this abstract state. More...
 
def physics_edges (self)
 Get the physics edge handler for this abstract state. More...
 
def hamiltonians (self)
 Get the hamiltonian handler for this abstract state. More...
 
def site_number (self)
 Get the total site number of this abstract state. More...
 
def numpy_hamiltonian (self)
 Get the numpy array as the hamiltonian. More...
 
+ + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from tetragono.abstract_state.AbstractState
Tensor
 
L1
 
L2
 
attribute
 
data_version
 
+

Detailed Description

+

The lattice used to do simple update.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.__init__ ( self,
 abstract 
)
+
+ +

Create a simple update lattice from abstract lattice.

+

Parameters

+

abstract : AbstractLattice The abstract lattice used to create simple update lattice.

+ +

Reimplemented from tetragono.abstract_lattice.AbstractLattice.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.__getitem__ ( self,
 l1l2 
)
+
+ +

Get the tensor at the given coordinate.

+

Parameters

+

l1l2 : tuple[int, int] The coordinate.

+

Returns

+

Tensor The tensor at the given coordinate.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.__setitem__ ( self,
 l1l2,
 value 
)
+
+ +

Set the tensor at the given coordinate.

+

Parameters

+

l1l2 : tuple[int, int] The coordinate. value : Tensor The tensor used to set.

+ +
+
+ +

◆ environment()

+ +
+
+ + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.environment ( self)
+
+ +

Get the environment handler of this simple update lattice.

+

Returns

+

SimpleUpdateLatticeEnvironment The environment handler of this simple update lattice.

+ +
+
+ +

◆ initialize_auxiliaries()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.initialize_auxiliaries ( self,
 cut_dimension 
)
+
+ +

Initialize auxiliares.

+

Parameters

+

cut_dimension : int The cut dimension when calculating auxiliary tensors.

+ +
+
+ +

◆ observe()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.observe ( self,
 positions,
 observer 
)
+
+ +

Observe the state.

+

Need to initialize auxiliaries before calling observe.

+

Parameters

+

positions : tuple[tuple[int, int, int], ...] The site and their orbits used to observe. observer : Tensor The operator used to observe.

+

Returns

+

float The observer result, which is normalized.

+ +
+
+ +

◆ observe_energy()

+ +
+
+ + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.observe_energy ( self)
+
+ +

Observe the energy per site.

+

Returns

+

float The energy per site calculated by observing.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLattice.update ( self,
 total_step,
 delta_tau,
 new_dimension 
)
+
+ +

Do simple update on the lattice.

+

Parameters

+

total_step : int The total step number of the simple update. delta_tau : float The delta tau in the evolution operator. new_dimension : int | float The dimension cut used in svd of simple update, or the threshold for the singular value.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/simple_update_lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.js b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.js new file mode 100644 index 000000000..7fbb32e0d --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.js @@ -0,0 +1,13 @@ +var classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice = +[ + [ "__init__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a8a9f2fd840681f2b3ac41c6f6b562535", null ], + [ "__getitem__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58034254a765b7e82de474bc06e63af8", null ], + [ "__getstate__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#aa7b034a8c3c403bb7cb1a0f4b8797038", null ], + [ "__setitem__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58be3056ed6a8ba64747d20c476f3927", null ], + [ "__setstate__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#ab939718bdbac711fa78b7cae01ab6d37", null ], + [ "environment", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a2ad1f572debc5c79e4f966bf19065c0b", null ], + [ "initialize_auxiliaries", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#aec3094a2cf04cf9c439bc177c79c2184", null ], + [ "observe", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a702d1531cc8fde01ed583493c85dcb37", null ], + [ "observe_energy", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af1ed1b0b1919959f69127b544efb8e8b", null ], + [ "update", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af167a2a89fb12d8e127a9d44ecc20cfe", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.png b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.png new file mode 100644 index 0000000000000000000000000000000000000000..198c7bd03ea0b196e8e5887a28cd983a39e11938 GIT binary patch literal 1577 zcmb_cX;70_6#bCFqJp5<35ZqD7}kOW)QBuo7WE?$FoDRv8dBDP0Rjf72pCd@Fd;^v ztg@Be20_BEfJgvwpe%{3A_OFuv6zU^K)<#>I&J^@X5M?}%-p%}zI)DlbZ5tl%6kv* z1pq)9ykv(3068Rt(-q~R6=!wd8QRpHF)sEyJ3A0u7D-|l&$1x&*X-)*QlL*AgQ#LO z))5ClL4S@ho(q&jp&7LM&LvK6Eq{$&TC@McS(Q+U%=foSX^M)nLr4O(YWUjo=`uxn zg#7O(g?TA?8dAM#;(u|O2=tLM{TArCLos(M0H0dVgpAg!IvZjlsU-;$lOB zWy)0|H>K$sOBy$mZ@3eL0(0k+>B02`TLKuuNS5R@)_6Ezsgou&-uAk_K`TaYEBw5< z=mBB(Azw5tmSSpSHV{1<`pr~Ws<;2;-l>XTzJ^MRGRQ8~Cb771nNa~wdV!8+_H%Sw ztvlf|Kn2h5>nMR+zGzUxF}KBg2+X&~Ss?R{GXgZS$$@j@^ajoewS;*(avPWqVAoA| z8;zT^`ufP-b6PC9xHye{L|{D?3Fv4mb=m96M;_n-Q1by;@fW4NLjAw1AZnwrS|IsP zdHE* zoG6twT=T8>5qbv3KU`2YwX>X^rINO`Yd^g9aphx{6DRGwz{3lb9LdlVi!}n()gXzQ zIts<@@VAyL-qubYUO{}Ek1~4WFrpyV*K8CxMgAI)`Unxk6m+Zeud8i-M0Gbaqm$8m z?BMAelymrTh9GD~uLpGJj&%wIQ~ASbR+cYM)xo{zYLQ^2(2-wRCOKP&4BeIQFrl^? z5U?qIZ2jPY)Z>f`yHu*~MyVl;VWHgnWw3D$XV1MGv(mioOumRBiT>={bozu{j@xu5 zR|!dJie1ay=Ux7R;03n$d*r~Cqgah_S;V$iPD$y>6=vDNa_c8>nZnVZIgB4Jf;X~= zh;q2h^nX2VV=d;9v&b*AfdqsvAlGFGY1%z;6(t|3$^$Ig?xvaEjEBsSt-5>eI7_Zs zkpLJ$^p5ivrEkdh%2?PetV2Txpo-=bP+F4ceG3IWiGB@9f2Y#Ro$jW;&kH$}5#lHq|*;3^Q3j>`NEaf*2x=6{P?$hQDxts#&Yo}Jmq}u3= z$tTI@HgfIdrA%(!yYVGgB8)CY1sUfXt-r^K&4a6z{9a%RS7ti=0HfRUg*<9~O`$PB zIYKp_t;fHLd1OljjvXr!o#Fx!8^UTOEl6hZ!G9ikFWTKfPeHHDtbYd(oS+_mqiVv3 P{&fJfceJas@w@d0p;P4v literal 0 HcmV?d00001 diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment-members.html b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment-members.html new file mode 100644 index 000000000..7275d5f5d --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment-members.html @@ -0,0 +1,105 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment Member List
+
+ +
+ + + + diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html new file mode 100644 index 000000000..0a50508e4 --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html @@ -0,0 +1,230 @@ + + + + + + + +TAT: tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment Class Reference
+
+
+ +

Environment handler for simple update lattice. + More...

+ + + + + + + + + + + +

+Public Member Functions

def __init__ (self, owner)
 Create environment handler. More...
 
def __getitem__ (self, where)
 Get the environment by coordinate of site and direction. More...
 
def __setitem__ (self, where, value)
 Set the environment by coordinate of site and direction. More...
 
+

Detailed Description

+

Environment handler for simple update lattice.

+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__init__ ( self,
 owner 
)
+
+ +

Create environment handler.

+

Parameters

+

owner : SimpleUpdateLattice The owner of this handler.

+ +
+
+

Member Function Documentation

+ +

◆ __getitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__getitem__ ( self,
 where 
)
+
+ +

Get the environment by coordinate of site and direction.

+

Parameters

+

where : tuple[int, int, str] The coordinate of site and direction to find environment.

+

Returns

+

Tensor | None Returns the environment. If the environment is missing, or there is no environment here, it returns None.

+ +
+
+ +

◆ __setitem__()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__setitem__ ( self,
 where,
 value 
)
+
+ +

Set the environment by coordinate of site and direction.

+

Parameters

+

where : tuple[int, int, str] The coordinate of site and direction to find environment. value : Tensor | None The environment tensor to set.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/simple_update_lattice.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.js b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.js new file mode 100644 index 000000000..acbe8d12b --- /dev/null +++ b/classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.js @@ -0,0 +1,6 @@ +var classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment = +[ + [ "__init__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a36f40369dd7c59e0f8598d3e8d751b98", null ], + [ "__getitem__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2fe676b4d2a2391f01e81ecf91eeff48", null ], + [ "__setitem__", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2df4906665e07f886349903daf2a0542", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1utility_1_1SeedDiffer-members.html b/classtetragono_1_1utility_1_1SeedDiffer-members.html new file mode 100644 index 000000000..0026b4503 --- /dev/null +++ b/classtetragono_1_1utility_1_1SeedDiffer-members.html @@ -0,0 +1,110 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.utility.SeedDiffer Member List
+
+
+ +

This is the complete list of members for tetragono.utility.SeedDiffer, including all inherited members.

+ + + + + + + + + +
__enter__(self) (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
__exit__(self, exc_type, exc_val, exc_tb) (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
__init__(self) (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
make_seed_diff(self) (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
make_seed_same(self) (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
max_int (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDifferstatic
random_int (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDifferstatic
seed (defined in tetragono.utility.SeedDiffer)tetragono.utility.SeedDiffer
+
+ + + + diff --git a/classtetragono_1_1utility_1_1SeedDiffer.html b/classtetragono_1_1utility_1_1SeedDiffer.html new file mode 100644 index 000000000..e10ab47aa --- /dev/null +++ b/classtetragono_1_1utility_1_1SeedDiffer.html @@ -0,0 +1,142 @@ + + + + + + + +TAT: tetragono.utility.SeedDiffer Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.utility.SeedDiffer Class Reference
+
+
+ + + + + + + + + + + + +

+Public Member Functions

+def make_seed_diff (self)
 
+def make_seed_same (self)
 
+def __enter__ (self)
 
+def __exit__ (self, exc_type, exc_val, exc_tb)
 
+def __init__ (self)
 
+ + + +

+Public Attributes

seed
 
+ + + + + +

+Static Public Attributes

+int max_int = 2**31
 
random_int = TAT.random.uniform_int(0, max_int - 1)
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/utility.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1utility_1_1SeedDiffer.js b/classtetragono_1_1utility_1_1SeedDiffer.js new file mode 100644 index 000000000..60c69b994 --- /dev/null +++ b/classtetragono_1_1utility_1_1SeedDiffer.js @@ -0,0 +1,11 @@ +var classtetragono_1_1utility_1_1SeedDiffer = +[ + [ "__init__", "classtetragono_1_1utility_1_1SeedDiffer.html#af72a30dac146cad6ac08c315ca0bf8e7", null ], + [ "__enter__", "classtetragono_1_1utility_1_1SeedDiffer.html#a295764489c0d39fb03fee998f906d41d", null ], + [ "__exit__", "classtetragono_1_1utility_1_1SeedDiffer.html#a39f279da7b07e79038e1fc07a5bba50b", null ], + [ "make_seed_diff", "classtetragono_1_1utility_1_1SeedDiffer.html#ad03a68bbd9d4145acd21bf5ac36e9296", null ], + [ "make_seed_same", "classtetragono_1_1utility_1_1SeedDiffer.html#a990ea73809ae8dac765f3af6deae0da0", null ], + [ "max_int", "classtetragono_1_1utility_1_1SeedDiffer.html#a7bbff9ad116403c9ec65fac658543e18", null ], + [ "random_int", "classtetragono_1_1utility_1_1SeedDiffer.html#a1292901145e8b255deeed6bb855160d2", null ], + [ "seed", "classtetragono_1_1utility_1_1SeedDiffer.html#abb5cf4239cd2d5fad13b8ffd70fe1782", null ] +]; \ No newline at end of file diff --git a/classtetragono_1_1utility_1_1SignalHandler-members.html b/classtetragono_1_1utility_1_1SignalHandler-members.html new file mode 100644 index 000000000..7e0163fbf --- /dev/null +++ b/classtetragono_1_1utility_1_1SignalHandler-members.html @@ -0,0 +1,109 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono.utility.SignalHandler Member List
+
+
+ +

This is the complete list of members for tetragono.utility.SignalHandler, including all inherited members.

+ + + + + + + + +
__call__(self) (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
__enter__(self) (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
__exit__(self, exc_type, exc_val, exc_tb) (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
__init__(self, handler_signal) (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
saved_handler (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
sigint_recv (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
signal (defined in tetragono.utility.SignalHandler)tetragono.utility.SignalHandler
+
+ + + + diff --git a/classtetragono_1_1utility_1_1SignalHandler.html b/classtetragono_1_1utility_1_1SignalHandler.html new file mode 100644 index 000000000..e7bc54dac --- /dev/null +++ b/classtetragono_1_1utility_1_1SignalHandler.html @@ -0,0 +1,135 @@ + + + + + + + +TAT: tetragono.utility.SignalHandler Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
tetragono.utility.SignalHandler Class Reference
+
+
+ + + + + + + + + + +

+Public Member Functions

+def __init__ (self, handler_signal)
 
+def __enter__ (self)
 
+def __call__ (self)
 
+def __exit__ (self, exc_type, exc_val, exc_tb)
 
+ + + + + + + +

+Public Attributes

signal
 
sigint_recv
 
saved_handler
 
+
The documentation for this class was generated from the following file:
    +
  • tetragono/tetragono/utility.py
  • +
+
+
+ + + + diff --git a/classtetragono_1_1utility_1_1SignalHandler.js b/classtetragono_1_1utility_1_1SignalHandler.js new file mode 100644 index 000000000..312b879af --- /dev/null +++ b/classtetragono_1_1utility_1_1SignalHandler.js @@ -0,0 +1,10 @@ +var classtetragono_1_1utility_1_1SignalHandler = +[ + [ "__init__", "classtetragono_1_1utility_1_1SignalHandler.html#aa68c37aecb9dc03c04d15752484bc14e", null ], + [ "__call__", "classtetragono_1_1utility_1_1SignalHandler.html#a07f49c0b1d43703b7161d943fe52618f", null ], + [ "__enter__", "classtetragono_1_1utility_1_1SignalHandler.html#a70917ec7347e3cbde845eb9cf0d57c3d", null ], + [ "__exit__", "classtetragono_1_1utility_1_1SignalHandler.html#a9e2ea7e118cd5bf42cd3dc45988d83d3", null ], + [ "saved_handler", "classtetragono_1_1utility_1_1SignalHandler.html#a51590d19fc1ecd6f791e65004a22965c", null ], + [ "sigint_recv", "classtetragono_1_1utility_1_1SignalHandler.html#a41297716b8fe7ab097d10a6674f300de", null ], + [ "signal", "classtetragono_1_1utility_1_1SignalHandler.html#a1c50cf43f6ebddbf9c14d8bc1be8010f", null ] +]; \ No newline at end of file diff --git a/clear__symmetry_8hpp.html b/clear__symmetry_8hpp.html new file mode 100644 index 000000000..3509d57fb --- /dev/null +++ b/clear__symmetry_8hpp.html @@ -0,0 +1,123 @@ + + + + + + + +TAT: include/TAT/implement/clear_symmetry.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
clear_symmetry.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+ +

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/clear__symmetry_8hpp.js b/clear__symmetry_8hpp.js new file mode 100644 index 000000000..2b97c5dd5 --- /dev/null +++ b/clear__symmetry_8hpp.js @@ -0,0 +1,4 @@ +var clear__symmetry_8hpp = +[ + [ "TAT_CLEAR_SYMMETRY_HPP", "clear__symmetry_8hpp.html#ab327b72fb1abb6d6429a4f6061793071", null ] +]; \ No newline at end of file diff --git a/clear__symmetry_8hpp_source.html b/clear__symmetry_8hpp_source.html new file mode 100644 index 000000000..c801b72d0 --- /dev/null +++ b/clear__symmetry_8hpp_source.html @@ -0,0 +1,226 @@ + + + + + + + +TAT: include/TAT/implement/clear_symmetry.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
clear_symmetry.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_CLEAR_SYMMETRY_HPP
+
22 #define TAT_CLEAR_SYMMETRY_HPP
+
23 
+
24 #include "../structure/tensor.hpp"
+
25 #include "../utility/allocator.hpp"
+
26 #include "../utility/multidimension_span.hpp"
+
27 
+
28 namespace TAT {
+
29  template<typename ScalarType, typename SymmetryT, typename Name>
+ +
31  auto pmr_guard = scope_resource(default_buffer_size);
+
32  if constexpr (SymmetryT::is_fermi_symmetry) {
+
33  detail::warning("Clearing a fermi tensor's symmetry, it is dangerous if you do not take care of edge order");
+
34  }
+
35  std::vector<Edge<NoSymmetry>> result_edges;
+
36  result_edges.reserve(rank());
+
37  for (auto i = 0; i < rank(); i++) {
+
38  result_edges.push_back(edges(i).total_dimension());
+
39  }
+
40  // Generate no symmetry tensor edge total dimension and create it first
+
41  auto result = Tensor<ScalarType, NoSymmetry, Name>(names(), std::move(result_edges)).zero_();
+
42  auto& result_block = result.blocks().begin()->value();
+
43  // copy every block into no symmetry tensor
+
44  // find the dimension of the block, the result leading is same to total dimension
+
45  // and find the offset of destination
+
46  // it is easy to get the offset of source then call transpose
+
47  for (auto it = blocks().begin(); it.valid; ++it) {
+
48  if (it->has_value()) {
+
49  pmr::vector<Size> result_indices;
+
50  pmr::vector<Size> result_dimensions;
+
51  result_indices.reserve(rank());
+
52  result_dimensions.reserve(rank());
+
53  for (auto i = 0; i < rank(); i++) {
+
54  auto& [source_symmetry, source_dimension] = edges(i).segments(it.indices[i]);
+
55  result_indices.push_back(edges(i).index_by_point({source_symmetry, 0}));
+
56  result_dimensions.push_back(source_dimension);
+
57  }
+ +
59  &result_block.at(result_indices),
+
60  std::move(result_dimensions),
+
61  {result_block.leadings().begin(), result_block.leadings().end()}
+
62  );
+
63  mdspan_transform(it->value(), temporary_span, [](const auto& x) { return x; });
+
64  }
+
65  }
+
66  return result;
+
67  }
+
68 
+
69  template<typename ScalarType, typename SymmetryT, typename Name>
+ +
71  auto pmr_guard = scope_resource(default_buffer_size);
+
72  if constexpr (!SymmetryT::is_fermi_symmetry) {
+
73  detail::error("It is invalid to call clear fermi symmetry on a bose symmetry tensor");
+
74  }
+
75  std::vector<Edge<ParitySymmetry>> result_edges;
+
76  result_edges.reserve(rank());
+
77  for (auto i = 0; i < rank(); i++) {
+
78  std::array<Size, 2> dimensions = {0, 0};
+
79  for (const auto& [symmetry, dimension] : edges(i).segments()) {
+
80  dimensions[symmetry.parity()] += dimension;
+
81  }
+
82  std::vector<std::pair<ParitySymmetry, Size>> segments;
+
83  segments.reserve(2);
+
84  if (const auto dimension = dimensions[false]; dimension) {
+
85  segments.push_back({false, dimension});
+
86  }
+
87  if (const auto dimension = dimensions[true]; dimension) {
+
88  segments.push_back({true, dimension});
+
89  }
+
90  result_edges.emplace_back(std::move(segments), edges(i).arrow());
+
91  }
+
92  auto result = Tensor<ScalarType, ParitySymmetry, Name>(names(), std::move(result_edges)).zero_();
+
93 
+
94  // copy every block into parity symmetry tensor
+
95  // find the dimension of the block, the result leading is same to total dimension
+
96  // and find the offset of destination
+
97  // it is easy to get the offset of source then call transpose
+
98  for (auto it = blocks().begin(); it.valid; ++it) {
+
99  if (it->has_value()) {
+
100  // Find the result block and generate the temporary_span
+
101  pmr::vector<ParitySymmetry> block_indices;
+
102  block_indices.reserve(rank());
+
103  pmr::vector<Size> result_dimensions;
+
104  result_dimensions.reserve(rank());
+
105  pmr::vector<Size> result_indices;
+
106  result_indices.reserve(rank());
+
107  for (auto i = 0; i < rank(); i++) {
+
108  auto& [source_symmetry, source_dimension] = edges(i).segments(it.indices[i]);
+
109  block_indices.push_back(source_symmetry.parity());
+
110  result_dimensions.push_back(source_dimension);
+
111 
+
112  Size index = 0;
+
113  for (auto [symmetry, dimension] : edges(i).segments()) {
+
114  if (symmetry == source_symmetry) {
+
115  break;
+
116  }
+
117  if (symmetry.parity() == source_symmetry.parity()) {
+
118  index += dimension;
+
119  }
+
120  }
+
121  result_indices.push_back(index);
+
122  }
+
123  auto& result_block = result.blocks(block_indices);
+
124 
+
125  mdspan<ScalarType, pmr::vector<Size>> temporary_span(
+
126  &result_block.at(result_indices),
+
127  std::move(result_dimensions),
+
128  {result_block.leadings().begin(), result_block.leadings().end()}
+
129  );
+
130  mdspan_transform(it->value(), temporary_span, [](const auto& x) { return x; });
+
131  }
+
132  }
+
133  return result;
+
134  }
+
135 } // namespace TAT
+
136 #endif
+
Tensor type.
Definition: tensor.hpp:87
+
Tensor< ScalarType, NoSymmetry, Name > clear_bose_symmetry() const
Convert symmetry tensor to non-symmetry tensor.
Definition: clear_symmetry.hpp:30
+
Tensor< ScalarType, ParitySymmetry, Name > clear_fermi_symmetry() const
Convert fermionic symmetry tensor to parity symmetry tensor.
Definition: clear_symmetry.hpp:70
+
Tensor< ScalarType, Symmetry, Name > & zero_() &
Set all the value of the tensor to zero.
Definition: tensor.hpp:566
+
Definition: multidimension_span.hpp:33
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
Definition: allocator.hpp:295
+
+
+ + + + diff --git a/closed.png b/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..98cc2c909da37a6df914fbf67780eebd99c597f5 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT literal 0 HcmV?d00001 diff --git a/common__variable_8hpp.html b/common__variable_8hpp.html new file mode 100644 index 000000000..10652aaa4 --- /dev/null +++ b/common__variable_8hpp.html @@ -0,0 +1,376 @@ + + + + + + + +TAT: include/TAT/utility/common_variable.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
common_variable.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <cstdint>
+#include <complex>
+#include <type_traits>
+#include <array>
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Classes

struct  TAT::remove_cvref< T >
 
struct  TAT::type_identity< T >
 
struct  TAT::empty_list< T >
 
struct  TAT::overloaded< Fs >
 
+ + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + +

+Macros

+#define TAT_COMMON_VARIABLE_HPP
 
+#define TAT_VERSION   "0.3.12"
 
+#define TAT_ERROR_BITS   0
 
+#define TAT_NOTHING_BITS   0
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

using TAT::Rank = std::uint16_t
 Tensor rank type. More...
 
using TAT::Nums = std::uint32_t
 Tensor block number, or dimension segment number type. More...
 
using TAT::Size = std::uint64_t
 Tensor content data size, or dimension size type. More...
 
using TAT::Arrow = bool
 Fermi arrow type. More...
 
template<typename T >
using TAT::real_scalar = typename detail::real_scalar_helper< T >::type
 Get corresponding real type, used in svd and norm. More...
 
+template<template< typename... > class Op, typename... Args>
using TAT::is_detected = typename detail::detector< void, Op, Args... >
 
+template<typename T >
using TAT::remove_cvref_t = typename remove_cvref< T >::type
 
+template<typename T >
using TAT::type_identity_t = typename type_identity< T >::type
 
+ + + + + + + + + + + + + + + + + + +

+Functions

void TAT::detail::log (const char *message)
 Print log for TAT. More...
 
void TAT::detail::warning (const char *message)
 Print warning. More...
 
void TAT::detail::nothing (const char *)
 Do nothing. More...
 
void TAT::detail::error (const char *message)
 Throw runtime exception. More...
 
+template<typename... Fs>
 TAT::overloaded (Fs...) -> overloaded< Fs... >
 
+std::size_t & TAT::hash_absorb (std::size_t &seed, std::size_t value)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

const char * TAT::version = "0.3.12"
 TAT version. More...
 
constexpr bool TAT::debug_mode
 Debug flag. More...
 
const char * TAT::information
 TAT informations about compiler and license. More...
 
+const evil_t TAT::detail::evil
 
+constexpr auto TAT::detail::what_if_lapack_error = 0 & 1 ? error : 0 & 1 ? nothing : warning
 
+constexpr auto TAT::detail::what_if_copy_shared = 0 & 2 ? error : 0 & 2 ? nothing : warning
 
+template<typename T >
constexpr bool TAT::is_real = std::is_scalar_v<T>
 
+template<typename T >
constexpr bool TAT::is_complex = detail::is_complex_helper<T>::value
 
+template<typename T >
constexpr bool TAT::is_scalar = is_real<T> || is_complex<T>
 
+template<template< typename... > class Op, typename... Args>
constexpr bool TAT::is_detected_v = is_detected<Op, Args...>::value
 
+constexpr std::size_t TAT::unordered_parameter = 4
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+

Function Documentation

+ +

◆ error()

+ +
+
+ + + + + +
+ + + + + + + + +
void TAT::detail::error (const char * message)
+
+inline
+
+ +

Throw runtime exception.

+
Parameters
+ + +
messageexception message
+
+
+
See also
warning, nothing
+ +
+
+ +

◆ log()

+ +
+
+ + + + + +
+ + + + + + + + +
void TAT::detail::log (const char * message)
+
+inline
+
+ +

Print log for TAT.

+ +
+
+ +

◆ nothing()

+ +
+
+ + + + + +
+ + + + + + + + +
void TAT::detail::nothing (const char * )
+
+inline
+
+ +

Do nothing.

+
See also
warning, error
+ +
+
+ +

◆ warning()

+ +
+
+ + + + + +
+ + + + + + + + +
void TAT::detail::warning (const char * message)
+
+inline
+
+ +

Print warning.

+

Share the same interface with nothing and error. Used for different situation, control by macro TAT_NOTHING_BITS and TAT_ERROR_BITS

+
Parameters
+ + +
messagewarning message
+
+
+
See also
nothing, error
+ +
+
+
+
+ + + + diff --git a/common__variable_8hpp.js b/common__variable_8hpp.js new file mode 100644 index 000000000..edf3a0358 --- /dev/null +++ b/common__variable_8hpp.js @@ -0,0 +1,36 @@ +var common__variable_8hpp = +[ + [ "remove_cvref", "structTAT_1_1remove__cvref.html", "structTAT_1_1remove__cvref" ], + [ "type_identity", "structTAT_1_1type__identity.html", "structTAT_1_1type__identity" ], + [ "empty_list", "structTAT_1_1empty__list.html", "structTAT_1_1empty__list" ], + [ "overloaded", "structTAT_1_1overloaded.html", null ], + [ "TAT_COMMON_VARIABLE_HPP", "common__variable_8hpp.html#a4388ca7e1b49d03ad1d452d713d2c4d9", null ], + [ "TAT_ERROR_BITS", "common__variable_8hpp.html#aabc1f4cf655eea45a1c486db1d5ff729", null ], + [ "TAT_NOTHING_BITS", "common__variable_8hpp.html#a78318af3f5a57dc703af7ac1910cd709", null ], + [ "TAT_VERSION", "common__variable_8hpp.html#ae9d486f40847d78f3f03001400cb1a6d", null ], + [ "Arrow", "common__variable_8hpp.html#a78326bee7cc963cd2d165718de5c0465", null ], + [ "is_detected", "common__variable_8hpp.html#a4b6f9d765bf49123b445e7000bfe19ac", null ], + [ "Nums", "common__variable_8hpp.html#a713d18eb8b9832d7eefc21eb22df52c4", null ], + [ "Rank", "common__variable_8hpp.html#a59fa5a93972a6b9079e60c4b8c237eeb", null ], + [ "real_scalar", "common__variable_8hpp.html#ac116f771206a618203057bffa8074f5c", null ], + [ "remove_cvref_t", "common__variable_8hpp.html#a257c3ce45b3735b3fbdb0b1732282c33", null ], + [ "Size", "common__variable_8hpp.html#a165aa7ea040b184dc85762582d2b5a9c", null ], + [ "type_identity_t", "common__variable_8hpp.html#a377476874ed86fe3247ff3559b1b18dc", null ], + [ "error", "common__variable_8hpp.html#a701eeade9e0991be1161d1d77fffa1c1", null ], + [ "hash_absorb", "common__variable_8hpp.html#a4f21d44d814756f9339e8e12ffbfd7e2", null ], + [ "log", "common__variable_8hpp.html#a74538be91c8fa85b6f8ac2b5ac884ce2", null ], + [ "nothing", "common__variable_8hpp.html#afb968550316dbe2e1ebd9075c74928ad", null ], + [ "overloaded", "common__variable_8hpp.html#a2c743d6f3e759644e279c26aacf5915c", null ], + [ "warning", "common__variable_8hpp.html#a7e782f1f68a68861d1e3c7b325e6729e", null ], + [ "debug_mode", "common__variable_8hpp.html#a6d44e6f53051ef6947a1906a0d5e7a2f", null ], + [ "evil", "common__variable_8hpp.html#a887c1efdb013f16657048ebd7ab72fb8", null ], + [ "information", "common__variable_8hpp.html#a4bd3f61e9cfc98419950be0791e15e1d", null ], + [ "is_complex", "common__variable_8hpp.html#a924c2c0559af13f5c90b56acec224f37", null ], + [ "is_detected_v", "common__variable_8hpp.html#ab1ee68ca346aaa0989b16cc4d3f3ad58", null ], + [ "is_real", "common__variable_8hpp.html#af164463714182ae66c7100157f741286", null ], + [ "is_scalar", "common__variable_8hpp.html#a092a64e24ac3617c86d8635f6eb7cc46", null ], + [ "unordered_parameter", "common__variable_8hpp.html#ac52a5088a37c7f96a36b2ab72b8893ba", null ], + [ "version", "common__variable_8hpp.html#a8c4989bfe390f6c51321f9353b638e23", null ], + [ "what_if_copy_shared", "common__variable_8hpp.html#a5ace4712d999d52767ef7253f208a124", null ], + [ "what_if_lapack_error", "common__variable_8hpp.html#a767192ad661109eee8452ca747c1a005", null ] +]; \ No newline at end of file diff --git a/common__variable_8hpp_source.html b/common__variable_8hpp_source.html new file mode 100644 index 000000000..4230b1b38 --- /dev/null +++ b/common__variable_8hpp_source.html @@ -0,0 +1,293 @@ + + + + + + + +TAT: include/TAT/utility/common_variable.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
common_variable.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_COMMON_VARIABLE_HPP
+
22 #define TAT_COMMON_VARIABLE_HPP
+
23 
+
24 // Macros options
+
25 // - TAT_USE_MPI: define to enable mpi support, cmake can configure it
+
26 // - TAT_USE_MKL_GEMM_BATCH: define to use mkl ?gemm_batch, cmake can configure it
+
27 
+
28 // - TAT_USE_FAST_NAME: define to use TAT::FastName as default name instead of std::string
+
29 // - TAT_USE_TIMER: define to add timers for some common operator
+
30 
+
31 // - TAT_ERROR_BITS: throw exception for different situations, rather than print warning
+
32 // - TAT_NOTHING_BITS: keep silent for different situations, rather than print warning
+
33 
+
37 namespace TAT {
+
38 #ifndef TAT_VERSION
+
39 #define TAT_VERSION "0.3.12"
+
40 #endif
+
41 
+
45  inline const char* version = TAT_VERSION;
+
46 
+
50  inline constexpr bool debug_mode =
+
51 #ifdef NDEBUG
+
52  false
+
53 #else
+
54  true
+
55 #endif
+
56  ;
+
57 
+
61  inline const char* information = "TAT " TAT_VERSION " ("
+
62 #ifdef TAT_BUILD_TYPE
+
63  "" TAT_BUILD_TYPE ", "
+
64 #endif
+
65  "" __DATE__ ", " __TIME__
+
66 #ifdef TAT_COMPILER_INFORMATION
+
67  ", " TAT_COMPILER_INFORMATION
+
68 #endif
+
69  ")\n"
+
70  "Copyright (C) 2019-2023 Hao Zhang<zh970205@mail.ustc.edu.cn>\n"
+
71  "This is free software; see the source for copying conditions. There is NO\n"
+
72  "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.";
+
73 
+
74  // evil
+
75  namespace detail {
+
79  struct evil_t {
+
80  evil_t();
+
81  ~evil_t();
+
82  };
+
83  inline const evil_t evil;
+
84  } // namespace detail
+
85 
+
86  // log and warning
+
87  namespace detail {
+
91  inline void log(const char* message);
+
92 
+
103  inline void warning(const char* message);
+
104 
+
110  inline void nothing(const char*) { }
+
111 
+
119  [[noreturn]] inline void error(const char* message);
+
120 
+
121 #ifndef TAT_ERROR_BITS
+
122 #define TAT_ERROR_BITS 0
+
123 #endif
+
124 #ifndef TAT_NOTHING_BITS
+
125 #define TAT_NOTHING_BITS 0
+
126 #endif
+
127 
+
128  constexpr auto what_if_lapack_error = TAT_ERROR_BITS & 1 ? error : TAT_NOTHING_BITS & 1 ? nothing : warning;
+
129  constexpr auto what_if_copy_shared = TAT_ERROR_BITS & 2 ? error : TAT_NOTHING_BITS & 2 ? nothing : warning;
+
130  } // namespace detail
+
131 } // namespace TAT
+
132 
+
133 #include <cstdint>
+
134 
+
135 namespace TAT {
+
136  // type alias
+
137 
+
138  // The most common used integral type `short`, `int`, `long` have different size in different platform
+
139  // in linux, they are 16, 32, 64(lp64)
+
140  // in windows, they are 16, 32, 32(llp64)
+
141  // So use uintxx_t explicitly to avoid it incompatible when import data exported in another platform
+
142  // In TAT, there is also `int` type common used, especially when calling blas or lapack function
+
143  // It is all 32 bit in most platform currently.
+
144  // But it is 64bit in ilp64 and 16bit in lp32
+
145  // So please do not link blas lapack using ilp64 or lp32
+
149  using Rank = std::uint16_t;
+
153  using Nums = std::uint32_t;
+
157  using Size = std::uint64_t;
+
158 
+
166  using Arrow = bool;
+
167 } // namespace TAT
+
168 
+
169 #include <complex>
+
170 #include <type_traits>
+
171 
+
172 namespace TAT {
+
173  // traits about scalar
+
174  template<typename T>
+
175  constexpr bool is_real = std::is_scalar_v<T>;
+
176 
+
177  namespace detail {
+
178  template<typename T>
+
179  struct is_complex_helper : std::bool_constant<false> { };
+
180  template<typename T>
+
181  struct is_complex_helper<std::complex<T>> : std::bool_constant<true> { };
+
182  } // namespace detail
+
183  template<typename T>
+
184  constexpr bool is_complex = detail::is_complex_helper<T>::value;
+
185 
+
186  template<typename T>
+
187  constexpr bool is_scalar = is_real<T> || is_complex<T>;
+
188 
+
189  namespace detail {
+
190  template<typename T>
+
191  struct real_scalar_helper : std::conditional<is_real<T>, T, void> { };
+
192  template<typename T>
+
193  struct real_scalar_helper<std::complex<T>> : std::conditional<is_real<T>, T, void> { };
+
194  } // namespace detail
+
200  template<typename T>
+
201  using real_scalar = typename detail::real_scalar_helper<T>::type;
+
202 
+
203  // type traits from c++latest
+
204  namespace detail {
+
205  template<typename AlwaysVoid, template<typename...> class Op, typename... Args>
+
206  struct detector : std::false_type { };
+
207 
+
208  template<template<typename...> class Op, typename... Args>
+
209  struct detector<std::void_t<Op<Args...>>, Op, Args...> : std::true_type { };
+
210 
+
211  } // namespace detail
+
212  template<template<typename...> class Op, typename... Args>
+
213  using is_detected = typename detail::detector<void, Op, Args...>;
+
214  template<template<typename...> class Op, typename... Args>
+
215  constexpr bool is_detected_v = is_detected<Op, Args...>::value;
+
216 
+
217  template<typename T>
+
218  struct remove_cvref {
+
219  using type = std::remove_cv_t<std::remove_reference_t<T>>;
+
220  };
+
221  template<typename T>
+
222  using remove_cvref_t = typename remove_cvref<T>::type;
+
223 
+
224  template<typename T>
+
225  struct type_identity {
+
226  using type = T;
+
227  };
+
228  template<typename T>
+
229  using type_identity_t = typename type_identity<T>::type;
+
230 } // namespace TAT
+
231 
+
232 #include <array>
+
233 
+
234 namespace TAT {
+
235  template<typename T>
+
236  struct empty_list : std::array<T, 0> {
+
237  template<typename U>
+
238  auto find(const U&) const {
+
239  return this->end();
+
240  }
+
241  };
+
242 
+
243  template<typename... Fs>
+
244  struct overloaded : Fs... {
+
245  using Fs::operator()...;
+
246  };
+
247  template<typename... Fs>
+
248  overloaded(Fs...) -> overloaded<Fs...>;
+
249 
+
250  constexpr std::size_t unordered_parameter = 4;
+
251 
+
252  inline std::size_t& hash_absorb(std::size_t& seed, std::size_t value) {
+
253  // copy from boost
+
254  return seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+
255  }
+
256 } // namespace TAT
+
257 
+
258 #endif
+
void nothing(const char *)
Do nothing.
Definition: common_variable.hpp:110
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
const char * information
TAT informations about compiler and license.
Definition: common_variable.hpp:61
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
constexpr bool debug_mode
Debug flag.
Definition: common_variable.hpp:50
+
std::uint32_t Nums
Tensor block number, or dimension segment number type.
Definition: common_variable.hpp:153
+
bool Arrow
Fermi arrow type.
Definition: common_variable.hpp:166
+
const char * version
TAT version.
Definition: common_variable.hpp:45
+
typename detail::real_scalar_helper< T >::type real_scalar
Get corresponding real type, used in svd and norm.
Definition: common_variable.hpp:201
+
Definition: common_variable.hpp:236
+
Definition: common_variable.hpp:244
+
Definition: common_variable.hpp:218
+
Definition: common_variable.hpp:225
+
+
+ + + + diff --git a/conjugate_8hpp.html b/conjugate_8hpp.html new file mode 100644 index 000000000..3fe3957e0 --- /dev/null +++ b/conjugate_8hpp.html @@ -0,0 +1,130 @@ + + + + + + + +TAT: include/TAT/implement/conjugate.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
conjugate.hpp File Reference
+
+
+ +

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+ +

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + +

+Variables

+timer TAT::conjugate_guard ("conjugate")
 
+

Detailed Description

+

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/conjugate_8hpp.js b/conjugate_8hpp.js new file mode 100644 index 000000000..a605948bf --- /dev/null +++ b/conjugate_8hpp.js @@ -0,0 +1,5 @@ +var conjugate_8hpp = +[ + [ "TAT_CONJUGATE_HPP", "conjugate_8hpp.html#a7a2459373cbd970512cd1623d71cdc94", null ], + [ "conjugate_guard", "conjugate_8hpp.html#a972d66e56d3ea52097e02a22719a848c", null ] +]; \ No newline at end of file diff --git a/conjugate_8hpp_source.html b/conjugate_8hpp_source.html new file mode 100644 index 000000000..2295dba8b --- /dev/null +++ b/conjugate_8hpp_source.html @@ -0,0 +1,212 @@ + + + + + + + +TAT: include/TAT/implement/conjugate.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
conjugate.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_CONJUGATE_HPP
+
22 #define TAT_CONJUGATE_HPP
+
23 
+
24 #include "../structure/tensor.hpp"
+
25 #include "../utility/allocator.hpp"
+
26 #include "../utility/timer.hpp"
+
27 
+
28 namespace TAT {
+
29  inline timer conjugate_guard("conjugate");
+
30 
+
31  template<typename ScalarType, typename Symmetry, typename Name>
+ +
33  auto timer_guard = conjugate_guard();
+
34  auto pmr_guard = scope_resource(default_buffer_size);
+
35  if constexpr (Symmetry::length == 0) {
+
36  if constexpr (is_real<ScalarType>) {
+
37  return *this;
+
38  } else if constexpr (is_complex<ScalarType>) {
+
39  return map([](const auto& x) { return std::conj(x); });
+
40  }
+
41  }
+
42 
+
43  auto result_edges = std::vector<Edge<Symmetry>>();
+
44  result_edges.reserve(rank());
+
45  for (const auto& edge : edges()) {
+
46  result_edges.push_back(edge.conjugate());
+
47  }
+
48  auto result = Tensor<ScalarType, Symmetry, Name>(names(), std::move(result_edges));
+
49 
+
50  // sign of block is full transpose ^ ^(parity of symmetry && is physics edge with arrow true)
+
51  auto signs = mdspan<std::pair<Size, bool>, pmr::vector<Size>>(nullptr, {blocks().dimensions().begin(), blocks().dimensions().end()});
+
52  auto signs_pool = pmr::vector<std::pair<Size, bool>>(signs.size()); // sum of parity and total parity
+
53  signs.set_data(signs_pool.data());
+
54  if constexpr (Symmetry::is_fermi_symmetry) {
+
55  for (auto i = 0; i < rank(); i++) {
+
56  const bool trivial_metric_with_arrow_true = edges(i).arrow() && trivial_metric;
+
57  Size self_size = signs.dimensions(i);
+
58  Size in_size = signs.leadings(i);
+
59  Size out_size = signs.size() == 0 ? 0 : signs.size() / (self_size * in_size);
+
60  for (Size x = 0; x < out_size; x++) {
+
61  auto offset_for_x = x;
+
62  for (Size y = 0; y < self_size; y++) {
+
63  Symmetry symmetry = edges(i).segments(y).first;
+
64  if (!symmetry.parity()) {
+
65  continue;
+
66  }
+
67  auto offset_for_y = offset_for_x * self_size + y;
+
68  for (Size z = 0; z < in_size; z++) {
+
69  auto offset_for_z = offset_for_y * in_size + z;
+
70  // to get full transpose sign, calculate (it & 2) != 0 later
+
71  signs_pool[offset_for_z].first += 1;
+
72  // physics edge apply sign if arrow is true
+
73  signs_pool[offset_for_z].second ^= trivial_metric_with_arrow_true;
+
74  }
+
75  }
+
76  }
+
77  }
+
78  }
+
79 
+
80  for (auto i = 0; i < signs.size(); i++) {
+
81  if (!blocks().data()[i].has_value()) {
+
82  continue;
+
83  }
+
84  const auto& block_source = blocks().data()[i].value();
+
85  auto& block_destination = result.blocks().data()[i].value();
+
86 
+
87  const ScalarType* __restrict source = block_source.data();
+
88  ScalarType* __restrict destination = block_destination.data();
+
89  const Size total_size = block_source.size();
+
90 
+
91  bool parity = false;
+
92  if constexpr (Symmetry::is_fermi_symmetry) {
+
93  auto [sum_parity, total_parity] = signs_pool[i];
+
94  parity = total_parity ^ ((sum_parity & 2) != 0);
+
95  }
+
96 
+
97  if constexpr (is_complex<ScalarType>) {
+
98  if (parity) {
+
99  for (Size i = 0; i < total_size; i++) {
+
100  destination[i] = -std::conj(source[i]);
+
101  }
+
102  } else {
+
103  for (Size i = 0; i < total_size; i++) {
+
104  destination[i] = std::conj(source[i]);
+
105  }
+
106  }
+
107  } else {
+
108  if (parity) {
+
109  for (Size i = 0; i < total_size; i++) {
+
110  destination[i] = -source[i];
+
111  }
+
112  } else {
+
113  for (Size i = 0; i < total_size; i++) {
+
114  destination[i] = source[i];
+
115  }
+
116  }
+
117  }
+
118  }
+
119  return result;
+
120  }
+
121 } // namespace TAT
+
122 #endif
+
Tensor type.
Definition: tensor.hpp:87
+
Tensor< ScalarType, Symmetry, Name > conjugate(bool trivial_metric=false) const
Get the conjugated tensor.
Definition: conjugate.hpp:32
+
Definition: multidimension_span.hpp:33
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
Definition: symmetry.hpp:95
+
bool parity() const
Get the total parity, whether fermion or boson.
Definition: symmetry.hpp:222
+
Definition: allocator.hpp:295
+
+
+ + + + diff --git a/const__integral_8hpp.html b/const__integral_8hpp.html new file mode 100644 index 000000000..2c304e688 --- /dev/null +++ b/const__integral_8hpp.html @@ -0,0 +1,145 @@ + + + + + + + +TAT: include/TAT/utility/const_integral.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
const_integral.hpp File Reference
+
+
+ +

Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <variant>
+
+

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + + + + + + + + + +

+Functions

+template<typename T >
 TAT::detail::const_integral_t (T) -> const_integral_t< 0, T >
 
+template<typename R , typename T >
TAT::detail::to_const_integral_helper (T value)
 
+template<typename R , typename T , T first_value, T... possible_value>
TAT::detail::to_const_integral_helper (T value)
 
template<typename T , T... possible_value>
auto TAT::to_const_integral (T value)
 Convert a variable to std::variant<run time variable, compile time variable 1, compile time variable 2, ...> More...
 
+template<typename T >
auto TAT::to_const_integral_0_to_16 (T value)
 
+

Detailed Description

+

Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/const__integral_8hpp.js b/const__integral_8hpp.js new file mode 100644 index 000000000..a9d0a7ab9 --- /dev/null +++ b/const__integral_8hpp.js @@ -0,0 +1,9 @@ +var const__integral_8hpp = +[ + [ "TAT_CONST_INTEGRAL_HPP", "const__integral_8hpp.html#a2eeb98602fdefb4be3da4215636afab9", null ], + [ "const_integral_t", "const__integral_8hpp.html#aac3c5f7fcc8daa4f3fb2158a4762279d", null ], + [ "to_const_integral", "const__integral_8hpp.html#a310b619f23bfbff05a8bb9f0fe28b198", null ], + [ "to_const_integral_0_to_16", "const__integral_8hpp.html#a502965ec85fd816764a376bab412faf3", null ], + [ "to_const_integral_helper", "const__integral_8hpp.html#a01feaa4c4b1e2f31dbad1e29f5df8289", null ], + [ "to_const_integral_helper", "const__integral_8hpp.html#a14afb807479b2d34b1c2ac005a324361", null ] +]; \ No newline at end of file diff --git a/const__integral_8hpp_source.html b/const__integral_8hpp_source.html new file mode 100644 index 000000000..30c326089 --- /dev/null +++ b/const__integral_8hpp_source.html @@ -0,0 +1,165 @@ + + + + + + + +TAT: include/TAT/utility/const_integral.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
const_integral.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_CONST_INTEGRAL_HPP
+
22 #define TAT_CONST_INTEGRAL_HPP
+
23 
+
24 #include <variant>
+
25 
+
26 namespace TAT {
+
27  namespace detail {
+
35  template<auto, typename DynamicType = void>
+
36  struct const_integral_t {
+
37  using value_type = DynamicType;
+
38  value_type m_value;
+
39  const_integral_t() = delete;
+
40  const_integral_t(value_type v) : m_value(v) { }
+
41  value_type value() const {
+
42  return m_value;
+
43  }
+
44  static constexpr bool is_static = false;
+
45  static constexpr bool is_dynamic = true;
+
46  };
+
47 
+
48  template<auto StaticValue>
+
49  struct const_integral_t<StaticValue, void> {
+
50  using value_type = decltype(StaticValue);
+
51  const_integral_t() = default;
+
52  static constexpr value_type value() {
+
53  return StaticValue;
+
54  }
+
55  static constexpr bool is_static = true;
+
56  static constexpr bool is_dynamic = false;
+
57  };
+
58 
+
59  template<typename T>
+
60  const_integral_t(T) -> const_integral_t<0, T>;
+
61 
+
62  template<typename R, typename T>
+
63  R to_const_integral_helper(T value) {
+
64  return const_integral_t(value);
+
65  }
+
66  template<typename R, typename T, T first_value, T... possible_value>
+
67  R to_const_integral_helper(T value) {
+
68  if (first_value == value) {
+
69  return const_integral_t<first_value>();
+
70  } else {
+
71  return to_const_integral_helper<R, T, possible_value...>(value);
+
72  }
+
73  }
+
74  } // namespace detail
+
75 
+
81  template<typename T, T... possible_value>
+
82  auto to_const_integral(T value) {
+
83  using result_type = std::variant<detail::const_integral_t<0, T>, detail::const_integral_t<possible_value>...>;
+
84  return detail::to_const_integral_helper<result_type, T, possible_value...>(value);
+
85  }
+
86 
+
87  template<typename T>
+
88  auto to_const_integral_0_to_16(T value) {
+
89  return to_const_integral<T, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16>(value);
+
90  }
+
91 } // namespace TAT
+
92 
+
93 #endif
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
auto to_const_integral(T value)
Convert a variable to std::variant<run time variable, compile time variable 1, compile time variable ...
Definition: const_integral.hpp:82
+
+
+ + + + diff --git a/contract_8hpp.html b/contract_8hpp.html new file mode 100644 index 000000000..b7a77f72e --- /dev/null +++ b/contract_8hpp.html @@ -0,0 +1,185 @@ + + + + + + + +TAT: include/TAT/implement/contract.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
contract.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+ +

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+int sgemm_ (const char *transpose_a, const char *transpose_b, const int *m, const int *n, const int *k, const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, const float *beta, float *c, const int *ldc)
 
+int dgemm_ (const char *transpose_a, const char *transpose_b, const int *m, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc)
 
+int cgemm_ (const char *transpose_a, const char *transpose_b, const int *m, const int *n, const int *k, const std::complex< float > *alpha, const std::complex< float > *a, const int *lda, const std::complex< float > *b, const int *ldb, const std::complex< float > *beta, std::complex< float > *c, const int *ldc)
 
+int zgemm_ (const char *transpose_a, const char *transpose_b, const int *m, const int *n, const int *k, const std::complex< double > *alpha, const std::complex< double > *a, const int *lda, const std::complex< double > *b, const int *ldb, const std::complex< double > *beta, std::complex< double > *c, const int *ldc)
 
+template<typename ScalarType , bool same_shape>
void TAT::detail::gemm_batch (const char *transpose_a, const char *transpose_b, const int *m, const int *n, const int *k, const ScalarType *alpha, const ScalarType **a, const int *lda, const ScalarType **b, const int *ldb, const ScalarType *beta, ScalarType **c, const int *ldc, const int &batch_size)
 
+template<typename Name , typename SetNameName >
auto TAT::detail::generate_contract_map (const SetNameName &contract_pairs)
 
+template<typename ScalarType , typename Symmetry , typename Name >
void TAT::detail::check_valid_contract_plan (const Tensor< ScalarType, Symmetry, Name > &tensor_1, const Tensor< ScalarType, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const pmr::unordered_map< Name, Name > &contract_names_1_2, const pmr::unordered_map< Name, Name > &contract_names_2_1, const std::unordered_set< Name > &fuse_names={})
 
+template<typename ScalarType , typename Symmetry , typename Name >
Tensor< ScalarType, Symmetry, Name > TAT::contract_without_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor_1, const Tensor< ScalarType, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs)
 
+template<typename ScalarType , typename Name >
Tensor< ScalarType, Symmetry<>, Name > TAT::contract_with_fuse (const Tensor< ScalarType, Symmetry<>, Name > &tensor_1, const Tensor< ScalarType, Symmetry<>, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names)
 
+ + + + + + + + + + + + + + + + + +

+Variables

+template<typename ScalarType >
constexpr auto TAT::detail::gemm = nullptr
 
+template<>
constexpr auto TAT::detail::gemm< float > = sgemm_
 
+template<>
constexpr auto TAT::detail::gemm< double > = dgemm_
 
+template<typename ScalarType >
constexpr auto TAT::detail::mkl_gemm_batch = nullptr
 
+timer TAT::contract_kernel_guard ("contract_kernel")
 
+timer TAT::contract_guard ("contract")
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/contract_8hpp.js b/contract_8hpp.js new file mode 100644 index 000000000..baf95cabf --- /dev/null +++ b/contract_8hpp.js @@ -0,0 +1,19 @@ +var contract_8hpp = +[ + [ "TAT_CONTRACT_HPP", "contract_8hpp.html#a3a9d44a5810dac12390a71c10b351849", null ], + [ "cgemm_", "contract_8hpp.html#a3bbe5c0e24dcf4c8316048e6b8d275aa", null ], + [ "check_valid_contract_plan", "contract_8hpp.html#abf99beb96f2f8e79fdc0826447061ab4", null ], + [ "contract_with_fuse", "contract_8hpp.html#a3eba06e87c7ca473c065c10f9db30d6a", null ], + [ "contract_without_fuse", "contract_8hpp.html#a23b6ff3bbbdb40390aa75f2ab845ef70", null ], + [ "dgemm_", "contract_8hpp.html#a162fc717e6377129f707cecc9710c9a4", null ], + [ "gemm_batch", "contract_8hpp.html#a4a8c733402ffe0529f2be4a8e17d169b", null ], + [ "generate_contract_map", "contract_8hpp.html#af049267e8ed446cb154dfab7c6a253f5", null ], + [ "sgemm_", "contract_8hpp.html#a3074390b178fa3618c6f8a621e7e8990", null ], + [ "zgemm_", "contract_8hpp.html#ac9e361402121f3ba316c6baf16148d63", null ], + [ "contract_guard", "contract_8hpp.html#aa067943298228377128a6e4b16e65350", null ], + [ "contract_kernel_guard", "contract_8hpp.html#a3255badd634a0d77996a634bb8eaaf83", null ], + [ "gemm", "contract_8hpp.html#ad84e829f9df2575d7816483f39c9ed95", null ], + [ "gemm< double >", "contract_8hpp.html#a5453a4c7b8b50c758393472190f2edf8", null ], + [ "gemm< float >", "contract_8hpp.html#a612368e11e244c25d980ace9525a7418", null ], + [ "mkl_gemm_batch", "contract_8hpp.html#a9d65831412264dc5ee328f0928c7bfad", null ] +]; \ No newline at end of file diff --git a/contract_8hpp_source.html b/contract_8hpp_source.html new file mode 100644 index 000000000..49755d4f6 --- /dev/null +++ b/contract_8hpp_source.html @@ -0,0 +1,968 @@ + + + + + + + +TAT: include/TAT/implement/contract.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
contract.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_CONTRACT_HPP
+
22 #define TAT_CONTRACT_HPP
+
23 
+
24 #include "../structure/tensor.hpp"
+
25 #include "../utility/allocator.hpp"
+
26 #include "../utility/timer.hpp"
+
27 
+
28 extern "C" {
+
29  int sgemm_(
+
30  const char* transpose_a,
+
31  const char* transpose_b,
+
32  const int* m,
+
33  const int* n,
+
34  const int* k,
+
35  const float* alpha,
+
36  const float* a,
+
37  const int* lda,
+
38  const float* b,
+
39  const int* ldb,
+
40  const float* beta,
+
41  float* c,
+
42  const int* ldc
+
43  );
+
44  int dgemm_(
+
45  const char* transpose_a,
+
46  const char* transpose_b,
+
47  const int* m,
+
48  const int* n,
+
49  const int* k,
+
50  const double* alpha,
+
51  const double* a,
+
52  const int* lda,
+
53  const double* b,
+
54  const int* ldb,
+
55  const double* beta,
+
56  double* c,
+
57  const int* ldc
+
58  );
+
59  int cgemm_(
+
60  const char* transpose_a,
+
61  const char* transpose_b,
+
62  const int* m,
+
63  const int* n,
+
64  const int* k,
+
65  const std::complex<float>* alpha,
+
66  const std::complex<float>* a,
+
67  const int* lda,
+
68  const std::complex<float>* b,
+
69  const int* ldb,
+
70  const std::complex<float>* beta,
+
71  std::complex<float>* c,
+
72  const int* ldc
+
73  );
+
74  int zgemm_(
+
75  const char* transpose_a,
+
76  const char* transpose_b,
+
77  const int* m,
+
78  const int* n,
+
79  const int* k,
+
80  const std::complex<double>* alpha,
+
81  const std::complex<double>* a,
+
82  const int* lda,
+
83  const std::complex<double>* b,
+
84  const int* ldb,
+
85  const std::complex<double>* beta,
+
86  std::complex<double>* c,
+
87  const int* ldc
+
88  );
+
89 
+
90 #ifdef TAT_USE_MKL_GEMM_BATCH
+
91  int sgemm_batch_(
+
92  const char* transpose_a,
+
93  const char* transpose_b,
+
94  const int* m,
+
95  const int* n,
+
96  const int* k,
+
97  const float* alpha,
+
98  const float** a,
+
99  const int* lda,
+
100  const float** b,
+
101  const int* ldb,
+
102  const float* beta,
+
103  float** c,
+
104  const int* ldc,
+
105  const int* group_count,
+
106  const int* group_size
+
107  );
+
108  int dgemm_batch_(
+
109  const char* transpose_a,
+
110  const char* transpose_b,
+
111  const int* m,
+
112  const int* n,
+
113  const int* k,
+
114  const double* alpha,
+
115  const double** a,
+
116  const int* lda,
+
117  const double** b,
+
118  const int* ldb,
+
119  const double* beta,
+
120  double** c,
+
121  const int* ldc,
+
122  const int* group_count,
+
123  const int* group_size
+
124  );
+
125  int cgemm_batch_(
+
126  const char* transpose_a,
+
127  const char* transpose_b,
+
128  const int* m,
+
129  const int* n,
+
130  const int* k,
+
131  const std::complex<float>* alpha,
+
132  const std::complex<float>** a,
+
133  const int* lda,
+
134  const std::complex<float>** b,
+
135  const int* ldb,
+
136  const std::complex<float>* beta,
+
137  std::complex<float>** c,
+
138  const int* ldc,
+
139  const int* group_count,
+
140  const int* group_size
+
141  );
+
142  int zgemm_batch_(
+
143  const char* transpose_a,
+
144  const char* transpose_b,
+
145  const int* m,
+
146  const int* n,
+
147  const int* k,
+
148  const std::complex<double>* alpha,
+
149  const std::complex<double>** a,
+
150  const int* lda,
+
151  const std::complex<double>** b,
+
152  const int* ldb,
+
153  const std::complex<double>* beta,
+
154  std::complex<double>** c,
+
155  const int* ldc,
+
156  const int* group_count,
+
157  const int* group_size
+
158  );
+
159 #endif
+
160 }
+
161 
+
162 namespace TAT {
+
163  namespace detail {
+
164  template<typename ScalarType>
+
165  constexpr auto gemm = nullptr;
+
166 
+
167  template<>
+
168  inline constexpr auto gemm<float> = sgemm_;
+
169  template<>
+
170  inline constexpr auto gemm<double> = dgemm_;
+
171  template<>
+
172  inline constexpr auto gemm<std::complex<float>> = cgemm_;
+
173  template<>
+
174  inline constexpr auto gemm<std::complex<double>> = zgemm_;
+
175 
+
176  template<typename ScalarType>
+
177  constexpr auto mkl_gemm_batch = nullptr;
+
178 
+
179 #ifdef TAT_USE_MKL_GEMM_BATCH
+
180  template<>
+
181  inline constexpr auto mkl_gemm_batch<float> = sgemm_batch_;
+
182  template<>
+
183  inline constexpr auto mkl_gemm_batch<double> = dgemm_batch_;
+
184  template<>
+
185  inline constexpr auto mkl_gemm_batch<std::complex<float>> = cgemm_batch_;
+
186  template<>
+
187  inline constexpr auto mkl_gemm_batch<std::complex<double>> = zgemm_batch_;
+
188 #endif
+
189  } // namespace detail
+
190 
+
191  inline timer contract_kernel_guard("contract_kernel");
+
192 
+
193  namespace detail {
+
194  template<typename ScalarType, bool same_shape>
+
195  void gemm_batch(
+
196  const char* transpose_a,
+
197  const char* transpose_b,
+
198  const int* m,
+
199  const int* n,
+
200  const int* k,
+
201  const ScalarType* alpha,
+
202  const ScalarType** a,
+
203  const int* lda,
+
204  const ScalarType** b,
+
205  const int* ldb,
+
206  const ScalarType* beta,
+
207  ScalarType** c,
+
208  const int* ldc,
+
209  const int& batch_size
+
210  ) {
+
211  auto kernel_guard = contract_kernel_guard();
+
212  if (batch_size == 1) {
+
213  gemm<ScalarType>(transpose_a, transpose_b, m, n, k, alpha, a[0], lda, b[0], ldb, beta, c[0], ldc);
+
214  } else {
+
215 #ifdef TAT_USE_MKL_GEMM_BATCH
+
216  if constexpr (same_shape) {
+
217  int group_count = 1;
+
218  mkl_gemm_batch<ScalarType>(transpose_a, transpose_b, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, &group_count, &batch_size);
+
219  } else {
+
220  pmr::vector<int> group_size(batch_size, 1);
+
221  mkl_gemm_batch<
+
222  ScalarType>(transpose_a, transpose_b, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, &batch_size, group_size.data());
+
223  }
+
224 #else
+
225  if constexpr (same_shape) {
+
226  for (auto i = 0; i < batch_size; i++) {
+
227  gemm<ScalarType>(transpose_a, transpose_b, m, n, k, alpha, a[i], lda, b[i], ldb, beta, c[i], ldc);
+
228  }
+
229  } else {
+
230  for (auto i = 0; i < batch_size; i++) {
+
231  gemm<ScalarType>(
+
232  &transpose_a[i],
+
233  &transpose_b[i],
+
234  &m[i],
+
235  &n[i],
+
236  &k[i],
+
237  &alpha[i],
+
238  a[i],
+
239  &lda[i],
+
240  b[i],
+
241  &ldb[i],
+
242  &beta[i],
+
243  c[i],
+
244  &ldc[i]
+
245  );
+
246  }
+
247  }
+
248 #endif
+
249  }
+
250  }
+
251 
+
252  template<typename Name, typename SetNameName>
+
253  auto generate_contract_map(const SetNameName& contract_pairs) {
+
254  auto size = contract_pairs.size();
+
255  auto contract_names_1_2 = pmr::unordered_map<Name, Name>(unordered_parameter * size);
+
256  auto contract_names_2_1 = pmr::unordered_map<Name, Name>(unordered_parameter * size);
+
257  for (const auto& [name_1, name_2] : contract_pairs) {
+
258  contract_names_1_2[name_1] = name_2;
+
259  contract_names_2_1[name_2] = name_1;
+
260  }
+
261  return std::make_pair(std::move(contract_names_1_2), std::move(contract_names_2_1));
+
262  }
+
263 
+
264  template<typename ScalarType, typename Symmetry, typename Name>
+
265  void check_valid_contract_plan(
+
266  const Tensor<ScalarType, Symmetry, Name>& tensor_1,
+
267  const Tensor<ScalarType, Symmetry, Name>& tensor_2,
+
268  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
+
269  const pmr::unordered_map<Name, Name>& contract_names_1_2,
+
270  const pmr::unordered_map<Name, Name>& contract_names_2_1,
+
271  const std::unordered_set<Name>& fuse_names = {}
+
272  ) {
+
273  // check if some missing name in contract
+
274  for (const auto& [name_1, name_2] : contract_pairs) {
+
275  if (auto found = tensor_1.find_by_name(name_1) == tensor_1.names().end()) {
+
276  detail::error("Name missing in contract");
+
277  }
+
278  if (auto found = tensor_2.find_by_name(name_2) == tensor_2.names().end()) {
+
279  detail::error("Name missing in contract");
+
280  }
+
281  }
+
282  // check if some duplicated name in pairs
+
283  for (auto i = contract_pairs.begin(); i != contract_pairs.end(); ++i) {
+
284  for (auto j = std::next(i); j != contract_pairs.end(); ++j) {
+
285  if (i->first == j->first) {
+
286  detail::error("Duplicated name in contract_names");
+
287  }
+
288  if (i->second == j->second) {
+
289  detail::error("Duplicated name in contract_names");
+
290  }
+
291  }
+
292  }
+
293  // check if some duplicated name in two tensor except fuse_names and contract_names
+
294  for (const auto& name_1 : tensor_1.names()) {
+
295  for (const auto& name_2 : tensor_2.names()) {
+
296  if ((name_1 == name_2) && (fuse_names.find(name_1) == fuse_names.end()) &&
+
297  (contract_names_1_2.find(name_1) == contract_names_1_2.end() && contract_names_2_1.find(name_2) == contract_names_2_1.end()
+
298  )) {
+
299  detail::error("Duplicated name in two contracting tensor but not fused or contracted");
+
300  }
+
301  }
+
302  }
+
303  }
+
304  } // namespace detail
+
305 
+
306  template<typename ScalarType, typename Symmetry, typename Name>
+
307  Tensor<ScalarType, Symmetry, Name> contract_without_fuse(
+
308  const Tensor<ScalarType, Symmetry, Name>& tensor_1,
+
309  const Tensor<ScalarType, Symmetry, Name>& tensor_2,
+
310  const std::unordered_set<std::pair<Name, Name>>& contract_pairs
+
311  ) {
+
312  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
+
313  const Rank rank_1 = tensor_1.rank();
+
314  const Rank rank_2 = tensor_2.rank();
+
315  const Rank common_rank = contract_pairs.size();
+
316  const Rank free_rank_1 = rank_1 - common_rank;
+
317  const Rank free_rank_2 = rank_2 - common_rank;
+
318  const auto contract_map = detail::generate_contract_map<Name>(contract_pairs); // lambda cannot capture structure binding
+
319  const auto& contract_names_1_2 = contract_map.first;
+
320  const auto& contract_names_2_1 = contract_map.second;
+
321  if constexpr (debug_mode) {
+
322  detail::check_valid_contract_plan(tensor_1, tensor_2, contract_pairs, contract_names_1_2, contract_names_2_1);
+
323  }
+
324  // reverse -> merge -> product -> split -> reverse
+
325  // reverse free name all two false and recovery them at last, both not apply sign
+
326  // reverse common name to different arrow, one of these two apply sign
+
327  // when merge edge, one of two common edges apply sign, and free edge not apply
+
328  // when splitting edge at last, also not apply
+
329  // so
+
330  // let all edge except tensor_1 common edge arrow as false
+
331 
+
332  // what need to prepare:
+
333  // reverse set 1
+
334  // reverse set 2
+
335  // merge plan 1 -> free name 1 & common name 1
+
336  // merge plan 2 -> free name 2 & common name 2
+
337  // split plan
+
338  // reverse set result
+
339  // and three result edge name order
+
340  // -> two put what right and name_result
+
341  auto reversed_names_1 = pmr::unordered_set<Name>(unordered_parameter * free_rank_1);
+
342  auto free_names_1 = pmr::vector<Name>(); // used for merge
+
343  auto common_names_1 = pmr::vector<Name>(); // used for merge
+
344  auto common_reversed_names_1 = pmr::unordered_set<Name>(unordered_parameter * common_rank); // used for reverse merge flag
+
345  free_names_1.reserve(free_rank_1);
+
346  common_names_1.reserve(common_rank); // this will be set later
+
347 
+
348  auto reversed_names_2 = pmr::unordered_set<Name>(unordered_parameter * free_rank_2);
+
349  auto free_names_2 = pmr::vector<Name>(); // used for merge
+
350  auto common_names_2 = pmr::vector<Name>(); // used for merge
+
351  free_names_2.reserve(free_rank_2);
+
352  common_names_2.reserve(common_rank); // this will be set later
+
353 
+
354  auto split_map_result = pmr::unordered_map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>(unordered_parameter * 3);
+
355  auto reversed_names_result = pmr::unordered_set<Name>(unordered_parameter * (free_rank_1 + free_rank_2 + common_rank));
+
356  auto names_result = std::vector<Name>();
+
357  auto& split_map_result_part_1 = split_map_result[InternalName<Name>::Contract_1];
+
358  auto& split_map_result_part_2 = split_map_result[InternalName<Name>::Contract_2];
+
359  names_result.reserve(free_rank_1 + free_rank_2);
+
360  split_map_result_part_1.reserve(free_rank_1);
+
361  split_map_result_part_2.reserve(free_rank_2);
+
362 
+
363  // put name in (free names, names result, split map result part | common name), [reversed_names], [reversed_names_result]
+
364  // common name need to be update later for the proper order
+
365  for (Rank i = 0; i < rank_1; i++) {
+
366  const auto& n = tensor_1.names(i);
+
367  if (contract_names_1_2.find(n) == contract_names_1_2.end()) {
+
368  // it is free name
+
369  free_names_1.push_back(n);
+
370  split_map_result_part_1.push_back({n, {tensor_1.edges(i).segments()}});
+
371  names_result.push_back(n);
+
372  if constexpr (is_fermi) {
+
373  // to false
+
374  if (tensor_1.edges(i).arrow()) {
+
375  reversed_names_1.insert(n);
+
376  reversed_names_result.insert(n);
+
377  }
+
378  }
+
379  } else {
+
380  // it is common name
+
381  if constexpr (is_fermi) {
+
382  // to true
+
383  if (!tensor_1.edges(i).arrow()) {
+
384  reversed_names_1.insert(n);
+
385  common_reversed_names_1.insert(n);
+
386  }
+
387  }
+
388  }
+
389  }
+
390  for (Rank i = 0; i < rank_2; i++) {
+
391  const auto& n = tensor_2.names(i);
+
392  if (contract_names_2_1.find(n) == contract_names_2_1.end()) {
+
393  // it is free name
+
394  free_names_2.push_back(n);
+
395  split_map_result_part_2.push_back({n, {tensor_2.edges(i).segments()}});
+
396  names_result.push_back(n);
+
397  if constexpr (is_fermi) {
+
398  if (tensor_2.edges(i).arrow()) {
+
399  reversed_names_2.insert(n);
+
400  reversed_names_result.insert(n);
+
401  }
+
402  }
+
403  } else {
+
404  // it is common name
+
405  if constexpr (is_fermi) {
+
406  // to false
+
407  if (tensor_2.edges(i).arrow()) {
+
408  reversed_names_2.insert(n);
+
409  }
+
410  }
+
411  }
+
412  }
+
413 
+
414  // common name need reorder
+
415  bool put_common_1_right;
+
416  bool put_common_2_right;
+
417  auto fit_tensor_1_common_edges = [&]() {
+
418  for (const auto& n : tensor_1.names()) {
+
419  if (auto position = contract_names_1_2.find(n); position != contract_names_1_2.end()) {
+
420  common_names_1.push_back(position->first);
+
421  common_names_2.push_back(position->second);
+
422  }
+
423  }
+
424  };
+
425  auto fit_tensor_2_common_edges = [&]() {
+
426  for (const auto& n : tensor_2.names()) {
+
427  if (auto position = contract_names_2_1.find(n); position != contract_names_2_1.end()) {
+
428  common_names_2.push_back(position->first);
+
429  common_names_1.push_back(position->second);
+
430  }
+
431  }
+
432  };
+
433  // determine common edge order depend on what
+
434  // to ensure less transpose need to be done
+
435  bool tensor_1_larger_than_tensor_2 = tensor_1.storage().size() > tensor_2.storage().size();
+
436  if (free_rank_1 == 0) {
+
437  put_common_1_right = true;
+
438  fit_tensor_2_common_edges(); // tensor 1 is smaller, so let tensor 2 has better order
+
439  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
440  } else if (free_rank_2 == 0) {
+
441  put_common_2_right = true;
+
442  fit_tensor_1_common_edges(); // tensor 2 is smaller, so let tensor 1 has better order
+
443  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
444  } else if (tensor_1_larger_than_tensor_2) {
+
445  if (free_names_1.back() != tensor_1.names().back()) { // last name in tensor_1 is common name
+
446  put_common_1_right = true;
+
447  fit_tensor_1_common_edges();
+
448  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
449  } else if (free_names_2.back() != tensor_2.names().back()) { // last name in tensor_2 is common name
+
450  put_common_2_right = true;
+
451  fit_tensor_2_common_edges();
+
452  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
453  } else {
+
454  put_common_1_right = false;
+
455  put_common_2_right = false;
+
456  // fit the larger tensor, tensor_1 larger
+
457  fit_tensor_1_common_edges();
+
458  }
+
459  } else {
+
460  if (free_names_2.back() != tensor_2.names().back()) { // last name in tensor_2 is common name
+
461  put_common_2_right = true;
+
462  fit_tensor_2_common_edges();
+
463  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
464  } else if (free_names_1.back() != tensor_1.names().back()) { // last name in tensor_1 is common name
+
465  put_common_1_right = true;
+
466  fit_tensor_1_common_edges();
+
467  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
468  } else {
+
469  put_common_1_right = false;
+
470  put_common_2_right = false;
+
471  // fit the larger tensor, tensor_2 larger
+
472  fit_tensor_2_common_edges();
+
473  }
+
474  }
+
475 
+
476  // check edge validity
+
477  if constexpr (debug_mode) {
+
478  // contract edges segments correct
+
479  for (const auto& [name_1, name_2] : contract_pairs) {
+
480  if (tensor_1.edges(name_1).conjugate() != tensor_2.edges(name_2)) {
+
481  detail::error("Incompatible edge segments in contract");
+
482  }
+
483  }
+
484  }
+
485 
+
486  // merge
+
487  // only apply sign to common edge reverse and merge
+
488  auto tensor_1_merged = tensor_1.edge_operator_implement(
+
489  {},
+
490  reversed_names_1,
+
491  pmr::map<Name, pmr::vector<Name>>{
+
492  {InternalName<Name>::Contract_1, std::move(free_names_1)},
+
493  {InternalName<Name>::Contract_2, std::move(common_names_1)}},
+
494  put_common_1_right ? std::vector<Name>{InternalName<Name>::Contract_1, InternalName<Name>::Contract_2} :
+
495  std::vector<Name>{InternalName<Name>::Contract_2, InternalName<Name>::Contract_1},
+
496  false,
+
497  {},
+
498  common_reversed_names_1,
+
499  {},
+
500  pmr::set<Name>{InternalName<Name>::Contract_2},
+
501  {}
+
502  );
+
503  auto tensor_2_merged = tensor_2.edge_operator_implement(
+
504  {},
+
505  reversed_names_2,
+
506  pmr::map<Name, pmr::vector<Name>>{
+
507  {InternalName<Name>::Contract_2, std::move(free_names_2)},
+
508  {InternalName<Name>::Contract_1, std::move(common_names_2)}},
+
509  put_common_2_right ? std::vector<Name>{InternalName<Name>::Contract_2, InternalName<Name>::Contract_1} :
+
510  std::vector<Name>{InternalName<Name>::Contract_1, InternalName<Name>::Contract_2},
+
511  false,
+
512  {},
+
513  {},
+
514  {},
+
515  {},
+
516  {}
+
517  );
+
518 
+
519  // calculate_product
+
520  auto product_result = Tensor<ScalarType, Symmetry, Name>(
+
521  {InternalName<Name>::Contract_1, InternalName<Name>::Contract_2},
+
522  {tensor_1_merged.edges(put_common_1_right ? 0 : 1), tensor_2_merged.edges(put_common_2_right ? 0 : 1)}
+
523  );
+
524 
+
525  const auto& edge_0_result = product_result.edges(0);
+
526  const auto& edge_1_result = product_result.edges(1);
+
527  // const auto& edge_common_1 = tensor_1_merged.edges(put_common_1_right ? 1 : 0);
+
528  const auto& edge_common_2 = tensor_2_merged.edges(put_common_2_right ? 1 : 0);
+
529 
+
530  auto max_batch_size = edge_common_2.segments_size();
+
531  pmr::vector<char> transpose_a_list(max_batch_size), transpose_b_list(max_batch_size);
+
532  pmr::vector<int> m_list(max_batch_size), n_list(max_batch_size), k_list(max_batch_size), lda_list(max_batch_size), ldb_list(max_batch_size),
+
533  ldc_list(max_batch_size);
+
534  pmr::vector<ScalarType> alpha_list(max_batch_size), beta_list(max_batch_size);
+
535  pmr::vector<const ScalarType*> a_list(max_batch_size), b_list(max_batch_size);
+
536  pmr::vector<ScalarType*> c_list(max_batch_size);
+
537  int batch_size = 0;
+
538 
+
539  for (const auto& [symmetry, _] : edge_0_result.segments()) {
+
540  // m k n
+
541  Size position_0_result = edge_0_result.find_by_symmetry(symmetry) - edge_0_result.segments().begin();
+
542  if (position_0_result == edge_0_result.segments_size()) {
+
543  continue;
+
544  }
+
545  const int m = edge_0_result.segments(position_0_result).second;
+
546  Size position_1_result = edge_1_result.find_by_symmetry(-symmetry) - edge_1_result.segments().begin();
+
547  if (position_1_result == edge_1_result.segments_size()) {
+
548  continue;
+
549  }
+
550  const int n = edge_1_result.segments(position_1_result).second;
+
551  Size position_common = edge_common_2.find_by_symmetry(symmetry) - edge_common_2.segments().begin();
+
552  if (position_common == edge_common_2.segments_size()) {
+
553  const auto positions_result = pmr::vector<Size>{position_0_result, position_1_result};
+
554  auto& data = product_result.blocks(positions_result);
+
555  std::fill(data.data(), data.data() + data.size(), 0);
+
556  continue;
+
557  }
+
558  const int k = edge_common_2.segments(position_common).second;
+
559 
+
560  const auto positions_result = pmr::vector<Size>{position_0_result, position_1_result};
+
561  const auto positions_1 =
+
562  put_common_1_right ? pmr::vector<Size>{position_0_result, position_common} : pmr::vector<Size>{position_common, position_0_result};
+
563  const auto positions_2 =
+
564  put_common_2_right ? pmr::vector<Size>{position_1_result, position_common} : pmr::vector<Size>{position_common, position_1_result};
+
565 
+
566  auto& data = product_result.blocks(positions_result);
+
567  const auto& data_1 = tensor_1_merged.blocks(positions_1);
+
568  const auto& data_2 = tensor_2_merged.blocks(positions_2);
+
569 
+
570  ScalarType alpha = 1;
+
571  if constexpr (is_fermi) {
+
572  // the standard arrow is
+
573  // (false true) (false false)
+
574  // namely
+
575  // (a b) (c d) (c+ b+) = (a d)
+
576  // EPR pair order is (false true)
+
577  if ((put_common_1_right ^ !put_common_2_right) && symmetry.parity()) {
+
578  alpha = -1;
+
579  }
+
580  }
+
581  const ScalarType beta = 0;
+
582  if (m && n && k) {
+
583  transpose_a_list[batch_size] = put_common_2_right ? 'T' : 'N';
+
584  transpose_b_list[batch_size] = put_common_1_right ? 'N' : 'T';
+
585  m_list[batch_size] = n;
+
586  n_list[batch_size] = m;
+
587  k_list[batch_size] = k;
+
588  alpha_list[batch_size] = alpha;
+
589  a_list[batch_size] = data_2.data();
+
590  lda_list[batch_size] = put_common_2_right ? k : n;
+
591  b_list[batch_size] = data_1.data();
+
592  ldb_list[batch_size] = put_common_1_right ? k : m;
+
593  beta_list[batch_size] = beta;
+
594  c_list[batch_size] = data.data();
+
595  ldc_list[batch_size] = n;
+
596  batch_size++;
+
597  } else if (m && n) {
+
598  std::fill(data.data(), data.data() + data.size(), 0);
+
599  }
+
600  }
+
601  detail::gemm_batch<ScalarType, false>(
+
602  transpose_a_list.data(),
+
603  transpose_b_list.data(),
+
604  m_list.data(),
+
605  n_list.data(),
+
606  k_list.data(),
+
607  alpha_list.data(),
+
608  a_list.data(),
+
609  lda_list.data(),
+
610  b_list.data(),
+
611  ldb_list.data(),
+
612  beta_list.data(),
+
613  c_list.data(),
+
614  ldc_list.data(),
+
615  batch_size
+
616  );
+
617 
+
618  return product_result
+
619  .edge_operator_implement(split_map_result, reversed_names_result, {}, std::move(names_result), false, {}, {}, {}, {}, {});
+
620  }
+
621 
+
622  template<typename ScalarType, typename Name>
+
623  Tensor<ScalarType, Symmetry<>, Name> contract_with_fuse(
+
624  const Tensor<ScalarType, Symmetry<>, Name>& tensor_1,
+
625  const Tensor<ScalarType, Symmetry<>, Name>& tensor_2,
+
626  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
+
627  const std::unordered_set<Name>& fuse_names
+
628  ) {
+
629  const Rank rank_1 = tensor_1.rank();
+
630  const Rank rank_2 = tensor_2.rank();
+
631  const Rank common_rank = contract_pairs.size();
+
632  const Rank fuse_rank = fuse_names.size();
+
633  const Rank free_rank_1 = rank_1 - common_rank - fuse_rank;
+
634  const Rank free_rank_2 = rank_2 - common_rank - fuse_rank;
+
635  const auto contract_map = detail::generate_contract_map<Name>(contract_pairs); // lambda cannot capture structure binding
+
636  const auto& contract_names_1_2 = contract_map.first;
+
637  const auto& contract_names_2_1 = contract_map.second;
+
638  if constexpr (debug_mode) {
+
639  detail::check_valid_contract_plan(tensor_1, tensor_2, contract_pairs, contract_names_1_2, contract_names_2_1, fuse_names);
+
640  }
+
641  // merge -> product -> split
+
642  // merge to two rank 3 tensor
+
643 
+
644  // what need to prepare:
+
645  // merge plan 1 -> free name 1 & common name 1 & fuse name
+
646  // merge plan 2 -> free name 2 & common name 2 & fuse name
+
647  // not split plan here, just set name and edge directly
+
648  // so need edge result
+
649  // and three result edge name order
+
650  // -> two put what right and name_result
+
651  // always put fuse name at first to use gemm_batch
+
652  // so detail order of fuse name is not important
+
653  auto free_names_1 = pmr::vector<Name>(); // used for merge
+
654  auto common_names_1 = pmr::vector<Name>(); // used for merge
+
655  free_names_1.reserve(free_rank_1);
+
656  common_names_1.reserve(common_rank);
+
657 
+
658  auto free_names_2 = pmr::vector<Name>(); // used for merge
+
659  auto common_names_2 = pmr::vector<Name>(); // used for merge
+
660  free_names_2.reserve(free_rank_2);
+
661  common_names_2.reserve(common_rank);
+
662 
+
663  auto names_result = std::vector<Name>();
+
664  auto edges_result = std::vector<Edge<Symmetry<>>>();
+
665  names_result.reserve(free_rank_1 + free_rank_2 + fuse_rank);
+
666  edges_result.reserve(free_rank_1 + free_rank_2 + fuse_rank);
+
667 
+
668  pmr::vector<Name> fuse_names_list;
+
669  fuse_names_list.reserve(fuse_rank);
+
670  for (const auto& name : fuse_names) { // the order of fuse names is not important
+
671  names_result.push_back(name);
+
672  fuse_names_list.push_back(name);
+
673  const auto& edge_1 = tensor_1.edges(name);
+
674  const auto& edge_2 = tensor_2.edges(name);
+
675  if constexpr (debug_mode) {
+
676  if (!(edge_1 == edge_2)) {
+
677  detail::error("Cannot fuse two edge with different shape");
+
678  }
+
679  }
+
680  edges_result.push_back(edge_1);
+
681  }
+
682 
+
683  for (Rank i = 0; i < rank_1; i++) {
+
684  const auto& n = tensor_1.names(i);
+
685  if (contract_names_1_2.find(n) == contract_names_1_2.end()) {
+
686  // it is free or fuse
+
687  if (fuse_names.find(n) == fuse_names.end()) {
+
688  // it is free
+
689  free_names_1.push_back(n);
+
690  names_result.push_back(n);
+
691  edges_result.push_back(tensor_1.edges(i));
+
692  }
+
693  }
+
694  }
+
695  for (Rank i = 0; i < rank_2; i++) {
+
696  const auto& n = tensor_2.names(i);
+
697  if (contract_names_2_1.find(n) == contract_names_2_1.end()) {
+
698  // it is free or fuse
+
699  if (fuse_names.find(n) == fuse_names.end()) {
+
700  // it is free
+
701  free_names_2.push_back(n);
+
702  names_result.push_back(n);
+
703  edges_result.push_back(tensor_2.edges(i));
+
704  }
+
705  }
+
706  }
+
707 
+
708  // common name need reorder
+
709  bool put_common_1_right;
+
710  bool put_common_2_right;
+
711  auto fit_tensor_1_common_edges = [&]() {
+
712  for (const auto& n : tensor_1.names()) {
+
713  if (auto position = contract_names_1_2.find(n); position != contract_names_1_2.end()) {
+
714  common_names_1.push_back(position->first);
+
715  common_names_2.push_back(position->second);
+
716  }
+
717  }
+
718  };
+
719  auto fit_tensor_2_common_edges = [&]() {
+
720  for (const auto& n : tensor_2.names()) {
+
721  if (auto position = contract_names_2_1.find(n); position != contract_names_2_1.end()) {
+
722  common_names_2.push_back(position->first);
+
723  common_names_1.push_back(position->second);
+
724  }
+
725  }
+
726  };
+
727  // determine common edge order depend on what
+
728  // to ensure less transpose need to be done
+
729  bool tensor_1_larger_than_tensor_2 = tensor_1.storage().size() > tensor_2.storage().size();
+
730  if (free_rank_1 == 0) {
+
731  put_common_1_right = true;
+
732  fit_tensor_2_common_edges(); // tensor 1 is smaller, so let tensor 2 has better order
+
733  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
734  } else if (free_rank_2 == 0) {
+
735  put_common_2_right = true;
+
736  fit_tensor_1_common_edges(); // tensor 2 is smaller, so let tensor 1 has better order
+
737  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
738  } else if (tensor_1_larger_than_tensor_2) {
+
739  if (free_names_1.back() != tensor_1.names().back()) { // last name in tensor_1 is common name
+
740  put_common_1_right = true;
+
741  fit_tensor_1_common_edges();
+
742  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
743  } else if (free_names_2.back() != tensor_2.names().back()) { // last name in tensor_2 is common name
+
744  put_common_2_right = true;
+
745  fit_tensor_2_common_edges();
+
746  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
747  } else {
+
748  put_common_1_right = false;
+
749  put_common_2_right = false;
+
750  // fit the larger tensor, tensor_1 larger
+
751  fit_tensor_1_common_edges();
+
752  }
+
753  } else {
+
754  if (free_names_2.back() != tensor_2.names().back()) { // last name in tensor_2 is common name
+
755  put_common_2_right = true;
+
756  fit_tensor_2_common_edges();
+
757  put_common_1_right = common_names_1.empty() || common_names_1.back() == tensor_1.names().back();
+
758  } else if (free_names_1.back() != tensor_1.names().back()) { // last name in tensor_1 is common name
+
759  put_common_1_right = true;
+
760  fit_tensor_1_common_edges();
+
761  put_common_2_right = common_names_2.empty() || common_names_2.back() == tensor_2.names().back();
+
762  } else {
+
763  put_common_1_right = false;
+
764  put_common_2_right = false;
+
765  // fit the larger tensor, tensor_2 larger
+
766  fit_tensor_2_common_edges();
+
767  }
+
768  }
+
769 
+
770  // check edge validity
+
771  if constexpr (debug_mode) {
+
772  // contract name dimension correct
+
773  for (const auto& [name_1, name_2] : contract_pairs) {
+
774  if (tensor_1.edges(name_1) != tensor_2.edges(name_2)) {
+
775  detail::error("Contracting two edge with different dimension");
+
776  }
+
777  }
+
778  }
+
779 
+
780  // merge
+
781  auto tensor_1_merged = tensor_1.edge_operator_implement(
+
782  {},
+
783  {},
+
784  pmr::map<Name, pmr::vector<Name>>{
+
785  {InternalName<Name>::Contract_1, std::move(free_names_1)},
+
786  {InternalName<Name>::Contract_2, std::move(common_names_1)},
+
787  {InternalName<Name>::Contract_0, fuse_names_list}},
+
788  put_common_1_right ? std::vector<Name>{InternalName<Name>::Contract_0, InternalName<Name>::Contract_1, InternalName<Name>::Contract_2} :
+
789  std::vector<Name>{InternalName<Name>::Contract_0, InternalName<Name>::Contract_2, InternalName<Name>::Contract_1},
+
790  false,
+
791  {},
+
792  {},
+
793  {},
+
794  {},
+
795  {}
+
796  );
+
797  auto tensor_2_merged = tensor_2.edge_operator_implement(
+
798  {},
+
799  {},
+
800  pmr::map<Name, pmr::vector<Name>>{
+
801  {InternalName<Name>::Contract_2, std::move(free_names_2)},
+
802  {InternalName<Name>::Contract_1, std::move(common_names_2)},
+
803  {InternalName<Name>::Contract_0, std::move(fuse_names_list)}},
+
804  put_common_2_right ? std::vector<Name>{InternalName<Name>::Contract_0, InternalName<Name>::Contract_2, InternalName<Name>::Contract_1} :
+
805  std::vector<Name>{InternalName<Name>::Contract_0, InternalName<Name>::Contract_1, InternalName<Name>::Contract_2},
+
806  false,
+
807  {},
+
808  {},
+
809  {},
+
810  {},
+
811  {}
+
812  );
+
813  // calculate_product
+
814  const int l = tensor_1_merged.edges(0).total_dimension();
+
815  const int m = tensor_1_merged.edges(put_common_1_right ? 1 : 2).total_dimension();
+
816  const int n = tensor_2_merged.edges(put_common_2_right ? 1 : 2).total_dimension();
+
817  const int k = tensor_1_merged.edges(put_common_1_right ? 2 : 1).total_dimension();
+
818  const ScalarType alpha = 1;
+
819  const ScalarType beta = 0;
+
820 
+
821  auto result = Tensor<ScalarType, Symmetry<>, Name>(std::move(names_result), std::move(edges_result));
+
822 
+
823  ScalarType* data = result.storage().data();
+
824  const ScalarType* data_1 = tensor_1_merged.storage().data();
+
825  const ScalarType* data_2 = tensor_2_merged.storage().data();
+
826  if (m && n && k) {
+
827  pmr::vector<const ScalarType*> a_list(l), b_list(l);
+
828  pmr::vector<ScalarType*> c_list(l);
+
829  const auto kn = k * n;
+
830  const auto mk = m * k;
+
831  const auto mn = m * n;
+
832  for (auto i = 0; i < l; i++) {
+
833  a_list[i] = data_2 + kn * i;
+
834  b_list[i] = data_1 + mk * i;
+
835  c_list[i] = data + mn * i;
+
836  }
+
837  detail::gemm_batch<ScalarType, true>(
+
838  put_common_2_right ? "T" : "N",
+
839  put_common_1_right ? "N" : "T",
+
840  &n,
+
841  &m,
+
842  &k,
+
843  &alpha,
+
844  a_list.data(),
+
845  put_common_2_right ? &k : &n,
+
846  b_list.data(),
+
847  put_common_1_right ? &k : &m,
+
848  &beta,
+
849  c_list.data(),
+
850  &n,
+
851  l
+
852  );
+
853  } else if (m && n) {
+
854  std::fill(result.storage().begin(), result.storage().end(), 0);
+
855  }
+
856  return result;
+
857  }
+
858 
+
859  inline timer contract_guard("contract");
+
860 
+
861  template<typename ScalarType, typename Symmetry, typename Name>
+
862  Tensor<ScalarType, Symmetry, Name> Tensor<ScalarType, Symmetry, Name>::contract_implement(
+
863  const Tensor<ScalarType, Symmetry, Name>& tensor_1,
+
864  const Tensor<ScalarType, Symmetry, Name>& tensor_2,
+
865  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
+
866  const std::unordered_set<Name>& fuse_names
+
867  ) {
+
868  auto timer_guard = contract_guard();
+
869  auto pmr_guard = scope_resource(default_buffer_size);
+
870  if constexpr (Symmetry::length == 0) {
+
871  return contract_with_fuse(tensor_1, tensor_2, contract_pairs, fuse_names);
+
872  } else {
+
873  if constexpr (debug_mode) {
+
874  if (fuse_names.size() != 0) {
+
875  detail::error("Cannot fuse edge of symmetric tensor");
+
876  }
+
877  }
+
878  return contract_without_fuse(tensor_1, tensor_2, contract_pairs);
+
879  }
+
880  }
+
881 } // namespace TAT
+
882 #endif
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
constexpr bool debug_mode
Debug flag.
Definition: common_variable.hpp:50
+
+
+ + + + diff --git a/core_8hpp.html b/core_8hpp.html new file mode 100644 index 000000000..521352d8a --- /dev/null +++ b/core_8hpp.html @@ -0,0 +1,136 @@ + + + + + + + +TAT: include/TAT/structure/core.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
core.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <algorithm>
+#include <map>
+#include <memory>
+#include <numeric>
+#include <optional>
+#include <vector>
+#include "../utility/allocator.hpp"
+#include "../utility/multidimension_span.hpp"
+#include "edge.hpp"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  TAT::Core< ScalarType, Symmetry >
 Contains nearly all tensor data except edge name, include edge shape and tensor content. More...
 
+ + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/core_8hpp.js b/core_8hpp.js new file mode 100644 index 000000000..792200fc0 --- /dev/null +++ b/core_8hpp.js @@ -0,0 +1,5 @@ +var core_8hpp = +[ + [ "Core", "classTAT_1_1Core.html", "classTAT_1_1Core" ], + [ "TAT_CORE_HPP", "core_8hpp.html#a65b72a24c3f70f25193ece6f659d825a", null ] +]; \ No newline at end of file diff --git a/core_8hpp_source.html b/core_8hpp_source.html new file mode 100644 index 000000000..0ae0f41a6 --- /dev/null +++ b/core_8hpp_source.html @@ -0,0 +1,329 @@ + + + + + + + +TAT: include/TAT/structure/core.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
core.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_CORE_HPP
+
22 #define TAT_CORE_HPP
+
23 
+
24 #include <algorithm>
+
25 #include <map>
+
26 #include <memory>
+
27 #include <numeric>
+
28 #include <optional>
+
29 #include <vector>
+
30 
+
31 #include "../utility/allocator.hpp"
+
32 #include "../utility/multidimension_span.hpp"
+
33 #include "edge.hpp"
+
34 
+
35 namespace TAT {
+
36 
+
44  template<typename ScalarType, typename Symmetry>
+
45  class Core {
+
46  static_assert(is_scalar<ScalarType> && is_symmetry<Symmetry>);
+
47 
+
48  public:
+
49  using scalar_t = ScalarType;
+
50  using symmetry_t = Symmetry;
+
51  using edge_t = Edge<symmetry_t>;
+
52 
+
53  private:
+
54  const std::vector<edge_t> m_edges;
+ +
56 
+
57  std::vector<std::optional<mdspan<scalar_t>>> m_pool;
+
58  no_initialize::vector<scalar_t> m_storage;
+
59 
+
60  public:
+
61  const no_initialize::vector<scalar_t>& storage() const {
+
62  return m_storage;
+
63  }
+
64  no_initialize::vector<scalar_t>& storage() {
+
65  return m_storage;
+
66  }
+
67  const std::vector<edge_t>& edges() const {
+
68  return m_edges;
+
69  }
+
70  const edge_t& edges(Rank i) const {
+
71  return m_edges[i];
+
72  }
+
73  const mdspan<std::optional<mdspan<scalar_t>>>& blocks() const {
+
74  return m_blocks;
+
75  }
+ +
77  return m_blocks;
+
78  }
+
79  template<typename T, typename A>
+
80  const mdspan<scalar_t>& blocks(const std::vector<T, A>& arg) const {
+
81  if constexpr (std::is_same_v<T, symmetry_t>) {
+
82  const auto& symmetries = arg;
+
83  std::vector<Size, typename std::allocator_traits<A>::template rebind_alloc<Size>> positions;
+
84  positions.reserve(blocks().rank());
+
85  for (auto i = 0; i < blocks().rank(); i++) {
+
86  positions.push_back(edges(i).position_by_symmetry(symmetries[i]));
+
87  }
+
88  return blocks(positions);
+
89  } else {
+
90  const auto& positions = arg;
+
91  return m_blocks.at(positions).value();
+
92  }
+
93  }
+
94  // non const version for all parameter
+
95  template<typename Arg>
+
96  auto& blocks(const Arg& arg) {
+
97  return const_cast<mdspan<scalar_t>&>(const_cast<const Core<scalar_t, symmetry_t>*>(this)->blocks(arg));
+
98  }
+
99  template<typename T, typename A>
+
100  const scalar_t& at(const std::vector<T, A>& arg) const {
+
101  std::vector<Size, typename std::allocator_traits<A>::template rebind_alloc<Size>> positions, offsets;
+
102  positions.reserve(blocks().rank());
+
103  offsets.reserve(blocks().rank());
+
104  for (auto i = 0; i < blocks().rank(); i++) {
+
105  auto [position, offset] = overloaded{
+
106  [](const edge_t& edge, const typename edge_t::coord_t& coord) { return coord; },
+
107  [](const edge_t& edge, const typename edge_t::index_t& index) { return edge.coord_by_index(index); },
+
108  [](const edge_t& edge, const typename edge_t::point_t& point) { return edge.coord_by_point(point); }}(edges(i), arg[i]);
+
109  positions.push_back(position);
+
110  offsets.push_back(offset);
+
111  }
+
112  return blocks(positions).at(offsets);
+
113  }
+
114  // non const version for all parameter
+
115  template<typename Arg>
+
116  auto& at(const Arg& arg) {
+
117  return const_cast<scalar_t&>(const_cast<const Core<scalar_t, symmetry_t>*>(this)->at(arg));
+
118  }
+
119 
+
120  private:
+
121  static std::vector<Size> blocks_dimensions(const std::vector<edge_t>& edges) {
+
122  std::vector<Size> result;
+
123  result.reserve(edges.size());
+
124  for (const auto& edge : edges) {
+
125  result.emplace_back(edge.segments_size());
+
126  }
+
127  return result;
+
128  }
+
129 
+
130  std::vector<Size> single_block_dimensions(const std::vector<Size>& positions) const {
+
131  std::vector<Size> result;
+
132  result.reserve(blocks().rank());
+
133  for (auto i = 0; i < blocks().rank(); i++) {
+
134  result.push_back(edges(i).segments(positions[i]).second);
+
135  }
+
136  return result;
+
137  }
+
138 
+
139  void refresh_storage_pointer_in_pool() {
+
140  auto storage_pointer = m_storage.data();
+
141 
+
142  for (auto& block : m_pool) {
+
143  if (block.has_value()) {
+
144  block.value().set_data(storage_pointer);
+
145  storage_pointer += block.value().size();
+
146  }
+
147  }
+
148  }
+
149 
+
150  public:
+
151  // this is the only constructor, from constructor of tensor
+
152  Core(std::vector<edge_t> input_edges) :
+
153  m_edges(std::move(input_edges)),
+
154  m_blocks(nullptr, blocks_dimensions(m_edges)),
+
155  m_pool(m_blocks.size()) {
+
156  m_blocks.set_data(m_pool.data());
+
157 
+
158  if (blocks().size() == 0) {
+
159  return;
+
160  }
+
161 
+
162  auto total_symmetry_pool = std::vector<symmetry_t>(blocks().size());
+
163  auto total_symmetry = mdspan<symmetry_t>(total_symmetry_pool.data(), blocks().dimensions());
+
164  for (auto i = 0; i < blocks().rank(); ++i) {
+
165  Size self_size = edges(i).segments_size();
+
166  Size in_size = blocks().leadings(i);
+
167  Size out_size = blocks().size() / (self_size * in_size);
+
168  for (Size x = 0; x < out_size; x++) {
+
169  auto offset_for_x = x;
+
170  for (Size y = 0; y < self_size; y++) {
+
171  symmetry_t here = edges(i).segments(y).first;
+
172  auto offset_for_y = offset_for_x * self_size + y;
+
173  for (Size z = 0; z < in_size; z++) {
+
174  auto offset_for_z = offset_for_y * in_size + z;
+
175  total_symmetry_pool[offset_for_z] += here;
+
176  }
+
177  }
+
178  }
+
179  }
+
180 
+
181  Size storage_size = 0;
+
182  for (auto it = blocks().begin(); it.valid; ++it) {
+
183  if (total_symmetry_pool[it.offset] == symmetry_t()) {
+
184  it->emplace(nullptr, single_block_dimensions(it.indices));
+
185  storage_size += it->value().size();
+
186  }
+
187  }
+
188 
+
189  m_storage.resize(storage_size);
+
190  refresh_storage_pointer_in_pool();
+
191  }
+
192 
+
193  Core() = delete;
+
194  Core(const Core& other) : m_edges(other.m_edges), m_blocks(other.m_blocks), m_pool(other.m_pool), m_storage(other.m_storage) {
+
195  m_blocks.set_data(m_pool.data());
+
196  refresh_storage_pointer_in_pool();
+
197  }
+
198  Core(Core&& other) = default;
+
199  Core& operator=(const Core&) = delete;
+
200  Core& operator=(Core&&) = delete;
+
201 
+
202  void _block_order_v0_to_v1() {
+
203  auto new_storage = no_initialize::vector<scalar_t>(m_storage.size());
+
204 
+
205  std::vector<std::vector<symmetry_t>> old_order;
+
206  for (auto it = blocks().begin(); it.valid; ++it) {
+
207  if (it->has_value()) {
+
208  std::vector<symmetry_t> result;
+
209  result.reserve(blocks().rank());
+
210  for (auto i = 0; i < blocks().rank(); i++) {
+
211  result.push_back(edges(i).segments(it.indices[i]).first);
+
212  }
+
213  old_order.push_back(std::move(result));
+
214  }
+
215  }
+
216 
+
217  std::map<std::vector<symmetry_t>, std::tuple<Size, Size, Size>> symmetries_to_offsets; // old offset, new offset, size
+
218  Size total_new_offset = 0;
+
219  for (const auto& symmetries : old_order) {
+
220  auto& [old_offset, new_offset, size] = symmetries_to_offsets[symmetries];
+
221  size = blocks(symmetries).size();
+
222  new_offset = total_new_offset;
+
223  total_new_offset += size;
+
224  }
+
225 
+
226  std::sort(old_order.begin(), old_order.end());
+
227 
+
228  Size total_old_offset = 0;
+
229  for (const auto& symmetries : old_order) {
+
230  auto& [old_offset, new_offset, size] = symmetries_to_offsets[symmetries];
+
231  old_offset = total_old_offset;
+
232  total_old_offset += size;
+
233  }
+
234 
+
235  for (const auto& [key, value] : symmetries_to_offsets) {
+
236  const auto& [old_offset, new_offset, size] = value;
+
237  std::copy(&m_storage[old_offset], &m_storage[old_offset + size], &new_storage[new_offset]);
+
238  }
+
239 
+
240  m_storage = std::move(new_storage);
+
241  refresh_storage_pointer_in_pool();
+
242  }
+
243  };
+
244 } // namespace TAT
+
245 #endif
+
Contains nearly all tensor data except edge name, include edge shape and tensor content.
Definition: core.hpp:45
+
The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like li...
Definition: edge.hpp:252
+
Definition: multidimension_span.hpp:33
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
Definition: symmetry.hpp:95
+
Definition: common_variable.hpp:244
+
+
+ + + + diff --git a/dir_1ac0d2e859119d1a816ab91accc8f3bd.html b/dir_1ac0d2e859119d1a816ab91accc8f3bd.html new file mode 100644 index 000000000..69dfd5ba3 --- /dev/null +++ b/dir_1ac0d2e859119d1a816ab91accc8f3bd.html @@ -0,0 +1,100 @@ + + + + + + + +TAT: tetragono/tetragono/auxiliaries Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
auxiliaries Directory Reference
+
+
+
+
+ + + + diff --git a/dir_1bb041b373cba7fea1f94fe0a21b12cb.html b/dir_1bb041b373cba7fea1f94fe0a21b12cb.html new file mode 100644 index 000000000..b60997286 --- /dev/null +++ b/dir_1bb041b373cba7fea1f94fe0a21b12cb.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: tetragono Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/dir_2aa3e1e3445b52e6089c31406cc8058e.html b/dir_2aa3e1e3445b52e6089c31406cc8058e.html new file mode 100644 index 000000000..68268c8c3 --- /dev/null +++ b/dir_2aa3e1e3445b52e6089c31406cc8058e.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: include/TAT/miscellaneous Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
miscellaneous Directory Reference
+
+
+ + + + + + + + + + + +

+Files

file  io.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  mpi.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  scalar.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
+
+
+ + + + diff --git a/dir_2aa3e1e3445b52e6089c31406cc8058e.js b/dir_2aa3e1e3445b52e6089c31406cc8058e.js new file mode 100644 index 000000000..5e4c19802 --- /dev/null +++ b/dir_2aa3e1e3445b52e6089c31406cc8058e.js @@ -0,0 +1,6 @@ +var dir_2aa3e1e3445b52e6089c31406cc8058e = +[ + [ "io.hpp", "io_8hpp.html", "io_8hpp" ], + [ "mpi.hpp", "mpi_8hpp.html", "mpi_8hpp" ], + [ "scalar.hpp", "scalar_8hpp.html", "scalar_8hpp" ] +]; \ No newline at end of file diff --git a/dir_32d6834a61cf7e3eb1dc36108a8ff177.html b/dir_32d6834a61cf7e3eb1dc36108a8ff177.html new file mode 100644 index 000000000..3e5f631f7 --- /dev/null +++ b/dir_32d6834a61cf7e3eb1dc36108a8ff177.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: include/TAT/utility Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
utility Directory Reference
+
+ +
+ + + + diff --git a/dir_32d6834a61cf7e3eb1dc36108a8ff177.js b/dir_32d6834a61cf7e3eb1dc36108a8ff177.js new file mode 100644 index 000000000..001604548 --- /dev/null +++ b/dir_32d6834a61cf7e3eb1dc36108a8ff177.js @@ -0,0 +1,9 @@ +var dir_32d6834a61cf7e3eb1dc36108a8ff177 = +[ + [ "allocator.hpp", "allocator_8hpp.html", "allocator_8hpp" ], + [ "common_variable.hpp", "common__variable_8hpp.html", "common__variable_8hpp" ], + [ "const_integral.hpp", "const__integral_8hpp.html", "const__integral_8hpp" ], + [ "multidimension_span.hpp", "multidimension__span_8hpp.html", "multidimension__span_8hpp" ], + [ "shared_ptr.hpp", "shared__ptr_8hpp.html", "shared__ptr_8hpp" ], + [ "timer.hpp", "timer_8hpp.html", "timer_8hpp" ] +]; \ No newline at end of file diff --git a/dir_3e2ca712ed33b4acc8f5e703e916d56d.html b/dir_3e2ca712ed33b4acc8f5e703e916d56d.html new file mode 100644 index 000000000..b508b81cb --- /dev/null +++ b/dir_3e2ca712ed33b4acc8f5e703e916d56d.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: tetragono/tetragono Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
tetragono Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/dir_b160beeb2b43916eb0814d3fadcb9e8e.html b/dir_b160beeb2b43916eb0814d3fadcb9e8e.html new file mode 100644 index 000000000..ded02f601 --- /dev/null +++ b/dir_b160beeb2b43916eb0814d3fadcb9e8e.html @@ -0,0 +1,100 @@ + + + + + + + +TAT: tetragono/tetragono/sampling_lattice/squash Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
squash Directory Reference
+
+
+
+
+ + + + diff --git a/dir_bba2162289eb2d74249bf9838ef29818.html b/dir_bba2162289eb2d74249bf9838ef29818.html new file mode 100644 index 000000000..7d5456f2e --- /dev/null +++ b/dir_bba2162289eb2d74249bf9838ef29818.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: lazy_graph Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
lazy_graph Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/dir_c11eeef15dfae30af60e807fe15492ec.html b/dir_c11eeef15dfae30af60e807fe15492ec.html new file mode 100644 index 000000000..e4fd25f8b --- /dev/null +++ b/dir_c11eeef15dfae30af60e807fe15492ec.html @@ -0,0 +1,137 @@ + + + + + + + +TAT: include/TAT/implement Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
implement Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  clear_symmetry.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  conjugate.hpp [code]
 Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  contract.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  edge_operator.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  exponential.hpp [code]
 Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  identity.hpp [code]
 Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  qr.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  shrink_and_expand.hpp [code]
 Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  split_and_merge.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  svd.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  trace.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
+
+
+ + + + diff --git a/dir_c11eeef15dfae30af60e807fe15492ec.js b/dir_c11eeef15dfae30af60e807fe15492ec.js new file mode 100644 index 000000000..218e10af0 --- /dev/null +++ b/dir_c11eeef15dfae30af60e807fe15492ec.js @@ -0,0 +1,14 @@ +var dir_c11eeef15dfae30af60e807fe15492ec = +[ + [ "clear_symmetry.hpp", "clear__symmetry_8hpp.html", "clear__symmetry_8hpp" ], + [ "conjugate.hpp", "conjugate_8hpp.html", "conjugate_8hpp" ], + [ "contract.hpp", "contract_8hpp.html", "contract_8hpp" ], + [ "edge_operator.hpp", "edge__operator_8hpp.html", "edge__operator_8hpp" ], + [ "exponential.hpp", "exponential_8hpp.html", "exponential_8hpp" ], + [ "identity.hpp", "identity_8hpp.html", "identity_8hpp" ], + [ "qr.hpp", "qr_8hpp.html", "qr_8hpp" ], + [ "shrink_and_expand.hpp", "shrink__and__expand_8hpp.html", "shrink__and__expand_8hpp" ], + [ "split_and_merge.hpp", "split__and__merge_8hpp.html", "split__and__merge_8hpp" ], + [ "svd.hpp", "svd_8hpp.html", "svd_8hpp" ], + [ "trace.hpp", "trace_8hpp.html", "trace_8hpp" ] +]; \ No newline at end of file diff --git a/dir_d03a70d343a54e863776fceb3813cfee.html b/dir_d03a70d343a54e863776fceb3813cfee.html new file mode 100644 index 000000000..217c3f7ca --- /dev/null +++ b/dir_d03a70d343a54e863776fceb3813cfee.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: tetragono/tetragono/sampling_lattice Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
sampling_lattice Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/dir_d1f80ff82539b6697abb4a4794b81257.html b/dir_d1f80ff82539b6697abb4a4794b81257.html new file mode 100644 index 000000000..70b915d3f --- /dev/null +++ b/dir_d1f80ff82539b6697abb4a4794b81257.html @@ -0,0 +1,110 @@ + + + + + + + +TAT: include/TAT Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT Directory Reference
+
+
+ + +

+Directories

+ + + + +

+Files

file  TAT.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
+
+
+ + + + diff --git a/dir_d1f80ff82539b6697abb4a4794b81257.js b/dir_d1f80ff82539b6697abb4a4794b81257.js new file mode 100644 index 000000000..1b4b2fbe0 --- /dev/null +++ b/dir_d1f80ff82539b6697abb4a4794b81257.js @@ -0,0 +1,8 @@ +var dir_d1f80ff82539b6697abb4a4794b81257 = +[ + [ "implement", "dir_c11eeef15dfae30af60e807fe15492ec.html", "dir_c11eeef15dfae30af60e807fe15492ec" ], + [ "miscellaneous", "dir_2aa3e1e3445b52e6089c31406cc8058e.html", "dir_2aa3e1e3445b52e6089c31406cc8058e" ], + [ "structure", "dir_d59b46738c7f078653cd0d36aa541791.html", "dir_d59b46738c7f078653cd0d36aa541791" ], + [ "utility", "dir_32d6834a61cf7e3eb1dc36108a8ff177.html", "dir_32d6834a61cf7e3eb1dc36108a8ff177" ], + [ "TAT.hpp", "TAT_8hpp.html", "TAT_8hpp" ] +]; \ No newline at end of file diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html new file mode 100644 index 000000000..1cd4d1298 --- /dev/null +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: include Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
include Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/dir_d44c64559bbebec7f509842c48db8b23.js b/dir_d44c64559bbebec7f509842c48db8b23.js new file mode 100644 index 000000000..578f3b8d9 --- /dev/null +++ b/dir_d44c64559bbebec7f509842c48db8b23.js @@ -0,0 +1,4 @@ +var dir_d44c64559bbebec7f509842c48db8b23 = +[ + [ "TAT", "dir_d1f80ff82539b6697abb4a4794b81257.html", "dir_d1f80ff82539b6697abb4a4794b81257" ] +]; \ No newline at end of file diff --git a/dir_d59b46738c7f078653cd0d36aa541791.html b/dir_d59b46738c7f078653cd0d36aa541791.html new file mode 100644 index 000000000..e8edd99bb --- /dev/null +++ b/dir_d59b46738c7f078653cd0d36aa541791.html @@ -0,0 +1,119 @@ + + + + + + + +TAT: include/TAT/structure Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
structure Directory Reference
+
+
+ + + + + + + + + + + + + + + + + +

+Files

file  core.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  edge.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  name.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  symmetry.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
file  tensor.hpp [code]
 Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 
+
+
+ + + + diff --git a/dir_d59b46738c7f078653cd0d36aa541791.js b/dir_d59b46738c7f078653cd0d36aa541791.js new file mode 100644 index 000000000..e46a5e8e6 --- /dev/null +++ b/dir_d59b46738c7f078653cd0d36aa541791.js @@ -0,0 +1,8 @@ +var dir_d59b46738c7f078653cd0d36aa541791 = +[ + [ "core.hpp", "core_8hpp.html", "core_8hpp" ], + [ "edge.hpp", "edge_8hpp.html", "edge_8hpp" ], + [ "name.hpp", "name_8hpp.html", "name_8hpp" ], + [ "symmetry.hpp", "symmetry_8hpp.html", "symmetry_8hpp" ], + [ "tensor.hpp", "tensor_8hpp.html", "tensor_8hpp" ] +]; \ No newline at end of file diff --git a/dir_f08b25de5750f3bb9e473212d11d084d.html b/dir_f08b25de5750f3bb9e473212d11d084d.html new file mode 100644 index 000000000..6d19c18be --- /dev/null +++ b/dir_f08b25de5750f3bb9e473212d11d084d.html @@ -0,0 +1,100 @@ + + + + + + + +TAT: lazy_graph/lazy Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
lazy Directory Reference
+
+
+
+
+ + + + diff --git a/dir_f327081aebde40e94b3c9aef15c7c41d.html b/dir_f327081aebde40e94b3c9aef15c7c41d.html new file mode 100644 index 000000000..34c1a5ff9 --- /dev/null +++ b/dir_f327081aebde40e94b3c9aef15c7c41d.html @@ -0,0 +1,100 @@ + + + + + + + +TAT: tetragono/tetragono/common_tensor Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
common_tensor Directory Reference
+
+
+
+
+ + + + diff --git a/doc.png b/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 GIT binary patch literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t literal 0 HcmV?d00001 diff --git a/doxygen.css b/doxygen.css new file mode 100644 index 000000000..ffbff0224 --- /dev/null +++ b/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/doxygen.svg b/doxygen.svg new file mode 100644 index 000000000..d42dad52d --- /dev/null +++ b/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js new file mode 100644 index 000000000..3174bd7be --- /dev/null +++ b/dynsections.js @@ -0,0 +1,121 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +TAT: include/TAT/structure/edge.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
edge.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <algorithm>
+#include <stdexcept>
+#include <type_traits>
+#include <vector>
+#include "symmetry.hpp"
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  TAT::edge_segments_t< Symmetry, _is_pointer >
 
struct  TAT::edge_bose_arrow_t
 
struct  TAT::edge_fermi_arrow_t
 
class  TAT::Edge< Symmetry, is_pointer >
 The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment. More...
 
+ + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + +

+Typedefs

+template<typename Symmetry >
using TAT::edge_arrow_t = std::conditional_t< Symmetry::is_fermi_symmetry, edge_fermi_arrow_t, edge_bose_arrow_t >
 
template<typename Symmetry >
using TAT::EdgePointer = Edge< Symmetry, true >
 An edge but only containing a pointer to other edge's segment data. More...
 
+ + + + + + + + + + + + + +

+Functions

+template<typename Symmetry , bool is_pointer>
bool TAT::operator== (const edge_segments_t< Symmetry, is_pointer > &edge_1, const edge_segments_t< Symmetry, is_pointer > &edge_2)
 
+template<typename Symmetry , bool is_pointer>
bool TAT::operator!= (const edge_segments_t< Symmetry, is_pointer > &edge_1, const edge_segments_t< Symmetry, is_pointer > &edge_2)
 
+template<typename Symmetry , bool is_pointer>
bool TAT::operator== (const Edge< Symmetry, is_pointer > &edge_1, const Edge< Symmetry, is_pointer > &edge_2)
 
+template<typename Symmetry , bool is_pointer>
bool TAT::operator!= (const Edge< Symmetry, is_pointer > &edge_1, const Edge< Symmetry, is_pointer > &edge_2)
 
+ + + + + + + + + + +

+Variables

+template<typename T >
constexpr bool TAT::is_edge = detail::is_edge_helper<T>::value
 
+template<typename T >
constexpr bool TAT::is_edge_pointer = detail::is_edge_pointer_helper<T>::value
 
+template<typename T >
constexpr bool TAT::is_general_edge = is_edge<T> || is_edge_pointer<T>
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/edge_8hpp.js b/edge_8hpp.js new file mode 100644 index 000000000..899331bc6 --- /dev/null +++ b/edge_8hpp.js @@ -0,0 +1,17 @@ +var edge_8hpp = +[ + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html", "classTAT_1_1edge__segments__t" ], + [ "edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html", "structTAT_1_1edge__bose__arrow__t" ], + [ "edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html", "structTAT_1_1edge__fermi__arrow__t" ], + [ "Edge", "classTAT_1_1Edge.html", "classTAT_1_1Edge" ], + [ "TAT_EDGE_HPP", "edge_8hpp.html#a4015d07910c2d745145db0a133305b4e", null ], + [ "edge_arrow_t", "edge_8hpp.html#a4d5e39e35255bd2dcf7aef942e58fe9d", null ], + [ "EdgePointer", "edge_8hpp.html#ae21b38ad84427829832b86083f28b8cc", null ], + [ "operator!=", "edge_8hpp.html#a44563f2033e002a16da8f9c9b4a7d1cf", null ], + [ "operator!=", "edge_8hpp.html#a8b3c0476ed24ff8650e8fd5b363679bc", null ], + [ "operator==", "edge_8hpp.html#a28e1fc81d3a9e17e79962fdd0b15d855", null ], + [ "operator==", "edge_8hpp.html#ab93ddd2f8c1c8d76b1fcafb85c202789", null ], + [ "is_edge", "edge_8hpp.html#aab7a6d99c30988d863264780441266c4", null ], + [ "is_edge_pointer", "edge_8hpp.html#ac06843b7eba1277c89d82d35f1e677c4", null ], + [ "is_general_edge", "edge_8hpp.html#aee2225a59e59910bc7ac1b9f1f40936c", null ] +]; \ No newline at end of file diff --git a/edge_8hpp_source.html b/edge_8hpp_source.html new file mode 100644 index 000000000..7aa53f9fe --- /dev/null +++ b/edge_8hpp_source.html @@ -0,0 +1,420 @@ + + + + + + + +TAT: include/TAT/structure/edge.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
edge.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_EDGE_HPP
+
22 #define TAT_EDGE_HPP
+
23 
+
24 #include <algorithm>
+
25 #include <stdexcept>
+
26 #include <type_traits>
+
27 #include <vector>
+
28 
+
29 #include "symmetry.hpp"
+
30 
+
31 namespace TAT {
+
32  template<typename Symmetry, bool _is_pointer = false>
+ +
34  static_assert(is_symmetry<Symmetry>);
+
35 
+
36  public:
+
37  static constexpr bool is_pointer = _is_pointer;
+
38  static constexpr bool is_not_pointer = !is_pointer;
+
39 
+
40  public:
+
41  using symmetry_t = Symmetry;
+
42  using segments_t = std::vector<std::pair<symmetry_t, Size>>;
+
43 
+
44  private:
+
45  std::conditional_t<is_pointer, const segments_t&, segments_t> m_segments;
+
46 
+
47  protected:
+
48  using symlist_t = std::vector<symmetry_t>;
+
49 
+
50  private:
+
51  static segments_t symlist_to_segments(const symlist_t& symmetries) {
+
52  segments_t result;
+
53  result.reserve(symmetries.size());
+
54  for (const auto& symmetry : symmetries) {
+
55  result.push_back({symmetry, 1});
+
56  }
+
57  return result;
+
58  }
+
59 
+
60  public:
+
61  edge_segments_t() = default;
+
62  edge_segments_t(const edge_segments_t& edge) = default;
+
63  edge_segments_t(edge_segments_t&& edge) = default;
+
64  edge_segments_t& operator=(const edge_segments_t&) = default;
+
65  edge_segments_t& operator=(edge_segments_t&&) = default;
+
66  ~edge_segments_t() = default;
+
67 
+
68  // only valid if is_not_pointer
+
69  edge_segments_t(segments_t&& segments) : m_segments(std::move(segments)) {
+
70  static_assert(is_not_pointer);
+
71  }
+
72  // valid for both
+
73  edge_segments_t(const segments_t& segments) : m_segments(segments) {
+
74  static_assert(true);
+
75  }
+
76 
+
80  edge_segments_t(const symlist_t& symmetries) : m_segments(symlist_to_segments(symmetries)) {
+
81  static_assert(is_not_pointer);
+
82  }
+
83 
+
87  edge_segments_t(const Size dimension, const symmetry_t symmetry = symmetry_t()) : m_segments({{symmetry, dimension}}) {
+
88  static_assert(is_not_pointer);
+
89  }
+
90 
+
91  // segment = (symmetry, dimension)
+
92  // segments = [segment]
+
93  // position = index in segment list
+
94 
+
95  // index = total index in the whole segments
+
96  // offset = index in single segment
+
97  // point = (symmetry, offset)
+
98  // coord = (position, offset)
+
99 
+
100  public:
+
101  using index_t = Size;
+
102  using position_t = Nums;
+
103  using point_t = std::pair<symmetry_t, Size>;
+
104  using coord_t = std::pair<position_t, Size>;
+
105 
+
106  public:
+
107  const segments_t& segments() const {
+
108  return m_segments;
+
109  }
+
110  position_t segments_size() const {
+
111  return m_segments.size();
+
112  }
+
113  const std::pair<symmetry_t, Size>& segments(position_t i) const {
+
114  return m_segments[i];
+
115  }
+
116 
+
117  public:
+
118  coord_t coord_by_point(const point_t& point) const {
+
119  const auto& [symmetry, offset] = point;
+
120  return {position_by_symmetry(symmetry), offset};
+
121  }
+
122  point_t point_by_coord(const coord_t& coord) const {
+
123  const auto& [position, offset] = coord;
+
124  return {segments(position).first, offset};
+
125  }
+
126  coord_t coord_by_index(const index_t& index) const {
+
127  Size offset = index;
+
128  for (auto position = 0; position < segments_size(); position++) {
+
129  const auto& [symmetry, dimension] = segments(position);
+
130  if (offset < dimension) {
+
131  return {position, offset};
+
132  } else {
+
133  offset -= dimension;
+
134  }
+
135  }
+
136  detail::error("Index is more than edge total dimension");
+
137  }
+
138  index_t index_by_coord(const coord_t& coord) const {
+
139  return index_by_point(point_by_coord(coord));
+
140  }
+
141  point_t point_by_index(const index_t& index) const {
+
142  return point_by_coord(coord_by_index(index));
+
143  }
+
144  index_t index_by_point(const point_t& point) const {
+
145  Size result = point.second;
+
146  for (const auto& [symmetry, dimension] : segments()) {
+
147  if (symmetry == point.first) {
+
148  return result;
+
149  }
+
150  result += dimension;
+
151  }
+
152  detail::error("The symmetry not found in this edge");
+
153  }
+
154 
+
155  public:
+
156  auto find_by_symmetry(const symmetry_t& symmetry) const {
+
157  return std::find_if(segments().begin(), segments().end(), [&symmetry](const auto& x) { return symmetry == x.first; });
+
158  }
+
159 
+
160  public:
+
161  position_t position_by_symmetry(const symmetry_t& symmetry) const {
+
162  auto where = find_by_symmetry(symmetry);
+
163  if constexpr (debug_mode) {
+
164  if (where == segments().end()) {
+
165  detail::error("No such symmetry in this edge");
+
166  }
+
167  }
+
168  return std::distance(segments().begin(), where);
+
169  }
+
170 
+
171  Size dimension_by_symmetry(const symmetry_t& symmetry) const {
+
172  auto where = find_by_symmetry(symmetry);
+
173  if constexpr (debug_mode) {
+
174  if (where == segments().end()) {
+
175  detail::error("No such symmetry in this edge");
+
176  }
+
177  }
+
178  return where->second;
+
179  }
+
180 
+
181  [[deprecated("conjugate inplace is renamed to conjugate_")]] void conjugate() {
+
182  conjugate_();
+
183  }
+
184  void conjugate_() {
+
185  static_assert(is_not_pointer);
+
186  for (auto& [symmetry, dimension] : m_segments) {
+
187  symmetry = -symmetry;
+
188  }
+
189  }
+
190 
+
191  [[deprecated("conjugate outplace is renamed to conjugate")]] edge_segments_t<symmetry_t> conjugated() const {
+
192  return conjugate();
+
193  }
+
194  edge_segments_t<symmetry_t> conjugate() const {
+
195  segments_t result;
+
196  result.reserve(segments_size());
+
197  for (const auto& [symmetry, dimension] : segments()) {
+
198  result.emplace_back(-symmetry, dimension);
+
199  }
+
200  return edge_segments_t<symmetry_t>(std::move(result));
+
201  }
+
202 
+
203  Size total_dimension() const {
+
204  Size total = 0;
+
205  for (const auto& [symmetry, dimension] : segments()) {
+
206  total += dimension;
+
207  }
+
208  return total;
+
209  }
+
210  };
+
211 
+ +
213  edge_bose_arrow_t() { }
+ +
215 
+
216  static constexpr Arrow arrow() {
+
217  return false;
+
218  }
+
219  static void set_arrow(Arrow) { }
+
220  static void reverse_arrow() { }
+
221  };
+
222 
+
223  // there are background EPR pair for each edge, for fermi edge, it is needed to record the order of this EPR pair, which is so called fermi arrow
+ +
225  edge_fermi_arrow_t() : m_arrow(false) { }
+
226  edge_fermi_arrow_t(Arrow arrow) : m_arrow(arrow) { }
+
227 
+
228  Arrow arrow() const {
+
229  return m_arrow;
+
230  }
+
231  void set_arrow(Arrow arrow) {
+
232  m_arrow = arrow;
+
233  }
+
234  void reverse_arrow() {
+
235  m_arrow ^= true;
+
236  }
+
237  private:
+
238  Arrow m_arrow;
+
239  };
+
240 
+
241  template<typename Symmetry>
+
242  using edge_arrow_t = std::conditional_t<Symmetry::is_fermi_symmetry, edge_fermi_arrow_t, edge_bose_arrow_t>;
+
243 
+
251  template<typename Symmetry, bool is_pointer = false>
+
252  class Edge : public edge_segments_t<Symmetry, is_pointer>, public edge_arrow_t<Symmetry> {
+
253  static_assert(is_symmetry<Symmetry>);
+
254 
+
255  public:
+
256  using base_arrow_t = edge_arrow_t<Symmetry>;
+ +
258 
+
259  Edge() = default;
+
260  Edge(const Edge&) = default;
+
261  Edge(Edge&&) = default;
+
262  Edge& operator=(const Edge&) = default;
+
263  Edge& operator=(Edge&&) = default;
+
264  ~Edge() = default;
+
265 
+
266  template<
+
267  typename Arg,
+
268  typename =
+
269  std::enable_if_t<std::is_constructible_v<base_segments_t, Arg&&> && !std::is_same_v<remove_cvref_t<Arg>, Edge<Symmetry, is_pointer>>>>
+
270  Edge(Arg&& arg, Arrow arrow = false) : base_segments_t(std::forward<Arg>(arg)), base_arrow_t(arrow) { }
+
271  Edge(std::initializer_list<std::pair<Symmetry, Size>> segments, Arrow arrow = false) :
+
272  base_segments_t(typename base_segments_t::segments_t(segments)),
+
273  base_arrow_t(arrow) { }
+
274  Edge(std::initializer_list<Symmetry> symmetries, Arrow arrow = false) :
+
275  base_segments_t(typename base_segments_t::symlist_t(symmetries)),
+
276  base_arrow_t(arrow) { }
+
277 
+
278  [[deprecated("conjugate inplace is renamed to conjugate_")]] void conjugate() {
+
279  conjugate_();
+
280  }
+
281  void conjugate_() {
+
282  base_segments_t::conjugate_();
+
283  base_arrow_t::reverse_arrow();
+
284  }
+
285 
+
286  [[deprecated("conjugate outplace is renamed to conjugate")]] Edge<Symmetry> conjugated() const {
+
287  return conjugate();
+
288  }
+
289  Edge<Symmetry> conjugate() const {
+
290  return Edge<Symmetry>(std::move(base_segments_t::conjugate()), !base_arrow_t::arrow());
+
291  }
+
292  };
+
293 
+
294  template<typename Symmetry, bool is_pointer>
+
295  bool operator==(const edge_segments_t<Symmetry, is_pointer>& edge_1, const edge_segments_t<Symmetry, is_pointer>& edge_2) {
+
296  return std::equal(edge_1.segments().begin(), edge_1.segments().end(), edge_2.segments().begin(), edge_2.segments().end());
+
297  }
+
298  template<typename Symmetry, bool is_pointer>
+
299  bool operator!=(const edge_segments_t<Symmetry, is_pointer>& edge_1, const edge_segments_t<Symmetry, is_pointer>& edge_2) {
+
300  return !(edge_1 == edge_2);
+
301  }
+
302 
+
303  template<typename Symmetry, bool is_pointer>
+
304  bool operator==(const Edge<Symmetry, is_pointer>& edge_1, const Edge<Symmetry, is_pointer>& edge_2) {
+
305  return (edge_1.arrow() == edge_2.arrow()) && (edge_1.segments() == edge_2.segments());
+
306  }
+
307  template<typename Symmetry, bool is_pointer>
+
308  bool operator!=(const Edge<Symmetry, is_pointer>& edge_1, const Edge<Symmetry, is_pointer>& edge_2) {
+
309  return !(edge_1 == edge_2);
+
310  }
+
311 
+
316  template<typename Symmetry>
+ +
318 
+
319  namespace detail {
+
320  template<typename T>
+
321  struct is_edge_helper : std::false_type { };
+
322 
+
323  template<typename T>
+
324  struct is_edge_helper<Edge<T, false>> : std::true_type { };
+
325 
+
326  template<typename T>
+
327  struct is_edge_pointer_helper : std::false_type { };
+
328 
+
329  template<typename T>
+
330  struct is_edge_pointer_helper<Edge<T, true>> : std::true_type { };
+
331  } // namespace detail
+
332 
+
333  template<typename T>
+
334  constexpr bool is_edge = detail::is_edge_helper<T>::value;
+
335 
+
336  template<typename T>
+
337  constexpr bool is_edge_pointer = detail::is_edge_pointer_helper<T>::value;
+
338 
+
339  template<typename T>
+
340  constexpr bool is_general_edge = is_edge<T> || is_edge_pointer<T>;
+
341 } // namespace TAT
+
342 #endif
+
The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like li...
Definition: edge.hpp:252
+
Definition: edge.hpp:33
+
edge_segments_t(const Size dimension, const symmetry_t symmetry=symmetry_t())
construct a trivial edge, only contain a single symmetry
Definition: edge.hpp:87
+
edge_segments_t(const symlist_t &symmetries)
construct the edge with list of symmetry, each size of them are 1
Definition: edge.hpp:80
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
constexpr bool debug_mode
Debug flag.
Definition: common_variable.hpp:50
+
std::uint32_t Nums
Tensor block number, or dimension segment number type.
Definition: common_variable.hpp:153
+
bool Arrow
Fermi arrow type.
Definition: common_variable.hpp:166
+
General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
Definition: symmetry.hpp:95
+
Definition: edge.hpp:212
+
Definition: edge.hpp:224
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
+
+ + + + diff --git a/edge__operator_8hpp.html b/edge__operator_8hpp.html new file mode 100644 index 000000000..b2ef58548 --- /dev/null +++ b/edge__operator_8hpp.html @@ -0,0 +1,131 @@ + + + + + + + +TAT: include/TAT/implement/edge_operator.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
edge_operator.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <utility>
+#include "../structure/tensor.hpp"
+#include "../utility/allocator.hpp"
+#include "../utility/timer.hpp"
+
+

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + +

+Variables

+timer TAT::transpose_guard ("transpose")
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/edge__operator_8hpp.js b/edge__operator_8hpp.js new file mode 100644 index 000000000..3e980017a --- /dev/null +++ b/edge__operator_8hpp.js @@ -0,0 +1,5 @@ +var edge__operator_8hpp = +[ + [ "TAT_EDGE_OPERATOR_HPP", "edge__operator_8hpp.html#a6de2e2cd93f6369e5566ee27420a2ac8", null ], + [ "transpose_guard", "edge__operator_8hpp.html#af0b77c4e8a6ad17b3ef9952aa06cf4ac", null ] +]; \ No newline at end of file diff --git a/edge__operator_8hpp_source.html b/edge__operator_8hpp_source.html new file mode 100644 index 000000000..2960f6f14 --- /dev/null +++ b/edge__operator_8hpp_source.html @@ -0,0 +1,781 @@ + + + + + + + +TAT: include/TAT/implement/edge_operator.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
edge_operator.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_EDGE_OPERATOR_HPP
+
22 #define TAT_EDGE_OPERATOR_HPP
+
23 
+
24 #include <utility>
+
25 
+
26 #include "../structure/tensor.hpp"
+
27 #include "../utility/allocator.hpp"
+
28 #include "../utility/timer.hpp"
+
29 
+
30 namespace TAT {
+
31  inline timer transpose_guard("transpose");
+
32 
+
33  template<typename ScalarType, typename Symmetry, typename Name>
+
34  template<typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H>
+
35  Tensor<ScalarType, Symmetry, Name> Tensor<ScalarType, Symmetry, Name>::edge_operator_implement(
+
36  const A& split_map,
+
37  const B& reversed_names,
+
38  const C& merge_map,
+
39  std::vector<Name> new_names,
+
40  const bool apply_parity,
+
41  const D& parity_exclude_names_split,
+
42  const E& parity_exclude_names_reversed_before_transpose,
+
43  const F& parity_exclude_names_reversed_after_transpose,
+
44  const G& parity_exclude_names_merge,
+
45  const H& edges_and_symmetries_to_cut_before_all
+
46  ) const {
+
47  // rename edge will not use edge operator, it will use special function which can also change the name type
+
48  auto timer_guard = transpose_guard();
+
49  // step 1: cut
+
50  // step 2: split
+
51  // step 3: reverse
+
52  // step 4: transpose
+
53  // step 5: reverse before merge
+
54  // step 6: merge
+
55 
+
56  // step 1,2,3 is doing up to down
+
57  // step 4,5,6 need the result name to get the plan detail down to up
+
58  // step 2,3,4,5,6 is symmetric along transpose
+
59 
+
60  // symmetry constexpr info
+
61  constexpr auto is_fermi = Symmetry::is_fermi_symmetry;
+
62 
+
63  // Table of edge operation plan
+
64  //
+
65  // rank names edges
+
66  // before_split O O D
+
67  // after_split ↓ O O
+
68  // before_transpose ↓ ↑ O
+
69  // at_transpose O - -
+
70  // after_transpose ↑ ↓ O
+
71  // before_merge ↑ O O
+
72  // after_merge O O D
+
73  //
+
74  // To find original block and offset from block at transpose, we need
+
75  // [symmetry] -> [(symmetry, offset)], the former is contiguous, the later share leading with the original block.
+
76  // if no split happen, S -> (S, 0) where S:Symmetry, otherwise, a group of [S] splitted from single symmetry S.
+
77  // For every edge splitted, need a pool, loop at split result [E], and sum every [S] in to S and add it to pool to get offset.
+
78 
+
79  // flags offsets
+
80  // split rank[at_transpose] (symmetry[]->(total_symmetry, position_of_total_symmetry, size, offset, parity))[before_split]
+
81  // merge rank[at_transpose] (symmetry[]->(total_symmetry, position_of_total_symmetry, size, offset, parity))[after_merge]
+
82  // symmetry[] is edges after split/before merge, it is mapped to symmetry and offset before split/after merge
+
83  //
+
84  // reversed flags
+
85  // before_transpose bool[at_transpose]
+
86  // after_transpose bool[at_transpose]
+
87  //
+
88  // what maybe empty: two reverse flag and two offset map
+
89 
+
90  // before_split
+
91  const Rank rank_before_split = rank();
+
92  const auto& names_before_split = names();
+
93  auto real_edges_before_split = std::vector<Edge<Symmetry>>();
+
94  if (edges_and_symmetries_to_cut_before_all.size() != 0) {
+
95  real_edges_before_split.reserve(rank_before_split);
+
96  for (auto index_before_split = 0; index_before_split < rank_before_split; index_before_split++) {
+
97  // edge_and_symmetries_to_cut_before_all :: Name -> Symmetry -> Size
+
98  if (auto found = edges_and_symmetries_to_cut_before_all.find(names(index_before_split));
+
99  found != edges_and_symmetries_to_cut_before_all.end()) {
+
100  // this edge need cut
+
101  const auto& symmetry_to_cut_dimension = found->second;
+
102  // symmetry_to_cut_dimension :: Symmetry -> Size
+
103  std::vector<std::pair<Symmetry, Size>> segment;
+
104  for (const auto& [symmetry, dimension] : edges(index_before_split).segments()) {
+
105  if (auto cut_iterator = symmetry_to_cut_dimension.find(symmetry); cut_iterator != symmetry_to_cut_dimension.end()) {
+
106  // this segment need cut
+
107  if (auto new_dimension = cut_iterator->second; new_dimension != 0) {
+
108  segment.emplace_back(symmetry, new_dimension < dimension ? new_dimension : dimension);
+
109  }
+
110  // if new_dimension is zero, delete the entire segment
+
111  // cut edge will only change leading in future
+
112  // so later use core->edges to calculate offset, rather than edge_before_split
+
113  } else {
+
114  // this segment not need cut
+
115  segment.emplace_back(symmetry, dimension);
+
116  }
+
117  }
+
118  real_edges_before_split.emplace_back(std::move(segment), edges(index_before_split).arrow()); // result edge
+
119  } else {
+
120  real_edges_before_split.push_back(edges(index_before_split));
+
121  }
+
122  }
+
123  }
+
124  const auto& edges_before_split = edges_and_symmetries_to_cut_before_all.size() != 0 ? real_edges_before_split : edges();
+
125 
+
126  // after_split
+
127  // flag and offset is spilt plan
+
128  auto real_names_after_split = std::vector<Name>();
+
129  auto split_flags = pmr::vector<Rank>();
+
130  auto edges_after_split = pmr::vector<EdgePointer<Symmetry>>();
+
131  auto split_offsets_pool = pmr::vector<pmr::vector<std::tuple<Symmetry, Size, Size, Size, Size>>>();
+
132  auto split_offsets = pmr::vector<std::optional<mdspan<std::tuple<Symmetry, Size, Size, Size, Size>, pmr::vector<Size>>>>();
+
133  if (split_map.size() != 0) {
+
134  // dont know rank after split(rank at transpose) now, but it can still reduce the realloc time
+
135  real_names_after_split.reserve(rank_before_split); // rank_at_transpose
+
136  split_flags.reserve(rank_before_split); // rank_at_transpose
+
137  edges_after_split.reserve(rank_before_split); // rank_at_transpose
+
138  split_offsets_pool.reserve(rank_before_split); // no problem, it is rank before split
+
139  split_offsets.reserve(rank_before_split); // no problem, it is rank before split
+
140  for (Rank index_before_split = 0; index_before_split < rank_before_split; index_before_split++) {
+
141  if (auto found = split_map.find(names_before_split[index_before_split]); found != split_map.end()) {
+
142  // this edge is splitting
+
143  // the split begin, get it now because the pointer may change during puch_back
+
144  const auto& this_split_begin_index_after_split = edges_after_split.size();
+
145  auto this_split_shape = pmr::vector<Size>();
+
146  this_split_shape.reserve(found->second.size());
+
147  // the validity of edge after split is ensured by user
+
148  for (const auto& [split_name, split_edge] : found->second) {
+
149  real_names_after_split.push_back(split_name);
+
150  split_flags.push_back(index_before_split);
+
151  edges_after_split.emplace_back(split_edge.segments(), edges_before_split[index_before_split].arrow());
+
152  this_split_shape.push_back(split_edge.segments_size());
+
153  }
+
154  const auto this_edges_after_split = edges_after_split.data() + this_split_begin_index_after_split;
+
155  auto& this_offset = split_offsets.emplace_back(std::in_place, nullptr, std::move(this_split_shape)).value();
+
156  auto& this_offset_pool =
+
157  split_offsets_pool.emplace_back(this_offset.size(), std::tuple<Symmetry, Size, Size, Size, Size>{{}, 0, 1, 0, 0});
+
158  this_offset.set_data(this_offset_pool.data());
+
159  // sum symmetry
+
160  for (auto this_index_after_split = 0; this_index_after_split < this_offset.rank(); this_index_after_split++) {
+
161  Size self_size = this_offset.dimensions(this_index_after_split);
+
162  Size in_size = this_offset.leadings(this_index_after_split);
+
163  Size out_size = this_offset.size() == 0 ? 0 : this_offset.size() / (self_size * in_size);
+
164  for (Size x = 0; x < out_size; x++) {
+
165  auto offset_for_x = x;
+
166  for (Size y = 0; y < self_size; y++) {
+
167  const auto& [symmetry_here, dimension_here] = this_edges_after_split[this_index_after_split].segments(y);
+
168  auto offset_for_y = offset_for_x * self_size + y;
+
169  for (Size z = 0; z < in_size; z++) {
+
170  auto offset_for_z = offset_for_y * in_size + z;
+
171  std::get<0>(this_offset_pool[offset_for_z]) += symmetry_here;
+
172  std::get<2>(this_offset_pool[offset_for_z]) *= dimension_here;
+
173  std::get<4>(this_offset_pool[offset_for_z]) += symmetry_here.parity();
+
174  }
+
175  }
+
176  }
+
177  }
+
178  // accumulate offset
+
179  auto offset_bank = pmr::vector<Size>(edges_before_split[index_before_split].segments_size());
+
180  for (auto& [symmetry, position, size, offset, parity] : this_offset_pool) {
+
181  position = edges_before_split[index_before_split].position_by_symmetry(symmetry);
+
182  offset = offset_bank[position];
+
183  offset_bank[position] += size;
+
184  }
+
185  } else {
+
186  // no split for this edge
+
187  real_names_after_split.push_back(names_before_split[index_before_split]);
+
188  split_flags.push_back(index_before_split);
+
189  edges_after_split.emplace_back(edges_before_split[index_before_split].segments(), edges_before_split[index_before_split].arrow());
+
190  split_offsets.emplace_back();
+
191  // offset is not calculated, it will check no split so it will not use offset
+
192  }
+
193  }
+
194  } else {
+
195  // no split for all edge
+
196  edges_after_split.reserve(rank_before_split);
+
197  split_flags.reserve(rank_before_split);
+
198  // split_offset.reserve(rank_before_split);
+
199  for (auto index_before_split = 0; index_before_split < rank_before_split; index_before_split++) {
+
200  const auto& edge = edges_before_split[index_before_split];
+
201  split_flags.push_back(index_before_split);
+
202  edges_after_split.emplace_back(edge.segments(), edge.arrow());
+
203  // offset is not calculated, it will check no split so it will not use offset
+
204  // even emplace back is not needed
+
205  }
+
206  }
+
207  const auto& names_after_split = split_map.size() != 0 ? real_names_after_split : names_before_split;
+
208  const Rank rank_at_transpose = names_after_split.size();
+
209 
+
210  // before_transpose
+
211  auto reversed_before_transpose_flags = pmr::vector<bool>(); // length = rank_at_transpose
+
212  // this flag may be empty if no reverse happened
+
213  auto fermi_edges_before_transpose = pmr::vector<EdgePointer<Symmetry>>();
+
214  if constexpr (is_fermi) {
+
215  if (reversed_names.size() != 0) {
+
216  reversed_before_transpose_flags.reserve(rank_at_transpose);
+
217  fermi_edges_before_transpose.reserve(rank_at_transpose);
+
218  for (auto index_after_split = 0; index_after_split < rank_at_transpose; index_after_split++) {
+
219  auto& this_edge = fermi_edges_before_transpose.emplace_back(edges_after_split[index_after_split]);
+
220  if (reversed_names.find(names_after_split[index_after_split]) != reversed_names.end()) {
+
221  this_edge.reverse_arrow();
+
222  reversed_before_transpose_flags.push_back(true);
+
223  } else {
+
224  reversed_before_transpose_flags.push_back(false);
+
225  }
+
226  }
+
227  } else {
+
228  reversed_before_transpose_flags = pmr::vector<bool>(rank_at_transpose, false);
+
229  }
+
230  }
+
231  const auto& edges_before_transpose = is_fermi && reversed_names.size() != 0 ? fermi_edges_before_transpose : edges_after_split;
+
232 
+
233  // analyze name info down to up
+
234  const auto& names_after_merge = new_names;
+
235  const Rank rank_after_merge = names_after_merge.size();
+
236 
+
237  auto merge_flags = pmr::vector<Rank>();
+
238  auto real_names_before_merge = std::vector<Name>();
+
239  if (merge_map.size() != 0) {
+
240  merge_flags.reserve(rank_at_transpose);
+
241  real_names_before_merge.reserve(rank_at_transpose);
+
242  for (Rank index_after_merge = 0; index_after_merge < rank_after_merge; index_after_merge++) {
+
243  const auto& merged_name = names_after_merge[index_after_merge];
+
244  if (auto position = merge_map.find(merged_name); position != merge_map.end()) {
+
245  for (const auto& merging_name : position->second) {
+
246  real_names_before_merge.push_back(merging_name);
+
247  merge_flags.push_back(index_after_merge);
+
248  }
+
249  } else {
+
250  real_names_before_merge.push_back(merged_name);
+
251  merge_flags.push_back(index_after_merge);
+
252  }
+
253  }
+
254  } else {
+
255  merge_flags.reserve(rank_after_merge);
+
256  for (auto index_after_merge = 0; index_after_merge < rank_after_merge; index_after_merge++) {
+
257  merge_flags.push_back(index_after_merge);
+
258  }
+
259  }
+
260  const auto& names_before_merge = merge_map.size() != 0 ? real_names_before_merge : names_after_merge;
+
261 
+
262  if constexpr (debug_mode) {
+
263  if (rank_at_transpose != names_before_merge.size()) {
+
264  detail::error("Tensor to transpose with Different Rank");
+
265  }
+
266  }
+
267  // what left: edge for after_transpose, before_merge and after merge
+
268 
+
269  // create plan of two way for transpose
+
270  auto plan_source_to_destination = pmr::vector<Rank>(rank_at_transpose);
+
271  auto plan_destination_to_source = pmr::vector<Rank>(rank_at_transpose);
+
272 
+
273  // and edge after transpose
+
274  pmr::unordered_map<Name, Rank> name_after_split_to_index(unordered_parameter * rank_at_transpose);
+
275  for (Rank i = 0; i < rank_at_transpose; i++) {
+
276  name_after_split_to_index[names_after_split[i]] = i;
+
277  }
+
278 
+
279  auto edges_after_transpose = pmr::vector<EdgePointer<Symmetry>>();
+
280  edges_after_transpose.reserve(rank_at_transpose);
+
281  for (auto index_before_merge = 0; index_before_merge < rank_at_transpose; index_before_merge++) {
+
282  auto found = name_after_split_to_index.find(names_before_merge[index_before_merge]);
+
283  if constexpr (debug_mode) {
+
284  if (found == name_after_split_to_index.end()) {
+
285  detail::error("Tensor to transpose with incompatible name list");
+
286  }
+
287  }
+
288  auto index_after_split = plan_destination_to_source[index_before_merge] = found->second;
+
289  plan_source_to_destination[index_after_split] = index_before_merge;
+
290  edges_after_transpose.push_back(edges_before_transpose[index_after_split]);
+
291  }
+
292 
+
293  // what plan left: merge offset, reversed flag
+
294 
+
295  // dealing with edge before merge and after merge together
+
296  // prepare edge_before_merge, copy it to record reverse arrow for fermi symmetry.
+
297  auto fermi_edges_before_merge = pmr::vector<EdgePointer<Symmetry>>();
+
298  if constexpr (is_fermi) {
+
299  if (merge_map.size() != 0) {
+
300  fermi_edges_before_merge.reserve(rank_at_transpose);
+
301  for (const auto& edge : edges_after_transpose) {
+
302  fermi_edges_before_merge.push_back(edge);
+
303  }
+
304  }
+
305  }
+
306  auto& edges_before_merge = is_fermi && merge_map.size() != 0 ? fermi_edges_before_merge : edges_after_transpose;
+
307 
+
308  // the last 3.5 things
+
309  // reversed_after_transpose_flag, merge_offset, edge_after_merge, and half edge_before_merge
+
310  auto reversed_after_transpose_flags = pmr::vector<bool>();
+
311  auto result_edges = std::vector<Edge<Symmetry>>();
+
312  auto merge_offsets_pool = pmr::vector<pmr::vector<std::tuple<Symmetry, Size, Size, Size, Size>>>();
+
313  auto merge_offsets = pmr::vector<std::optional<mdspan<std::tuple<Symmetry, Size, Size, Size, Size>, pmr::vector<Size>>>>();
+
314  if (merge_map.size() != 0) {
+
315  if constexpr (is_fermi) {
+
316  reversed_after_transpose_flags.reserve(rank_at_transpose);
+
317  }
+
318  result_edges.reserve(rank_after_merge);
+
319  merge_offsets_pool.reserve(rank_after_merge);
+
320  merge_offsets.reserve(rank_after_merge);
+
321  for (Rank index_after_merge = 0, start_of_merge = 0, end_of_merge = 0; index_after_merge < rank_after_merge; index_after_merge++) {
+
322  // start/end_of_merge :: index_at_transpose
+
323  // [start, end) need be merged into one edge
+
324  auto this_merge_shape = pmr::vector<Size>();
+
325  this_merge_shape.reserve(rank_at_transpose); // larger than needed
+
326  while (end_of_merge < rank_at_transpose && merge_flags[end_of_merge] == index_after_merge) {
+
327  this_merge_shape.push_back(edges_before_merge[end_of_merge].segments_size());
+
328  end_of_merge++;
+
329  }
+
330  // arrow begin
+
331  Arrow arrow;
+
332  if constexpr (is_fermi) {
+
333  if (start_of_merge == end_of_merge) {
+
334  // empty merge, merge zero edge into one edge, it will generate [(Symmetry(), 1)]
+
335  // For Symmetry(), arrow is not important.
+
336  arrow = false;
+
337  } else {
+
338  // normal merge
+
339  arrow = edges_before_merge[start_of_merge].arrow();
+
340  }
+
341  for (auto this_index_before_merge = start_of_merge; this_index_before_merge < end_of_merge; this_index_before_merge++) {
+
342  auto& this_edge = edges_before_merge[this_index_before_merge];
+
343  if (arrow == this_edge.arrow()) {
+
344  reversed_after_transpose_flags.push_back(false);
+
345  } else {
+
346  this_edge.reverse_arrow();
+
347  reversed_after_transpose_flags.push_back(true);
+
348  }
+
349  }
+
350  }
+
351  // arrow end
+
352  if (end_of_merge != 1 + start_of_merge) {
+
353  // merge edge begin
+
354  // result edge and offset
+
355  const auto this_edges_before_merge = edges_before_merge.data() + start_of_merge;
+
356  auto& this_offset = merge_offsets.emplace_back(std::in_place, nullptr, std::move(this_merge_shape)).value();
+
357  auto& this_offset_pool =
+
358  merge_offsets_pool.emplace_back(this_offset.size(), std::tuple<Symmetry, Size, Size, Size, Size>{{}, 0, 1, 0, 0});
+
359  this_offset.set_data(this_offset_pool.data());
+
360  // sum symmetry
+
361  for (auto i = 0; i < this_offset.rank(); i++) {
+
362  Size self_size = this_offset.dimensions(i);
+
363  Size in_size = this_offset.leadings(i);
+
364  Size out_size = this_offset.size() == 0 ? 0 : this_offset.size() / (self_size * in_size);
+
365  for (Size x = 0; x < out_size; x++) {
+
366  auto offset_for_x = x;
+
367  for (Size y = 0; y < self_size; y++) {
+
368  const auto& [symmetry_here, dimension_here] = this_edges_before_merge[i].segments(y);
+
369  auto offset_for_y = offset_for_x * self_size + y;
+
370  for (Size z = 0; z < in_size; z++) {
+
371  auto offset_for_z = offset_for_y * in_size + z;
+
372  std::get<0>(this_offset_pool[offset_for_z]) += symmetry_here;
+
373  std::get<2>(this_offset_pool[offset_for_z]) *= dimension_here;
+
374  std::get<4>(this_offset_pool[offset_for_z]) += symmetry_here.parity();
+
375  }
+
376  }
+
377  }
+
378  }
+
379  // accumulate offset
+
380  auto merged_edge = std::vector<std::pair<Symmetry, Size>>();
+
381  for (auto& [symmetry, position, size, offset, parity] : this_offset_pool) {
+
382  auto found =
+
383  std::find_if(merged_edge.begin(), merged_edge.end(), [&sym = symmetry](const auto& pair) { return pair.first == sym; });
+
384  std::pair<Symmetry, Size>* pointer;
+
385  if (found == merged_edge.end()) {
+
386  pointer = &merged_edge.emplace_back(symmetry, 0);
+
387  } else {
+
388  pointer = &*found;
+
389  }
+
390  position = pointer - merged_edge.data();
+
391  offset = pointer->second;
+
392  pointer->second += size;
+
393  }
+
394  result_edges.emplace_back(std::move(merged_edge), arrow);
+
395  } else {
+
396  // not merge for this edge
+
397  const auto& target_edge = edges_before_merge[start_of_merge];
+
398  result_edges.emplace_back(target_edge.segments(), target_edge.arrow());
+
399  merge_offsets.emplace_back();
+
400  // it will check later so this_offset it not calculated
+
401  }
+
402  // merge edge end
+
403  start_of_merge = end_of_merge;
+
404  }
+
405  } else {
+
406  // no merge for all edge
+
407  if constexpr (is_fermi) {
+
408  reversed_after_transpose_flags = pmr::vector<bool>(rank_at_transpose, false);
+
409  // no merge is no reverse before merge
+
410  }
+
411  result_edges.reserve(rank_after_merge);
+
412  for (auto index_after_merge = 0; index_after_merge < rank_after_merge; index_after_merge++) {
+
413  const auto& edge = edges_before_merge[index_after_merge];
+
414  result_edges.emplace_back(edge.segments(), edge.arrow());
+
415  // it will check if no merge, so it will not use offset, so offset is not calculated
+
416  // even emplace_back is not needed
+
417  }
+
418  }
+
419 
+
420  // put res_edge into res
+
421  auto result = Tensor<ScalarType, Symmetry, Name>(std::move(new_names), std::move(result_edges));
+
422  const auto& edges_after_merge = result.edges();
+
423 
+
424  // The previous one is moved.
+
425  const auto& names_after_merge_new = result.names();
+
426  const auto& names_before_merge_new = merge_map.size() != 0 ? real_names_before_merge : names_after_merge_new;
+
427 
+
428  // marks:
+
429  // split_flag_mark
+
430  // reversed_before_transpose_flag_mark
+
431  // reversed_after_transpose_flag_mark
+
432  // merge_flag_mark
+
433 
+
434  // marks
+
435  auto split_flags_mark = pmr::vector<bool>();
+
436  auto reversed_before_transpose_flags_mark = pmr::vector<bool>();
+
437  auto reversed_after_transpose_flags_mark = pmr::vector<bool>();
+
438  auto merge_flags_mark = pmr::vector<bool>();
+
439  if constexpr (is_fermi) {
+
440  split_flags_mark.reserve(rank_before_split);
+
441  reversed_before_transpose_flags_mark.reserve(rank_at_transpose);
+
442  reversed_after_transpose_flags_mark.reserve(rank_at_transpose);
+
443  merge_flags_mark.reserve(rank_after_merge);
+
444  // true => apply parity
+
445  if (apply_parity) {
+
446  // default apply, so apply == not in exclude, namely, find==end
+
447  for (auto i = 0; i < rank_before_split; i++) {
+
448  split_flags_mark.push_back(parity_exclude_names_split.find(names_before_split[i]) == parity_exclude_names_split.end());
+
449  }
+
450  for (auto i = 0; i < rank_at_transpose; i++) {
+
451  reversed_before_transpose_flags_mark.push_back(
+
452  parity_exclude_names_reversed_before_transpose.find(names_after_split[i]) ==
+
453  parity_exclude_names_reversed_before_transpose.end()
+
454  );
+
455  }
+
456  for (auto i = 0; i < rank_at_transpose; i++) {
+
457  reversed_after_transpose_flags_mark.push_back(
+
458  parity_exclude_names_reversed_after_transpose.find(names_before_merge_new[i]) ==
+
459  parity_exclude_names_reversed_after_transpose.end()
+
460  );
+
461  }
+
462  for (auto i = 0; i < rank_after_merge; i++) {
+
463  merge_flags_mark.push_back(parity_exclude_names_merge.find(names_after_merge_new[i]) == parity_exclude_names_merge.end());
+
464  }
+
465  } else {
+
466  for (auto i = 0; i < rank_before_split; i++) {
+
467  split_flags_mark.push_back(parity_exclude_names_split.find(names_before_split[i]) != parity_exclude_names_split.end());
+
468  }
+
469  for (auto i = 0; i < rank_at_transpose; i++) {
+
470  reversed_before_transpose_flags_mark.push_back(
+
471  parity_exclude_names_reversed_before_transpose.find(names_after_split[i]) !=
+
472  parity_exclude_names_reversed_before_transpose.end()
+
473  );
+
474  }
+
475  for (auto i = 0; i < rank_at_transpose; i++) {
+
476  reversed_after_transpose_flags_mark.push_back(
+
477  parity_exclude_names_reversed_after_transpose.find(names_before_merge_new[i]) !=
+
478  parity_exclude_names_reversed_after_transpose.end()
+
479  );
+
480  }
+
481  for (auto i = 0; i < rank_after_merge; i++) {
+
482  merge_flags_mark.push_back(parity_exclude_names_merge.find(names_after_merge_new[i]) != parity_exclude_names_merge.end());
+
483  }
+
484  }
+
485  }
+
486 
+
487  // Main loop
+
488  auto edges_before_merge_shape = pmr::vector<Size>();
+
489  edges_before_merge_shape.reserve(rank_at_transpose);
+
490  for (const auto& edge : edges_before_merge) {
+
491  edges_before_merge_shape.push_back(edge.segments_size());
+
492  }
+
493  // the total symmetry and total_parity
+
494  auto main_loop = mdspan<std::pair<Symmetry, bool>, pmr::vector<Size>>(nullptr, std::move(edges_before_merge_shape));
+
495  auto main_loop_pool = pmr::vector<std::pair<Symmetry, bool>>(main_loop.size());
+
496  main_loop.set_data(main_loop_pool.data());
+
497  for (auto index_before_merge = 0; index_before_merge < main_loop.rank(); index_before_merge++) {
+
498  bool reversed_flag;
+
499  if constexpr (is_fermi) {
+
500  Rank index_after_split = plan_destination_to_source[index_before_merge];
+
501  reversed_flag = (reversed_after_transpose_flags[index_before_merge] && reversed_after_transpose_flags_mark[index_before_merge]) ^
+
502  (reversed_before_transpose_flags[index_after_split] && reversed_before_transpose_flags_mark[index_after_split]);
+
503  }
+
504  Size self_size = main_loop.dimensions(index_before_merge);
+
505  Size in_size = main_loop.leadings(index_before_merge);
+
506  Size out_size = main_loop.size() == 0 ? 0 : main_loop.size() / (self_size * in_size);
+
507  for (Size x = 0; x < out_size; x++) {
+
508  auto offset_for_x = x;
+
509  for (Size y = 0; y < self_size; y++) {
+
510  const auto& [symmetry_here, dimension_here] = edges_before_merge[index_before_merge].segments(y);
+
511  auto parity_here = symmetry_here.parity() && reversed_flag;
+
512  auto offset_for_y = offset_for_x * self_size + y;
+
513  for (Size z = 0; z < in_size; z++) {
+
514  auto offset_for_z = offset_for_y * in_size + z;
+
515  main_loop_pool[offset_for_z].first += symmetry_here;
+
516  main_loop_pool[offset_for_z].second ^= parity_here;
+
517  }
+
518  }
+
519  }
+
520  }
+
521  if constexpr (is_fermi) {
+
522  for (auto index1_before_merge = 0; index1_before_merge < main_loop.rank(); index1_before_merge++) {
+
523  for (auto index2_before_merge = index1_before_merge + 1; index2_before_merge < main_loop.rank(); index2_before_merge++) {
+
524  if (plan_destination_to_source[index1_before_merge] > plan_destination_to_source[index2_before_merge]) {
+
525  Size self1_size = main_loop.dimensions(index1_before_merge);
+
526  Size self2_size = main_loop.dimensions(index2_before_merge);
+
527  Size self1_leading = main_loop.leadings(index1_before_merge);
+
528  Size self2_leading = main_loop.leadings(index2_before_merge);
+
529  Size in_size = self2_leading;
+
530  Size mid_size = self1_leading == 0 ? 0 : self1_leading / (self2_size * self2_leading);
+
531  Size out_size = main_loop.size() == 0 ? 0 : main_loop.size() / (self1_size * self1_leading);
+
532  for (Size a = 0; a < out_size; a++) {
+
533  auto offset_for_a = a;
+
534  for (Size b = 0; b < self1_size; b++) {
+
535  if (edges_before_merge[index1_before_merge].segments(b).first.parity()) {
+
536  auto offset_for_b = (offset_for_a * self1_size) + b;
+
537  for (Size c = 0; c < mid_size; c++) {
+
538  auto offset_for_c = (offset_for_b * mid_size) + c;
+
539  for (Size d = 0; d < self2_size; d++) {
+
540  if (edges_before_merge[index2_before_merge].segments(d).first.parity()) {
+
541  auto offset_for_d = (offset_for_c * self2_size) + d;
+
542  for (Size e = 0; e < in_size; e++) {
+
543  auto offset_for_e = (offset_for_d * in_size) + e;
+
544  main_loop_pool[offset_for_e].second ^= true;
+
545  }
+
546  }
+
547  }
+
548  }
+
549  }
+
550  }
+
551  }
+
552  }
+
553  }
+
554  }
+
555  }
+
556  // reverse and transpose pairty in the main_loop value
+
557  // merge split parity in the offsets pool
+
558  for (auto it = main_loop.begin(); it.valid; ++it) {
+
559  if (it->first != Symmetry()) {
+
560  continue;
+
561  }
+
562  auto total_parity = it->second;
+
563  const auto positions_before_merge = it.indices;
+
564 
+
565  auto positions_after_split = pmr::vector<Size>(rank_at_transpose);
+
566  auto dimensions_before_merge = pmr::vector<Size>(rank_at_transpose);
+
567  auto dimensions_after_split = pmr::vector<Size>(rank_at_transpose);
+
568  for (auto index_before_merge = 0; index_before_merge < rank_at_transpose; index_before_merge++) {
+
569  auto position = positions_before_merge[index_before_merge];
+
570  auto index_after_split = plan_destination_to_source[index_before_merge];
+
571  positions_after_split[index_after_split] = position;
+
572 
+
573  const auto& [symmetry, dimension] = edges_before_merge[index_before_merge].segments(position);
+
574  dimensions_before_merge[index_before_merge] = dimension;
+
575  dimensions_after_split[index_after_split] = dimension;
+
576  }
+
577 
+
578  auto positions_after_merge = pmr::vector<Size>(rank_after_merge);
+
579  auto offsets_after_merge = pmr::vector<Size>(rank_after_merge);
+
580  for (auto index_after_merge = 0, index_before_merge = 0; index_after_merge < rank_after_merge; index_after_merge++) {
+
581  auto this_merge_begin_index_before_merge = index_before_merge;
+
582  while (index_before_merge < rank_at_transpose && merge_flags[index_before_merge] == index_after_merge) {
+
583  index_before_merge++;
+
584  }
+
585  if (index_before_merge != 1 + this_merge_begin_index_before_merge) {
+
586  // normal merge
+
587  const auto& [symmetry, position, size, offset, parity] =
+
588  merge_offsets[index_after_merge]->at(positions_before_merge.data() + this_merge_begin_index_before_merge);
+
589  positions_after_merge[index_after_merge] = position;
+
590  offsets_after_merge[index_after_merge] = offset;
+
591  total_parity ^= ((parity & 2) != 0) && merge_flags_mark[index_after_merge];
+
592  } else {
+
593  // trivial merge
+
594  positions_after_merge[index_after_merge] = positions_before_merge[this_merge_begin_index_before_merge];
+
595  offsets_after_merge[index_after_merge] = 0;
+
596  }
+
597  }
+
598 
+
599  auto positions_before_split = pmr::vector<Size>(rank_before_split);
+
600  auto offsets_before_split = pmr::vector<Size>(rank_before_split);
+
601  for (auto index_before_split = 0, index_after_split = 0; index_before_split < rank_before_split; index_before_split++) {
+
602  auto this_split_begin_index_after_split = index_after_split;
+
603  while (index_after_split < rank_at_transpose && split_flags[index_after_split] == index_before_split) {
+
604  index_after_split++;
+
605  }
+
606  if (index_after_split != 1 + this_split_begin_index_after_split) {
+
607  // normal split
+
608  const auto& [symmetry, position, size, offset, parity] =
+
609  split_offsets[index_before_split]->at(positions_after_split.data() + this_split_begin_index_after_split);
+
610  positions_before_split[index_before_split] = position;
+
611  offsets_before_split[index_before_split] = offset;
+
612  total_parity ^= ((parity & 2) != 0) && split_flags_mark[index_before_split];
+
613  } else {
+
614  // trivial split
+
615  positions_before_split[index_before_split] = positions_after_split[this_split_begin_index_after_split];
+
616  offsets_before_split[index_before_split] = 0;
+
617  }
+
618  }
+
619 
+
620  auto real_positions_before_cut = pmr::vector<Size>();
+
621  if (edges_and_symmetries_to_cut_before_all.size() != 0) {
+
622  real_positions_before_cut.resize(rank_before_split);
+
623  for (auto index_before_split = 0; index_before_split < rank_before_split; index_before_split++) {
+
624  auto symmetry = edges_before_split[index_before_split].segments(positions_before_split[index_before_split]).first;
+
625  const auto& edge = edges(index_before_split);
+
626  real_positions_before_cut[index_before_split] = edge.find_by_symmetry(symmetry) - edge.segments().begin();
+
627  }
+
628  }
+
629  const auto& positions_before_cut =
+
630  edges_and_symmetries_to_cut_before_all.size() != 0 ? real_positions_before_cut : positions_before_split;
+
631 
+
632  auto leadings_after_merge = pmr::vector<Size>(rank_after_merge);
+
633  for (auto index_after_merge = rank_after_merge; index_after_merge-- > 0;) {
+
634  if (index_after_merge == rank_after_merge - 1) {
+
635  leadings_after_merge[index_after_merge] = 1;
+
636  } else {
+
637  leadings_after_merge[index_after_merge] =
+
638  leadings_after_merge[index_after_merge + 1] *
+
639  edges_after_merge[index_after_merge + 1].segments(positions_after_merge[index_after_merge + 1]).second;
+
640  }
+
641  }
+
642  auto leadings_before_merge = pmr::vector<Size>(rank_at_transpose);
+
643  for (auto index_before_merge = rank_at_transpose; index_before_merge-- > 0;) {
+
644  if (index_before_merge != rank_at_transpose - 1 && merge_flags[index_before_merge] == merge_flags[index_before_merge + 1]) {
+
645  leadings_before_merge[index_before_merge] =
+
646  leadings_before_merge[index_before_merge + 1] * dimensions_before_merge[index_before_merge + 1];
+
647  } else {
+
648  leadings_before_merge[index_before_merge] = leadings_after_merge[merge_flags[index_before_merge]];
+
649  }
+
650  }
+
651  auto leadings_before_split = pmr::vector<Size>(rank_before_split);
+
652  for (auto index_before_split = rank_before_split; index_before_split-- > 0;) {
+
653  if (index_before_split == rank_before_split - 1) {
+
654  leadings_before_split[index_before_split] = 1;
+
655  } else {
+
656  leadings_before_split[index_before_split] =
+
657  leadings_before_split[index_before_split + 1] *
+
658  edges(index_before_split + 1).segments(positions_before_cut[index_before_split + 1]).second;
+
659  // Use the original dimension before cut, because it is about leading.
+
660  }
+
661  }
+
662  auto leadings_after_split = pmr::vector<Size>(rank_at_transpose);
+
663  for (auto index_after_split = rank_at_transpose; index_after_split-- > 0;) {
+
664  if (index_after_split != rank_at_transpose - 1 && split_flags[index_after_split] == split_flags[index_after_split + 1]) {
+
665  leadings_after_split[index_after_split] =
+
666  leadings_after_split[index_after_split + 1] * dimensions_after_split[index_after_split + 1];
+
667  } else {
+
668  leadings_after_split[index_after_split] = leadings_before_split[split_flags[index_after_split]];
+
669  }
+
670  }
+
671 
+
672  auto source_span = mdspan<const ScalarType, pmr::vector<Size>>(
+
673  // The whole segment of some symmetry maybe removed directly, so positions is not usable.
+
674  &blocks().at(positions_before_cut).value().at(offsets_before_split),
+
675  std::move(dimensions_after_split),
+
676  std::move(leadings_after_split)
+
677  );
+
678  auto destination_span = mdspan<ScalarType, pmr::vector<Size>>(
+
679  &result.blocks().at(positions_after_merge).value().at(offsets_after_merge),
+
680  std::move(dimensions_before_merge),
+
681  std::move(leadings_before_merge)
+
682  );
+
683 
+
684  if (total_parity) {
+
685  mdspan_transform(source_span.transpose(plan_destination_to_source), destination_span, [](const auto& x) { return -x; });
+
686  } else {
+
687  mdspan_transform(source_span.transpose(plan_destination_to_source), destination_span, [](const auto& x) { return x; });
+
688  }
+
689  }
+
690 
+
691  return result;
+
692  }
+
693 } // namespace TAT
+
694 #endif
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
constexpr bool debug_mode
Debug flag.
Definition: common_variable.hpp:50
+
bool Arrow
Fermi arrow type.
Definition: common_variable.hpp:166
+
+
+ + + + diff --git a/exponential_8hpp.html b/exponential_8hpp.html new file mode 100644 index 000000000..f3844647a --- /dev/null +++ b/exponential_8hpp.html @@ -0,0 +1,177 @@ + + + + + + + +TAT: include/TAT/implement/exponential.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
exponential.hpp File Reference
+
+
+ +

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <algorithm>
+#include <cmath>
+#include "../structure/tensor.hpp"
+#include "../utility/allocator.hpp"
+#include "../utility/timer.hpp"
+#include "contract.hpp"
+
+

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + + + + + + + + + + + + + +

+Functions

+int sgesv_ (const int *n, const int *nrhs, float *A, const int *lda, int *ipiv, float *B, const int *ldb, int *info)
 
+int dgesv_ (const int *n, const int *nrhs, double *A, const int *lda, int *ipiv, double *B, const int *ldb, int *info)
 
+int cgesv_ (const int *n, const int *nrhs, std::complex< float > *A, const int *lda, int *ipiv, std::complex< float > *B, const int *ldb, int *info)
 
+int zgesv_ (const int *n, const int *nrhs, std::complex< double > *A, const int *lda, int *ipiv, std::complex< double > *B, const int *ldb, int *info)
 
+template<typename ScalarType >
void TAT::detail::linear_solve (int n, ScalarType *A, int nrhs, ScalarType *B, ScalarType *X)
 
+template<typename ScalarType >
auto TAT::detail::max_of_abs (const ScalarType *data, Size n)
 
+template<typename ScalarType >
void TAT::detail::initialize_identity_matrix (ScalarType *data, Size n)
 
+template<typename ScalarType >
void TAT::detail::matrix_exponential (Size n, ScalarType *A, ScalarType *F, int q)
 
+ + + + + + + + + + + + +

+Variables

+template<typename ScalarType >
constexpr auto TAT::detail::gesv = nullptr
 
+template<>
constexpr auto TAT::detail::gesv< float > = sgesv_
 
+template<>
constexpr auto TAT::detail::gesv< double > = dgesv_
 
+timer TAT::exponential_guard ("exponential")
 
+

Detailed Description

+

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/exponential_8hpp.js b/exponential_8hpp.js new file mode 100644 index 000000000..49dd2113d --- /dev/null +++ b/exponential_8hpp.js @@ -0,0 +1,16 @@ +var exponential_8hpp = +[ + [ "TAT_EXPONENTIAL_HPP", "exponential_8hpp.html#a2a86c397ec0496a99d5e5d15c63b357c", null ], + [ "cgesv_", "exponential_8hpp.html#aed9ed3bd17ab17ea2393c6eb85df83ff", null ], + [ "dgesv_", "exponential_8hpp.html#ad74d7f23b486fb6f1d40d6f8b7f05816", null ], + [ "initialize_identity_matrix", "exponential_8hpp.html#a744b2a122ec8bd1fab236022770475e3", null ], + [ "linear_solve", "exponential_8hpp.html#a7809e8417610a6eb443f97246ad16720", null ], + [ "matrix_exponential", "exponential_8hpp.html#a9e1e3cfa5decdb1089d29446985cc2c2", null ], + [ "max_of_abs", "exponential_8hpp.html#af04b0be923236b7a12594b295be1e5c8", null ], + [ "sgesv_", "exponential_8hpp.html#adfa0a542ef651e881f498f986474fd52", null ], + [ "zgesv_", "exponential_8hpp.html#a765565d0dc996f231611dea42689421a", null ], + [ "exponential_guard", "exponential_8hpp.html#a635cad001bc619a9b4cbd587e16b0c48", null ], + [ "gesv", "exponential_8hpp.html#ac48c1370efd4e33097d5c1f26624baa8", null ], + [ "gesv< double >", "exponential_8hpp.html#af9bac1385ace56ebe922c0f133859efa", null ], + [ "gesv< float >", "exponential_8hpp.html#a192b8899b53418bddaa72aa5637ad774", null ] +]; \ No newline at end of file diff --git a/exponential_8hpp_source.html b/exponential_8hpp_source.html new file mode 100644 index 000000000..7e80faba7 --- /dev/null +++ b/exponential_8hpp_source.html @@ -0,0 +1,365 @@ + + + + + + + +TAT: include/TAT/implement/exponential.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
exponential.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_EXPONENTIAL_HPP
+
22 #define TAT_EXPONENTIAL_HPP
+
23 
+
24 #include <algorithm>
+
25 #include <cmath>
+
26 
+
27 #include "../structure/tensor.hpp"
+
28 #include "../utility/allocator.hpp"
+
29 #include "../utility/timer.hpp"
+
30 #include "contract.hpp"
+
31 
+
32 extern "C" {
+
33  int sgesv_(const int* n, const int* nrhs, float* A, const int* lda, int* ipiv, float* B, const int* ldb, int* info);
+
34  int dgesv_(const int* n, const int* nrhs, double* A, const int* lda, int* ipiv, double* B, const int* ldb, int* info);
+
35  int cgesv_(const int* n, const int* nrhs, std::complex<float>* A, const int* lda, int* ipiv, std::complex<float>* B, const int* ldb, int* info);
+
36  int zgesv_(const int* n, const int* nrhs, std::complex<double>* A, const int* lda, int* ipiv, std::complex<double>* B, const int* ldb, int* info);
+
37 }
+
38 
+
39 namespace TAT {
+
40  namespace detail {
+
41  template<typename ScalarType>
+
42  constexpr auto gesv = nullptr;
+
43  template<>
+
44  inline constexpr auto gesv<float> = sgesv_;
+
45  template<>
+
46  inline constexpr auto gesv<double> = dgesv_;
+
47  template<>
+
48  inline constexpr auto gesv<std::complex<float>> = cgesv_;
+
49  template<>
+
50  inline constexpr auto gesv<std::complex<double>> = zgesv_;
+
51 
+
52  template<typename ScalarType>
+
53  void linear_solve(int n, ScalarType* A, int nrhs, ScalarType* B, ScalarType* X) {
+
54  // AX=B
+
55  // A: n*n
+
56  // B: n*nrhs
+
57  no_initialize::pmr::vector<ScalarType> AT(n * n);
+
58  matrix_transpose<pmr::vector<Size>>(n, n, A, AT.data());
+
59  no_initialize::pmr::vector<ScalarType> BT(n * nrhs);
+
60  matrix_transpose<pmr::vector<Size>>(n, nrhs, B, BT.data());
+
61  no_initialize::pmr::vector<int> ipiv(n);
+
62  int result;
+
63  gesv<ScalarType>(&n, &nrhs, AT.data(), &n, ipiv.data(), BT.data(), &n, &result);
+
64  if (result != 0) {
+
65  detail::what_if_lapack_error("error in GESV");
+
66  }
+
67  matrix_transpose<pmr::vector<Size>>(nrhs, n, BT.data(), X);
+
68  }
+
69 
+
70  template<typename ScalarType>
+
71  auto max_of_abs(const ScalarType* data, Size n) {
+
72  real_scalar<ScalarType> result = 0;
+
73  for (Size i = 0; i < n * n; i++) {
+
74  auto here = std::abs(data[i]);
+
75  result = result < here ? here : result;
+
76  }
+
77  return result;
+
78  }
+
79 
+
80  template<typename ScalarType>
+
81  void initialize_identity_matrix(ScalarType* data, Size n) {
+
82  for (Size i = 0; i < n - 1; i++) {
+
83  *(data++) = 1;
+
84  for (Size j = 0; j < n; j++) {
+
85  *(data++) = 0;
+
86  }
+
87  }
+
88  *data = 1;
+
89  }
+
90 
+
91  template<typename ScalarType>
+
92  void matrix_exponential(Size n, ScalarType* A, ScalarType* F, int q) {
+
93  int int_n = n;
+
94  // j = max(0, 1+floor(log2(|A|_inf)))
+
95  auto j = std::max(0, 1 + int(std::log2(max_of_abs(A, n))));
+
96  // A = A/2^j
+
97  ScalarType parameter = ScalarType(1) / ScalarType(1 << j);
+
98  for (Size i = 0; i < n * n; i++) {
+
99  A[i] *= parameter;
+
100  }
+
101  // D=I, N=I, X=I, c=1
+
102  no_initialize::pmr::vector<ScalarType> D(n * n);
+
103  initialize_identity_matrix(D.data(), n);
+
104  no_initialize::pmr::vector<ScalarType> N(n * n);
+
105  initialize_identity_matrix(N.data(), n);
+
106  no_initialize::pmr::vector<ScalarType> X1(n * n);
+
107  initialize_identity_matrix(X1.data(), n);
+
108  no_initialize::pmr::vector<ScalarType> X2(n * n);
+
109  ScalarType c = 1;
+
110  // for k=1:q
+
111  const ScalarType alpha = 1;
+
112  const ScalarType beta = 0;
+
113  for (auto k = 1; k <= q; k++) {
+
114  // c = (c*(q-k+1))/((2*q-k+1)*k)
+
115  c = (c * ScalarType(q - k + 1)) / ScalarType((2 * q - k + 1) * k);
+
116  // X = A@X, N=N+c*X, D=D+(-1)^k*c*X
+
117  auto& X_old = k % 2 == 1 ? X1 : X2;
+
118  auto& X_new = k % 2 == 0 ? X1 : X2;
+
119  // new = A @ old
+
120  // new.T = old.T @ A.T
+
121  detail::gemm<ScalarType>("N", "N", &int_n, &int_n, &int_n, &alpha, X_old.data(), &int_n, A, &int_n, &beta, X_new.data(), &int_n);
+
122  ScalarType d = k % 2 == 0 ? c : -c;
+
123  for (Size i = 0; i < n * n; i++) {
+
124  auto x = X_new[i];
+
125  N[i] += c * x;
+
126  D[i] += d * x;
+
127  }
+
128  }
+
129  // solve D@F=N for F
+
130  no_initialize::pmr::vector<ScalarType> F1(n * n);
+
131  no_initialize::pmr::vector<ScalarType> F2(n * n);
+
132  auto* R = j == 0 ? F : F1.data();
+
133  // D@R=N
+
134  linear_solve<ScalarType>(n, D.data(), n, N.data(), R);
+
135  // for k=1:j
+
136  for (auto k = 1; k <= j; k++) {
+
137  // F = F@F
+
138  const auto* F_old = k % 2 == 1 ? F1.data() : F2.data();
+
139  auto* F_new = k == j ? F : k % 2 == 0 ? F1.data() : F2.data();
+
140  // new = old * old
+
141  // new.T = old.T * old.T
+
142  detail::gemm<ScalarType>("N", "N", &int_n, &int_n, &int_n, &alpha, F_old, &int_n, F_old, &int_n, &beta, F_new, &int_n);
+
143  }
+
144  }
+
145  } // namespace detail
+
146 
+
147  inline timer exponential_guard("exponential");
+
148 
+
149  template<typename ScalarType, typename Symmetry, typename Name>
+
150  Tensor<ScalarType, Symmetry, Name>
+
151  Tensor<ScalarType, Symmetry, Name>::exponential(const std::unordered_set<std::pair<Name, Name>>& pairs, int step) const {
+
152  auto pmr_guard = scope_resource(default_buffer_size);
+
153  auto timer_guard = exponential_guard();
+
154 
+
155  Rank half_rank = rank() / 2;
+
156  // reverse -> merge -> exp -> split -> reverse
+
157 
+
158  // split map and merge map
+
159  auto merge_map = pmr::unordered_map<Name, pmr::vector<Name>>(unordered_parameter * 2);
+
160  auto& merge_1 = merge_map[InternalName<Name>::Exp_1];
+
161  merge_1.reserve(half_rank);
+
162  auto& merge_2 = merge_map[InternalName<Name>::Exp_2];
+
163  merge_2.reserve(half_rank);
+
164  auto split_map_result = pmr::unordered_map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry>>>>(unordered_parameter * 2);
+
165  auto& split_1 = split_map_result[InternalName<Name>::Exp_1];
+
166  split_1.reserve(half_rank);
+
167  auto& split_2 = split_map_result[InternalName<Name>::Exp_2];
+
168  split_2.reserve(half_rank);
+
169 
+
170  // split result name
+
171  auto result_names = std::vector<Name>();
+
172  result_names.reserve(rank());
+
173 
+
174  // apply merge/split flag
+
175  // apply reverse flag
+
176  // reverse set
+
177  auto apply_reverse_parity_names = pmr::unordered_set<Name>(unordered_parameter * rank());
+
178  auto reverse_names = pmr::unordered_set<Name>(unordered_parameter * rank());
+
179  // merged edge arrow is (false true)
+
180 
+
181  auto valid_indices = pmr::vector<bool>(rank(), true);
+
182  for (Rank i = rank(); i-- > 0;) {
+
183  if (valid_indices[i]) {
+
184  const auto& name_to_found = names(i);
+
185  const Name* name_correspond = nullptr;
+
186  bool this_former = false;
+
187  for (const auto& [name_1, name_2] : pairs) {
+
188  if (name_1 == name_to_found) {
+
189  name_correspond = &name_2;
+
190  this_former = true;
+
191  break;
+
192  }
+
193  if (name_2 == name_to_found) {
+
194  name_correspond = &name_1;
+
195  this_former = false;
+
196  break;
+
197  }
+
198  }
+
199  auto index_correspond = rank_by_name(*name_correspond);
+
200  valid_indices[index_correspond] = false;
+
201 
+
202  const auto& name_1 = this_former ? name_to_found : *name_correspond;
+
203  const auto& index_1 = this_former ? i : index_correspond;
+
204  const auto& name_2 = this_former ? *name_correspond : name_to_found;
+
205  const auto& index_2 = this_former ? index_correspond : i;
+
206 
+
207  merge_1.push_back(name_1);
+
208  merge_2.push_back(name_2);
+
209  split_1.push_back({name_1, {edges(index_1).segments()}});
+
210  split_2.push_back({name_2, {edges(index_2).segments()}});
+
211  if constexpr (debug_mode) {
+
212  if (edges(index_1).conjugate() != edges(index_2)) {
+
213  detail::error("Incompatible edges in exponential");
+
214  }
+
215  }
+
216  if constexpr (Symmetry::is_fermi_symmetry) {
+
217  // reverse flag and reverse set
+
218  if (edges(index_1).arrow() != false) {
+
219  reverse_names.insert(name_1);
+
220  reverse_names.insert(name_2);
+
221  apply_reverse_parity_names.insert(name_2); // only apply to edge 2
+
222  }
+
223  }
+
224  }
+
225  }
+
226  std::reverse(merge_1.begin(), merge_1.end());
+
227  std::reverse(merge_2.begin(), merge_2.end());
+
228  std::reverse(split_1.begin(), split_1.end());
+
229  std::reverse(split_2.begin(), split_2.end());
+
230 
+
231  for (const auto& name : merge_1) {
+
232  result_names.push_back(name);
+
233  }
+
234  for (const auto& name : merge_2) {
+
235  result_names.push_back(name);
+
236  }
+
237 
+
238  auto tensor_merged = edge_operator_implement(
+
239  {},
+
240  reverse_names,
+
241  merge_map,
+ +
243  false,
+
244  {},
+
245  apply_reverse_parity_names,
+
246  {},
+
247  pmr::unordered_set<Name>{InternalName<Name>::Exp_2},
+
248  {}
+
249  );
+
250  auto result = tensor_merged.same_shape();
+
251 
+
252  for (auto i = 0; i < tensor_merged.blocks().size(); i++) {
+
253  if (!tensor_merged.blocks().data()[i].has_value()) {
+
254  continue;
+
255  }
+
256  auto& data_source = tensor_merged.blocks().data()[i].value();
+
257  auto& data_destination = result.blocks().data()[i].value();
+
258  auto n = data_destination.dimensions(0);
+
259  detail::matrix_exponential(n, data_source.data(), data_destination.data(), step);
+
260  }
+
261  return result.edge_operator_implement(
+
262  split_map_result,
+
263  reverse_names,
+
264  {},
+
265  std::move(result_names),
+
266  false,
+
267  pmr::unordered_set<Name>{InternalName<Name>::Exp_2},
+
268  apply_reverse_parity_names,
+
269  {},
+
270  {},
+
271  {}
+
272  );
+
273  }
+
274 } // namespace TAT
+
275 #endif
+
Tensor< ScalarType, Symmetry, Name > exponential(const std::unordered_set< std::pair< Name, Name >> &pairs, int step=2) const
Get the tensor exponential.
Definition: exponential.hpp:151
+
Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
constexpr bool debug_mode
Debug flag.
Definition: common_variable.hpp:50
+
For every Name type, some internal name is needed.
Definition: name.hpp:112
+
Definition: allocator.hpp:295
+
+
+ + + + diff --git a/files.html b/files.html new file mode 100644 index 000000000..cc5a1d21f --- /dev/null +++ b/files.html @@ -0,0 +1,135 @@ + + + + + + + +TAT: File List + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  include
  TAT
  implement
 clear_symmetry.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 conjugate.hppCopyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 contract.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 edge_operator.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 exponential.hppCopyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 identity.hppCopyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 qr.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 shrink_and_expand.hppCopyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 split_and_merge.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 svd.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 trace.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
  miscellaneous
 io.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 mpi.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 scalar.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
  structure
 core.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 edge.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 name.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 symmetry.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 tensor.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
  utility
 allocator.hppCopyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 common_variable.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 const_integral.hppCopyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 multidimension_span.hppCopyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 shared_ptr.hppCopyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 timer.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
 TAT.hppCopyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn
+
+
+
+ + + + diff --git a/files_dup.js b/files_dup.js new file mode 100644 index 000000000..f1749d909 --- /dev/null +++ b/files_dup.js @@ -0,0 +1,4 @@ +var files_dup = +[ + [ "include", "dir_d44c64559bbebec7f509842c48db8b23.html", "dir_d44c64559bbebec7f509842c48db8b23" ] +]; \ No newline at end of file diff --git a/folderclosed.png b/folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66 GIT binary patch literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA literal 0 HcmV?d00001 diff --git a/functions.html b/functions.html new file mode 100644 index 000000000..f9bb1276e --- /dev/null +++ b/functions.html @@ -0,0 +1,580 @@ + + + + + + + +TAT: Class Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- q -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+ + +

- z -

+
+
+ + + + diff --git a/functions_func.html b/functions_func.html new file mode 100644 index 000000000..cc63a2514 --- /dev/null +++ b/functions_func.html @@ -0,0 +1,580 @@ + + + + + + + +TAT: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- q -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+ + +

- z -

+
+
+ + + + diff --git a/hierarchy.html b/hierarchy.html new file mode 100644 index 000000000..23f60541a --- /dev/null +++ b/hierarchy.html @@ -0,0 +1,182 @@ + + + + + + + +TAT: Class Hierarchy + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Ctetragono.abstract_lattice.AbstractLatticeVirtualBondVirtual bond handler for abstract lattice
 Ctetragono.abstract_state.AbstractStateAbstract state, which is used to construct other type of state
 Ctetragono.abstract_lattice.AbstractLatticeThe abstract lattice
 Ctetragono.sampling_lattice.lattice.SamplingLatticeSquare lattice used for sampling
 Ctetragono.simple_update_lattice.SimpleUpdateLatticeThe lattice used to do simple update
 Ctetragono.exact_state.ExactStateState for exact diagonalization
 Ctetragono.abstract_state.AbstractStateHamiltonianHamiltonian handler for abstract state
 Ctetragono.abstract_state.AbstractStatePhysicsEdgePhysics edge handler for abstract state
 Cstd::array< T >STL class
 CTAT::empty_list< T >
 Ccmd.Cmd
 Ctetragono.shell.AutoCmd
 Ctetragono.shell.TetragonoCommandApp
 Ctetragono.shell.TetragonoScriptApp
 Ctetragono.shell.Config
 Ctetragono.sampling_lattice.lattice.ConfigurationPoolConfiguration pool for one sampling lattice and multiple configuration
 Clazy.CopyA helper class used to copy entire lazy node graph
 CTAT::Core< ScalarType, Symmetry >Contains nearly all tensor data except edge name, include edge shape and tensor content
 CTAT::CutUsed to describle how to cut when doing svd to a tensor
 Ctetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries
 Cedge_arrow_t
 CTAT::Edge< Symmetry, is_pointer >The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment
 CTAT::edge_bose_arrow_t
 CTAT::edge_fermi_arrow_t
 CTAT::edge_segments_t< Symmetry, _is_pointer >
 CTAT::edge_segments_t< Symmetry, false >
 CTAT::Edge< Symmetry, is_pointer >The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment
 Ctetragono.common_tensor.tensor_toolkit.FakeEdge
 CTAT::FastNameFastName as tensor edge name
 CTAT::fermi< T >
 Cstd::hash< pair< Name, Name > >
 Cstd::hash< TAT::FastName >
 Cstd::hash< TAT::Symmetry< T... > >
 CTAT::InternalName< Name >For every Name type, some internal name is needed
 CTAT::mdspan< T, U >::iterator_general< is_const >
 CTAT::mdspan< T, U >
 CTAT::mdspan< std::optional< TAT::mdspan< scalar_t > > >
 Cmetaclass
 Ctetragono.shell.AutoCmd
 CTAT::mpi_one_output_streamWrapper for ostream, the stream will only output in the rank which is specified when creating
 CTAT::mpi_rank_output_streamWrapper for ostream, the stream will output the rank which is psecified when creating
 CTAT::mpi_tMPI handler type
 CTAT::NameTraits< Name >Name type also need input and output method
 CTAT::NameTraits< FastName >
 CTAT::NameTraits< std::string >
 CTAT::NoCut
 Clazy.NodeLazy node type, used to build a lazy evaluation graph, the value of it may be reset and when trying to get value of it, the needed node will be calculated automatically
 Ctetragono.sampling_lattice.observer.ObserverHelper type for Observing the sampling lattice
 CTAT::Tensor< ScalarType, Symmetry, Name >::qr_resultQR result type
 CTAT::RelativeCut
 CTAT::RemainCut
 CTAT::remove_cvref< T >
 Ctetragono.sampling_lattice.sampling.SamplingHelper type for run sampling for sampling lattice
 Ctetragono.sampling_lattice.sampling.DirectSamplingDirect sampling
 Ctetragono.sampling_lattice.sampling.ErgodicSamplingErgodic sampling
 Ctetragono.sampling_lattice.sampling.SweepSamplingSweep sampling
 CTAT::scope_resource
 Ctetragono.utility.SeedDiffer
 Ctetragono.utility.SignalHandler
 Ctetragono.simple_update_lattice.SimpleUpdateLatticeEnvironmentEnvironment handler for simple update lattice
 Ctetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries
 Ctetragono.sampling_lattice.lattice.ConfigurationConfiguration system for square sampling lattice
 CTAT::Tensor< ScalarType, Symmetry, Name >::svd_resultSVD result type
 Ctetragono.sampling_lattice.lattice.TailDictTreeA dict tree from the tail of list key
 CTAT::Tensor< ScalarType, Symmetry, Name >Tensor type
 CTAT::Tensor< ScalarType, TAT::Symmetry, Name >
 CTAT::TensorShape< ScalarType, Symmetry, Name >
 Ctetragono.auxiliaries.three_line_auxiliaries.ThreeLineAuxiliaries
 CTAT::timer
 CTAT::timer::timer_guard
 Cstd::tuple
 CTAT::Symmetry< T >General symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied
 Ctype
 Ctetragono.shell.AutoCmdMeta
 Ctetragono.shell.AutoCmd
 CTAT::type_identity< T >
 CTAT::UnixColorCodeA type control console color
 CTAT::Fs
 CTAT::overloaded< Fs >
+
+
+
+ + + + diff --git a/hierarchy.js b/hierarchy.js new file mode 100644 index 000000000..42977f6a6 --- /dev/null +++ b/hierarchy.js @@ -0,0 +1,97 @@ +var hierarchy = +[ + [ "tetragono.abstract_lattice.AbstractLatticeVirtualBond", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html", null ], + [ "tetragono.abstract_state.AbstractState", "classtetragono_1_1abstract__state_1_1AbstractState.html", [ + [ "tetragono.abstract_lattice.AbstractLattice", "classtetragono_1_1abstract__lattice_1_1AbstractLattice.html", [ + [ "tetragono.sampling_lattice.lattice.SamplingLattice", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html", null ], + [ "tetragono.simple_update_lattice.SimpleUpdateLattice", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html", null ] + ] ], + [ "tetragono.exact_state.ExactState", "classtetragono_1_1exact__state_1_1ExactState.html", null ] + ] ], + [ "tetragono.abstract_state.AbstractStateHamiltonian", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html", null ], + [ "tetragono.abstract_state.AbstractStatePhysicsEdge", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html", null ], + [ "std::array< T >", null, [ + [ "TAT::empty_list< T >", "structTAT_1_1empty__list.html", null ] + ] ], + [ "cmd.Cmd", null, [ + [ "tetragono.shell.AutoCmd", "classtetragono_1_1shell_1_1AutoCmd.html", [ + [ "tetragono.shell.TetragonoCommandApp", "classtetragono_1_1shell_1_1TetragonoCommandApp.html", [ + [ "tetragono.shell.TetragonoScriptApp", "classtetragono_1_1shell_1_1TetragonoScriptApp.html", null ] + ] ] + ] ] + ] ], + [ "tetragono.shell.Config", "classtetragono_1_1shell_1_1Config.html", null ], + [ "tetragono.sampling_lattice.lattice.ConfigurationPool", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html", null ], + [ "lazy.Copy", "classlazy_1_1Copy.html", null ], + [ "TAT::Core< ScalarType, Symmetry >", "classTAT_1_1Core.html", null ], + [ "TAT::Cut", "structTAT_1_1Cut.html", null ], + [ "tetragono.auxiliaries.double_layer_auxiliaries.DoubleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html", null ], + [ "edge_arrow_t", null, [ + [ "TAT::Edge< Symmetry, is_pointer >", "classTAT_1_1Edge.html", null ] + ] ], + [ "TAT::edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html", null ], + [ "TAT::edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html", null ], + [ "TAT::edge_segments_t< Symmetry, _is_pointer >", "classTAT_1_1edge__segments__t.html", null ], + [ "TAT::edge_segments_t< Symmetry, false >", "classTAT_1_1edge__segments__t.html", [ + [ "TAT::Edge< Symmetry, is_pointer >", "classTAT_1_1Edge.html", null ] + ] ], + [ "tetragono.common_tensor.tensor_toolkit.FakeEdge", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html", null ], + [ "TAT::FastName", "classTAT_1_1FastName.html", null ], + [ "TAT::fermi< T >", "structTAT_1_1fermi.html", null ], + [ "std::hash< pair< Name, Name > >", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html", null ], + [ "std::hash< TAT::FastName >", "structstd_1_1hash_3_01TAT_1_1FastName_01_4.html", null ], + [ "std::hash< TAT::Symmetry< T... > >", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html", null ], + [ "TAT::InternalName< Name >", "structTAT_1_1InternalName.html", null ], + [ "TAT::mdspan< T, U >::iterator_general< is_const >", "structTAT_1_1mdspan_1_1iterator__general.html", null ], + [ "TAT::mdspan< T, U >", "classTAT_1_1mdspan.html", null ], + [ "TAT::mdspan< std::optional< TAT::mdspan< scalar_t > > >", "classTAT_1_1mdspan.html", null ], + [ "metaclass", null, [ + [ "tetragono.shell.AutoCmd", "classtetragono_1_1shell_1_1AutoCmd.html", null ] + ] ], + [ "TAT::mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html", null ], + [ "TAT::mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html", null ], + [ "TAT::mpi_t", "structTAT_1_1mpi__t.html", null ], + [ "TAT::NameTraits< Name >", "structTAT_1_1NameTraits.html", null ], + [ "TAT::NameTraits< FastName >", "structTAT_1_1NameTraits_3_01FastName_01_4.html", null ], + [ "TAT::NameTraits< std::string >", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html", null ], + [ "TAT::NoCut", "structTAT_1_1NoCut.html", null ], + [ "lazy.Node", "classlazy_1_1Node.html", null ], + [ "tetragono.sampling_lattice.observer.Observer", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html", null ], + [ "TAT::Tensor< ScalarType, Symmetry, Name >::qr_result", "structTAT_1_1Tensor_1_1qr__result.html", null ], + [ "TAT::RelativeCut", "structTAT_1_1RelativeCut.html", null ], + [ "TAT::RemainCut", "structTAT_1_1RemainCut.html", null ], + [ "TAT::remove_cvref< T >", "structTAT_1_1remove__cvref.html", null ], + [ "tetragono.sampling_lattice.sampling.Sampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html", [ + [ "tetragono.sampling_lattice.sampling.DirectSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html", null ], + [ "tetragono.sampling_lattice.sampling.ErgodicSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html", null ], + [ "tetragono.sampling_lattice.sampling.SweepSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html", null ] + ] ], + [ "TAT::scope_resource", "structTAT_1_1scope__resource.html", null ], + [ "tetragono.utility.SeedDiffer", "classtetragono_1_1utility_1_1SeedDiffer.html", null ], + [ "tetragono.utility.SignalHandler", "classtetragono_1_1utility_1_1SignalHandler.html", null ], + [ "tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html", null ], + [ "tetragono.auxiliaries.single_layer_auxiliaries.SingleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html", [ + [ "tetragono.sampling_lattice.lattice.Configuration", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html", null ] + ] ], + [ "TAT::Tensor< ScalarType, Symmetry, Name >::svd_result", "structTAT_1_1Tensor_1_1svd__result.html", null ], + [ "tetragono.sampling_lattice.lattice.TailDictTree", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html", null ], + [ "TAT::Tensor< ScalarType, Symmetry, Name >", "classTAT_1_1Tensor.html", null ], + [ "TAT::Tensor< ScalarType, TAT::Symmetry, Name >", "classTAT_1_1Tensor.html", null ], + [ "TAT::TensorShape< ScalarType, Symmetry, Name >", "structTAT_1_1TensorShape.html", null ], + [ "tetragono.auxiliaries.three_line_auxiliaries.ThreeLineAuxiliaries", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html", null ], + [ "TAT::timer", "structTAT_1_1timer.html", null ], + [ "TAT::timer::timer_guard", "structTAT_1_1timer_1_1timer__guard.html", null ], + [ "std::tuple", null, [ + [ "TAT::Symmetry< T >", "structTAT_1_1Symmetry.html", null ] + ] ], + [ "type", null, [ + [ "tetragono.shell.AutoCmdMeta", "classtetragono_1_1shell_1_1AutoCmdMeta.html", [ + [ "tetragono.shell.AutoCmd", "classtetragono_1_1shell_1_1AutoCmd.html", null ] + ] ] + ] ], + [ "TAT::type_identity< T >", "structTAT_1_1type__identity.html", null ], + [ "TAT::UnixColorCode", "structTAT_1_1UnixColorCode.html", null ], + [ "TAT::Fs", null, [ + [ "TAT::overloaded< Fs >", "structTAT_1_1overloaded.html", null ] + ] ] +]; \ No newline at end of file diff --git a/identity_8hpp.html b/identity_8hpp.html new file mode 100644 index 000000000..3a6bc9827 --- /dev/null +++ b/identity_8hpp.html @@ -0,0 +1,123 @@ + + + + + + + +TAT: include/TAT/implement/identity.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
identity.hpp File Reference
+
+
+ +

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+ +

Go to the source code of this file.

+ + + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+

Detailed Description

+

Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/identity_8hpp.js b/identity_8hpp.js new file mode 100644 index 000000000..d171df930 --- /dev/null +++ b/identity_8hpp.js @@ -0,0 +1,4 @@ +var identity_8hpp = +[ + [ "TAT_IDENTITY_HPP", "identity_8hpp.html#ae0ee25f8a0f090aa6e8fd643e42467b9", null ] +]; \ No newline at end of file diff --git a/identity_8hpp_source.html b/identity_8hpp_source.html new file mode 100644 index 000000000..2c200824b --- /dev/null +++ b/identity_8hpp_source.html @@ -0,0 +1,227 @@ + + + + + + + +TAT: include/TAT/implement/identity.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
identity.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_IDENTITY_HPP
+
22 #define TAT_IDENTITY_HPP
+
23 
+
24 #include "../structure/tensor.hpp"
+
25 #include "../utility/allocator.hpp"
+
26 #include "../utility/timer.hpp"
+
27 
+
28 namespace TAT {
+
29  template<typename ScalarType, typename Symmetry, typename Name>
+
30  Tensor<ScalarType, Symmetry, Name>& Tensor<ScalarType, Symmetry, Name>::identity_(const std::unordered_set<std::pair<Name, Name>>& pairs) & {
+
31  // the order of fermi arrow should be (false true) before set to delta
+
32  auto pmr_guard = scope_resource(default_buffer_size);
+
33  acquire_data_ownership("Set the the shared tensor to identity, copy happened here");
+
34  auto half_rank = rank() / 2;
+
35 
+
36  auto ordered_index_pairs = pmr::vector<std::pair<Rank, Rank>>();
+
37  ordered_index_pairs.reserve(half_rank);
+
38 
+
39  Rank destination_index = 0;
+
40  pmr::vector<Rank> transpose_plan_source_to_destination;
+
41  if constexpr (Symmetry::is_fermi_symmetry) {
+
42  transpose_plan_source_to_destination.resize(rank());
+
43  }
+
44 
+
45  auto valid_indices = pmr::vector<bool>(rank(), true);
+
46  for (Rank i = 0; i < rank(); i++) {
+
47  if (valid_indices[i]) {
+
48  const auto& name_to_find = names(i);
+
49  const Name* name_correspond = nullptr;
+
50  for (const auto& [name_1, name_2] : pairs) {
+
51  if (name_1 == name_to_find) {
+
52  name_correspond = &name_2;
+
53  break;
+
54  }
+
55  if (name_2 == name_to_find) {
+
56  name_correspond = &name_1;
+
57  break;
+
58  }
+
59  }
+
60  auto index_correspond = rank_by_name(*name_correspond);
+
61  valid_indices[index_correspond] = false;
+
62  ordered_index_pairs.push_back({i, index_correspond});
+
63  if constexpr (Symmetry::is_fermi_symmetry) {
+
64  if (edges(i).arrow() == false) {
+
65  // i index_corresponding
+
66  transpose_plan_source_to_destination[i] = destination_index++;
+
67  transpose_plan_source_to_destination[index_correspond] = destination_index++;
+
68  } else {
+
69  // index_corresponding i
+
70  transpose_plan_source_to_destination[index_correspond] = destination_index++;
+
71  transpose_plan_source_to_destination[i] = destination_index++;
+
72  }
+
73  }
+
74  }
+
75  }
+
76 
+
77  zero_();
+
78 
+
79  for (auto it = blocks().begin(); it.valid; ++it) {
+
80  if (!it->has_value()) {
+
81  continue;
+
82  }
+
83  auto& block = it->value();
+
84 
+
85  auto symmetries = pmr::vector<Symmetry>();
+
86  symmetries.reserve(rank());
+
87  for (auto i = 0; i < rank(); i++) {
+
88  symmetries.emplace_back(edges(i).segments(it.indices[i]).first);
+
89  }
+
90 
+
91  bool not_diagonal = false;
+
92  for (const auto& [i0, i1] : ordered_index_pairs) {
+
93  not_diagonal = symmetries[i0] + symmetries[i1] != Symmetry();
+
94  if (not_diagonal) {
+
95  break;
+
96  }
+
97  }
+
98  if (not_diagonal) {
+
99  continue;
+
100  }
+
101 
+
102  auto pair_dimensions = pmr::vector<Size>();
+
103  auto pair_leadings = pmr::vector<Size>();
+
104  pair_dimensions.reserve(half_rank);
+
105  pair_leadings.reserve(half_rank);
+
106  for (const auto& [i0, i1] : ordered_index_pairs) {
+
107  pair_dimensions.push_back(block.dimensions(i0));
+
108  pair_leadings.push_back(block.leadings(i0) + block.leadings(i1));
+
109  // ordered_pair_index order is from leading large to leading small so pair_leading is descreasing
+
110  }
+
111 
+
112  bool parity = false;
+
113  if constexpr (Symmetry::is_fermi_symmetry) {
+
114  for (auto i = 0; i < rank(); i++) {
+
115  for (auto j = i + 1; j < rank(); j++) {
+
116  if (transpose_plan_source_to_destination[i] > transpose_plan_source_to_destination[j]) {
+
117  parity ^= symmetries[i].parity() && symmetries[j].parity();
+
118  }
+
119  }
+
120  }
+
121  }
+
122 
+
123  auto span_one = mdspan<ScalarType, pmr::vector<Size>>(block.data(), std::move(pair_dimensions), std::move(pair_leadings));
+
124  if (parity) {
+
125  for (auto i = span_one.begin(); i.valid; ++i) {
+
126  *i = -1;
+
127  }
+
128  } else {
+
129  for (auto i = span_one.begin(); i.valid; ++i) {
+
130  *i = +1;
+
131  }
+
132  }
+
133  }
+
134 
+
135  return *this;
+
136  }
+
137 } // namespace TAT
+
138 #endif
+
Tensor type.
Definition: tensor.hpp:87
+
Tensor< ScalarType, Symmetry, Name > & identity_(const std::unordered_set< std::pair< Name, Name >> &pairs) &
Set the tensor as identity inplacely.
Definition: identity.hpp:30
+
Definition: multidimension_span.hpp:33
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
Definition: symmetry.hpp:95
+
Definition: allocator.hpp:295
+
+
+ + + + diff --git a/index.html b/index.html new file mode 100644 index 000000000..beda4db75 --- /dev/null +++ b/index.html @@ -0,0 +1,99 @@ + + + + + + + +TAT: Main Page + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TAT Documentation
+
+
+
+
+ + + + diff --git a/io_8hpp.html b/io_8hpp.html new file mode 100644 index 000000000..459192986 --- /dev/null +++ b/io_8hpp.html @@ -0,0 +1,306 @@ + + + + + + + +TAT: include/TAT/miscellaneous/io.hpp File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
io.hpp File Reference
+
+
+ +

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

+
#include <iostream>
+#include <limits>
+#include <type_traits>
+#include "../structure/tensor.hpp"
+#include "../utility/timer.hpp"
+
+

Go to the source code of this file.

+ + + + + + + + + +

+Classes

struct  TAT::NameTraits< FastName >
 
struct  TAT::NameTraits< std::string >
 
struct  TAT::UnixColorCode
 A type control console color. More...
 
+ + + + +

+Namespaces

 TAT
 TAT is A Tensor library.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename ScalarType >
std::ostream & TAT::detail::print_complex (std::ostream &out, const std::complex< ScalarType > &value)
 
+template<typename ScalarType >
std::ostream && TAT::detail::print_complex (std::ostream &&out, const std::complex< ScalarType > &value)
 
+template<typename ScalarType >
std::istream & TAT::detail::scan_complex (std::istream &in, std::complex< ScalarType > &value)
 
+template<typename ScalarType >
std::istream && TAT::detail::scan_complex (std::istream &&in, std::complex< ScalarType > &value)
 
+void TAT::detail::ignore_until (std::istream &in, char end)
 
+template<typename Func >
std::ostream & TAT::detail::print_list (std::ostream &out, Func &&print, char left, char right)
 
+template<typename Func >
std::istream & TAT::detail::scan_list (std::istream &in, Func &&scan, char left, char right)
 
+template<typename T , typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
std::ostream & TAT::operator< (std::ostream &out, const T &data)
 
+template<typename T , typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
std::istream & TAT::operator> (std::istream &in, T &data)
 
+bool TAT::detail::valid_name_character (char c)
 
+std::ostream & TAT::print_string_for_name (std::ostream &out, const std::string &name)
 
+std::ostream & TAT::print_fastname_for_name (std::ostream &out, const FastName &name)
 
+std::istream & TAT::scan_string_for_name (std::istream &in, std::string &name)
 
+std::istream & TAT::scan_fastname_for_name (std::istream &in, FastName &name)
 
+std::ostream & TAT::write_string_for_name (std::ostream &out, const std::string &string)
 
+std::istream & TAT::read_string_for_name (std::istream &in, std::string &string)
 
+std::ostream & TAT::write_fastname_for_name (std::ostream &out, const FastName &name)
 
+std::istream & TAT::read_fastname_for_name (std::istream &in, FastName &name)
 
+template<typename T , typename A >
std::ostream & TAT::operator< (std::ostream &out, const std::vector< T, A > &list)
 
+template<typename T , typename A >
std::istream & TAT::operator> (std::istream &in, std::vector< T, A > &list)
 
+template<typename T , typename A , typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
std::ostream & TAT::operator<< (std::ostream &out, const std::vector< T, A > &list)
 
+template<typename T , typename A , typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
std::istream & TAT::operator>> (std::istream &in, std::vector< T, A > &list)
 
+template<typename Symmetry >
std::ostream & TAT::operator<< (std::ostream &out, const Edge< Symmetry > &edge)
 
+template<typename Symmetry >
std::istream & TAT::operator>> (std::istream &in, Edge< Symmetry > &edge)
 
+template<typename Symmetry >
std::ostream & TAT::operator< (std::ostream &out, const Edge< Symmetry > &edge)
 
+template<typename Symmetry >
std::istream & TAT::operator> (std::istream &in, Edge< Symmetry > &edge)
 
+template<typename Symmetry , std::size_t... Is>
void TAT::detail::print_symmetry_sequence (std::ostream &out, const Symmetry &symmetry, std::index_sequence< Is... >)
 
+template<typename Symmetry , std::size_t... Is>
void TAT::detail::scan_symmetry_sequence (std::istream &in, Symmetry &symmetry, std::index_sequence< Is... >)
 
+template<typename... T>
std::ostream & TAT::operator<< (std::ostream &out, const Symmetry< T... > &symmetry)
 
+template<typename... T>
std::istream & TAT::operator>> (std::istream &in, Symmetry< T... > &symmetry)
 
+std::ostream & TAT::operator<< (std::ostream &out, const UnixColorCode &value)
 
+template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
std::ostream & TAT::operator<< (std::ostream &out, const TensorShape< ScalarType, Symmetry, Name > &shape)
 
+template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
std::ostream & TAT::operator<< (std::ostream &out, const Tensor< ScalarType, Symmetry, Name > &tensor)
 
+template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
std::istream & TAT::operator>> (std::istream &in, Tensor< ScalarType, Symmetry, Name > &tensor)
 
+template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
std::ostream & TAT::operator< (std::ostream &out, const Tensor< ScalarType, Symmetry, Name > &tensor)
 
+template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
std::istream & TAT::operator> (std::istream &in, Tensor< ScalarType, Symmetry, Name > &tensor)
 
+template<typename T >
std::istream && TAT::operator> (std::istream &&in, T &v)
 
+template<typename T >
std::ostream && TAT::operator< (std::ostream &&out, const T &v)
 
+ + + + + + + + + + + + + + + +

+Variables

+const UnixColorCode TAT::console_red = "\x1B[31m"
 
+const UnixColorCode TAT::console_green = "\x1B[32m"
 
+const UnixColorCode TAT::console_yellow = "\x1B[33m"
 
+const UnixColorCode TAT::console_blue = "\x1B[34m"
 
+const UnixColorCode TAT::console_origin = "\x1B[0m"
 
+timer TAT::tensor_dump_guard ("tensor_dump")
 
+timer TAT::tensor_load_guard ("tensor_load")
 
+

Detailed Description

+

Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

+
+
+ + + + diff --git a/io_8hpp.js b/io_8hpp.js new file mode 100644 index 000000000..c2b04dcf0 --- /dev/null +++ b/io_8hpp.js @@ -0,0 +1,52 @@ +var io_8hpp = +[ + [ "NameTraits< FastName >", "structTAT_1_1NameTraits_3_01FastName_01_4.html", "structTAT_1_1NameTraits_3_01FastName_01_4" ], + [ "NameTraits< std::string >", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html", "structTAT_1_1NameTraits_3_01std_1_1string_01_4" ], + [ "UnixColorCode", "structTAT_1_1UnixColorCode.html", "structTAT_1_1UnixColorCode" ], + [ "TAT_IO_HPP", "io_8hpp.html#a2246ef4316764efbaa4876d2bfe35236", null ], + [ "ignore_until", "io_8hpp.html#a10594d9aab2aa2c685c884b606c73cdf", null ], + [ "operator<", "io_8hpp.html#a4cb16202480a072671790dda4f217ac1", null ], + [ "operator<", "io_8hpp.html#a25ab92707d9f192d2bfc240c4573996c", null ], + [ "operator<", "io_8hpp.html#a8f99d3e3cca0e0b82393647ace57160f", null ], + [ "operator<", "io_8hpp.html#a1c9b25458cc9c6ec62c9422a54bccb14", null ], + [ "operator<", "io_8hpp.html#a4387c288b3b412fdd58d81290048b696", null ], + [ "operator<<", "io_8hpp.html#a8dd7daad5a8d7c39a0268b8cebe12497", null ], + [ "operator<<", "io_8hpp.html#a13002a177520161a55c46862200af0a7", null ], + [ "operator<<", "io_8hpp.html#a14bb7bba0af22950707d8696dcf27f71", null ], + [ "operator<<", "io_8hpp.html#af074bc67f01c3aa686377f977e833f11", null ], + [ "operator<<", "io_8hpp.html#a2a3bdc186e2eb08b3d258e81daa9414d", null ], + [ "operator<<", "io_8hpp.html#acc2f55e19d46917363973d272e6695ff", null ], + [ "operator>", "io_8hpp.html#a90274dfa0c2cf49e3b7cffb580fd85be", null ], + [ "operator>", "io_8hpp.html#a8619114e5350c68b3dfc562b9b8c486d", null ], + [ "operator>", "io_8hpp.html#a5e5afe3e6956ef596dcdd2bfba62d24f", null ], + [ "operator>", "io_8hpp.html#a65c258b3e38a3d1883ed876629b5572c", null ], + [ "operator>", "io_8hpp.html#a18a8d725957fc91b7c7d4354c3447831", null ], + [ "operator>>", "io_8hpp.html#a2c7344d49c8fd21291470fb5dd02e865", null ], + [ "operator>>", "io_8hpp.html#a9929c09c801b973aa84e8e34f2a16301", null ], + [ "operator>>", "io_8hpp.html#a9f77380a916a18dcb0f168e5665739c1", null ], + [ "operator>>", "io_8hpp.html#ab679d2e6320623d08a4cf3cfb8d2678f", null ], + [ "print_complex", "io_8hpp.html#aac12b72cf395c6bb2509238dc8a91701", null ], + [ "print_complex", "io_8hpp.html#a6c88100aff09e587b58f025843b2caa6", null ], + [ "print_fastname_for_name", "io_8hpp.html#aeb0579c63393be4d82d04421f60d8c78", null ], + [ "print_list", "io_8hpp.html#a2655c04ef1967f485203d54a79e818d3", null ], + [ "print_string_for_name", "io_8hpp.html#a0d502066f73035565ca1214ffd8bdd52", null ], + [ "print_symmetry_sequence", "io_8hpp.html#afa9cff8ab3ef8ce92011856ecd279a4d", null ], + [ "read_fastname_for_name", "io_8hpp.html#a761b31643d594896812339fe7ce73327", null ], + [ "read_string_for_name", "io_8hpp.html#a1faae795a9bd9b5ba169ada60bdbe461", null ], + [ "scan_complex", "io_8hpp.html#a8d57daae76b83323d99be6b757c07a03", null ], + [ "scan_complex", "io_8hpp.html#ada545d7a9205c968bf8954359df96266", null ], + [ "scan_fastname_for_name", "io_8hpp.html#a1df151abfc11c364fdad8b358b387a48", null ], + [ "scan_list", "io_8hpp.html#aeaa4cbb124c2d8ff68ea396688699618", null ], + [ "scan_string_for_name", "io_8hpp.html#aa110d47ac565ae2779de3de5ff635c59", null ], + [ "scan_symmetry_sequence", "io_8hpp.html#aa11f7022239c65f14359dab0ab12f38d", null ], + [ "valid_name_character", "io_8hpp.html#a4f2b473afa1ecde4f263136b9d7c88fd", null ], + [ "write_fastname_for_name", "io_8hpp.html#a8eebcfddb1e0738a33ac290904ba45c6", null ], + [ "write_string_for_name", "io_8hpp.html#a5703b34050460a0eb928d65e7efbf99b", null ], + [ "console_blue", "io_8hpp.html#a812c17cc2001a142260ae10bb8c4c1e6", null ], + [ "console_green", "io_8hpp.html#a33f7b66a780be2a3c25a97fb51ff9fc9", null ], + [ "console_origin", "io_8hpp.html#a38c688241972425df2d55d7c13e93ed7", null ], + [ "console_red", "io_8hpp.html#a1ff0950988386a714f0f9e737f79aa8b", null ], + [ "console_yellow", "io_8hpp.html#a4abd9dd3c1973d84ec13109f1a219b89", null ], + [ "tensor_dump_guard", "io_8hpp.html#a87e28d5ac0c66617c2ff533c33b718f8", null ], + [ "tensor_load_guard", "io_8hpp.html#a3e02c525317003507713a8725c968c2c", null ] +]; \ No newline at end of file diff --git a/io_8hpp_source.html b/io_8hpp_source.html new file mode 100644 index 000000000..91423fef2 --- /dev/null +++ b/io_8hpp_source.html @@ -0,0 +1,860 @@ + + + + + + + +TAT: include/TAT/miscellaneous/io.hpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
TAT +  0.3.12 +
+
TAT is A Tensor library
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
io.hpp
+
+
+Go to the documentation of this file.
1 
+
20 #pragma once
+
21 #ifndef TAT_IO_HPP
+
22 #define TAT_IO_HPP
+
23 
+
24 #include <iostream>
+
25 #include <limits>
+
26 #include <type_traits>
+
27 
+
28 #include "../structure/tensor.hpp"
+
29 #include "../utility/timer.hpp"
+
30 
+
31 namespace TAT {
+
32  namespace detail {
+
33  // These two string is to avoid duplicated copy string when format data to string.
+
34  // The original output workflow is print to stringstream and convert to string.
+
35  // c++ default stringstream will copy string, this stream will move the internal string
+
36  // The original input workflow is create stringstream by copy input string.
+
37  // This stream will only use the string view of the input.
+
38  template<typename char_type>
+
39  class basic_instringstream :
+
40  private std::basic_streambuf<char_type, std::char_traits<char_type>>,
+
41  public std::basic_istream<char_type, std::char_traits<char_type>> {
+
42  using traits_type = std::char_traits<char_type>;
+
43  using base_buf_type = std::basic_streambuf<char_type, traits_type>;
+
44  using base_stream_type = std::basic_istream<char_type, traits_type>;
+
45  using int_type = typename base_buf_type::int_type;
+
46 
+
47  std::basic_string_view<char_type> m_str;
+
48 
+
49  public:
+
50  explicit basic_instringstream(std::basic_string_view<char_type> str) : base_stream_type(this), m_str(str) {
+
51  this->setg(const_cast<char_type*>(&*m_str.begin()), const_cast<char_type*>(&*m_str.begin()), const_cast<char_type*>(&*m_str.end()));
+
52  }
+
53  };
+
54 
+
55  template<typename char_type>
+
56  class basic_outstringstream :
+
57  private std::basic_streambuf<char_type, std::char_traits<char_type>>,
+
58  public std::basic_ostream<char_type, std::char_traits<char_type>> {
+
59  using traits_type = std::char_traits<char_type>;
+
60  using base_buf_type = std::basic_streambuf<char_type, traits_type>;
+
61  using base_stream_type = std::basic_ostream<char_type, traits_type>;
+
62  using int_type = typename base_buf_type::int_type;
+
63 
+
64  std::basic_string<char_type> m_str;
+
65 
+
66  int_type overflow(int_type ch) override {
+
67  // pbase, pptr, epptr
+
68  if (traits_type::eq_int_type(ch, traits_type::eof())) {
+
69  return ch;
+
70  }
+
71 
+
72  m_str.resize(m_str.size() * 2);
+
73 
+
74  const std::ptrdiff_t diff = this->pptr() - this->pbase();
+
75  this->setp(&*m_str.begin(), &*m_str.end());
+
76  this->pbump(diff);
+
77 
+
78  *this->pptr() = traits_type::to_char_type(ch);
+
79  this->pbump(1);
+
80 
+
81  return ch; // return any value except eof
+
82  }
+
83 
+
84  public:
+
85  explicit basic_outstringstream(std::size_t size = 8) : base_stream_type(this) {
+
86  m_str.resize(size);
+
87  this->setp(&*m_str.begin(), &*m_str.end());
+
88  }
+
89 
+
90  std::basic_string<char_type> str() && {
+
91  const std::ptrdiff_t diff = this->pptr() - this->pbase();
+
92  m_str.resize(diff);
+
93  return std::move(m_str);
+
94  }
+
95  };
+
96 
+
97  // complex text io, complex bin io can be done directly
+
98  template<typename ScalarType>
+
99  std::ostream& print_complex(std::ostream& out, const std::complex<ScalarType>& value) {
+
100  if (value.real() != 0) {
+
101  out << value.real();
+
102  if (value.imag() != 0) {
+
103  if (value.imag() > 0) {
+
104  out << '+';
+
105  }
+
106  out << value.imag();
+
107  out << 'i';
+
108  }
+
109  } else {
+
110  if (value.imag() == 0) {
+
111  out << '0';
+
112  } else {
+
113  out << value.imag();
+
114  out << 'i';
+
115  }
+
116  }
+
117  return out;
+
118  }
+
119 
+
120  template<typename ScalarType>
+
121  std::ostream&& print_complex(std::ostream&& out, const std::complex<ScalarType>& value) {
+
122  print_complex(out, value);
+
123  return std::move(out);
+
124  }
+
125 
+
126  template<typename ScalarType>
+
127  std::istream& scan_complex(std::istream& in, std::complex<ScalarType>& value) {
+
128  ScalarType part;
+
129  in >> part;
+
130  char maybe_i = in.peek();
+
131  if (maybe_i == 'i') {
+
132  in.get();
+
133  // no real part
+
134  value = std::complex<ScalarType>{0, part};
+
135  } else {
+
136  // have real part
+
137  if (maybe_i == '+' || maybe_i == '-') {
+
138  // have imag part
+
139  ScalarType another_part;
+
140  in >> another_part;
+
141  value = std::complex<ScalarType>{part, another_part};
+
142  if (in.get() != 'i') {
+
143  in.setstate(std::ios::failbit);
+
144  }
+
145  } else {
+
146  // no imag part
+
147  value = std::complex<ScalarType>{part, 0};
+
148  }
+
149  }
+
150  return in;
+
151  }
+
152 
+
153  template<typename ScalarType>
+
154  std::istream&& scan_complex(std::istream&& in, std::complex<ScalarType>& value) {
+
155  detail::scan_complex(in, value);
+
156  return std::move(in);
+
157  }
+
158 
+
159  inline void ignore_until(std::istream& in, char end) {
+
160  in.ignore(std::numeric_limits<std::streamsize>::max(), end);
+
161  }
+
162 
+
163  template<typename Func>
+
164  std::ostream& print_list(std::ostream& out, Func&& print, char left, char right) {
+
165  // This will print the list item one by one via calling `print(out)`, which return false if it is not the last item
+
166  // and return true if it is the last item.
+
167  // If the list is empty, it should return true directly.
+
168  out << left;
+
169  while (!print(out)) {
+
170  out << ',';
+
171  }
+
172  out << right;
+
173  return out;
+
174  }
+
175 
+
176  template<typename Func>
+
177  std::istream& scan_list(std::istream& in, Func&& scan, char left, char right) {
+
178  detail::ignore_until(in, left);
+
179  if (in.peek() == right) {
+
180  // empty list
+
181  in.get(); // get ']'
+
182  } else {
+
183  // not empty
+
184  do {
+
185  scan(in);
+
186  } while (in.get() == ',');
+
187  }
+
188  return in;
+
189  }
+
190  } // namespace detail
+
191 
+
192  // trivial type bin io
+
193 
+
194  template<typename T, typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
+
195  std::ostream& operator<(std::ostream& out, const T& data) {
+
196  out.write(reinterpret_cast<const char*>(&data), sizeof(T));
+
197  return out;
+
198  }
+
199  template<typename T, typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
+
200  std::istream& operator>(std::istream& in, T& data) {
+
201  in.read(reinterpret_cast<char*>(&data), sizeof(T));
+
202  return in;
+
203  }
+
204 
+
205  // name type io
+
206 
+
207  namespace detail {
+
208  inline bool valid_name_character(char c) {
+
209  if (!std::isprint(c)) {
+
210  return false;
+
211  }
+
212  if (c == ' ') {
+
213  return false;
+
214  }
+
215  if (c == ',') {
+
216  return false;
+
217  }
+
218  if (c == '[') {
+
219  return false;
+
220  }
+
221  if (c == ']') {
+
222  return false;
+
223  }
+
224  return true;
+
225  }
+
226  } // namespace detail
+
227 
+
228  inline std::ostream& print_string_for_name(std::ostream& out, const std::string& name) {
+
229  return out << name;
+
230  }
+
231  inline std::ostream& print_fastname_for_name(std::ostream& out, const FastName& name) {
+
232  out << static_cast<const std::string&>(name);
+
233  return out;
+
234  }
+
235 
+
236  inline std::istream& scan_string_for_name(std::istream& in, std::string& name) {
+
237  char buffer[256]; // max name length = 256
+
238  Size length = 0;
+
239  while (detail::valid_name_character(in.peek())) {
+
240  buffer[length++] = in.get();
+
241  }
+
242  buffer[length] = '\x00';
+
243  name = (const char*)buffer;
+
244  return in;
+
245  }
+
246 
+
247  inline std::istream& scan_fastname_for_name(std::istream& in, FastName& name) {
+
248  std::string string;
+
249  scan_string_for_name(in, string);
+
250  name = FastName(string);
+
251  return in;
+
252  }
+
253 
+
254  inline std::ostream& write_string_for_name(std::ostream& out, const std::string& string) {
+
255  Size count = string.size();
+
256  out < count;
+
257  out.write(string.data(), sizeof(char) * count);
+
258  return out;
+
259  }
+
260  inline std::istream& read_string_for_name(std::istream& in, std::string& string) {
+
261  Size count;
+
262  in > count;
+
263  string.resize(count);
+
264  in.read(string.data(), sizeof(char) * count);
+
265  return in;
+
266  }
+
267 
+
268  inline std::ostream& write_fastname_for_name(std::ostream& out, const FastName& name) {
+
269  return write_string_for_name(out, static_cast<const std::string&>(name));
+
270  }
+
271 
+
272  inline std::istream& read_fastname_for_name(std::istream& in, FastName& name) {
+
273  std::string name_string;
+
274  read_string_for_name(in, name_string);
+
275  name = FastName(name_string);
+
276  return in;
+
277  }
+
278 
+
279  template<>
+ +
281  // Although FastName is trivial type, but write string explicitly for good compatibility.
+
282  static constexpr out_operator_t<FastName> write = write_fastname_for_name;
+
283  static constexpr in_operator_t<FastName> read = read_fastname_for_name;
+
284  static constexpr out_operator_t<FastName> print = print_fastname_for_name;
+
285  static constexpr in_operator_t<FastName> scan = scan_fastname_for_name;
+
286  };
+
287  template<>
+
288  struct NameTraits<std::string> {
+
289  static constexpr out_operator_t<std::string> write = write_string_for_name;
+
290  static constexpr in_operator_t<std::string> read = read_string_for_name;
+
291  static constexpr out_operator_t<std::string> print = print_string_for_name;
+
292  static constexpr in_operator_t<std::string> scan = scan_string_for_name;
+
293  };
+
294 
+
295  // vector io, bin and text
+
296 
+
297  template<typename T, typename A>
+
298  std::ostream& operator<(std::ostream& out, const std::vector<T, A>& list) {
+
299  Size count = list.size();
+
300  out < count;
+
301  if constexpr (is_name<T>) {
+
302  for (const auto& i : list) {
+
303  NameTraits<T>::write(out, i);
+
304  }
+
305  } else if constexpr (std::is_trivially_destructible_v<T>) {
+
306  out.write(reinterpret_cast<const char*>(list.data()), sizeof(T) * count);
+
307  } else {
+
308  for (const auto& i : list) {
+
309  out < i;
+
310  }
+
311  }
+
312  return out;
+
313  }
+
314  template<typename T, typename A>
+
315  std::istream& operator>(std::istream& in, std::vector<T, A>& list) {
+
316  list.clear();
+
317  Size count;
+
318  in > count;
+
319  if constexpr (is_name<T>) {
+
320  for (Size i = 0; i < count; i++) {
+
321  auto& item = list.emplace_back();
+
322  NameTraits<T>::read(in, item);
+
323  }
+
324  } else if constexpr (std::is_trivially_destructible_v<T>) {
+
325  list.resize(count);
+
326  in.read(reinterpret_cast<char*>(list.data()), sizeof(T) * count);
+
327  } else {
+
328  for (Size i = 0; i < count; i++) {
+
329  auto& item = list.emplace_back();
+
330  in > item;
+
331  }
+
332  }
+
333  return in;
+
334  }
+
335 
+
336  template<typename T, typename A, typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
+
337  std::ostream& operator<<(std::ostream& out, const std::vector<T, A>& list) {
+
338  detail::print_list(
+
339  out,
+
340  [offset = 0, l = list.data(), count = list.size()](std::ostream& out) mutable {
+
341  if (offset == count) {
+
342  return true;
+
343  }
+
344  if constexpr (is_name<T>) {
+
345  NameTraits<T>::print(out, l[offset]);
+
346  } else if constexpr (is_complex<T>) {
+
347  detail::print_complex(out, l[offset]);
+
348  } else {
+
349  out << l[offset];
+
350  }
+
351  ++offset;
+
352  return offset == count;
+
353  },
+
354  '[',
+
355  ']'
+
356  );
+
357  return out;
+
358  }
+
359 
+
360  template<typename T, typename A, typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
+
361  std::istream& operator>>(std::istream& in, std::vector<T, A>& list) {
+
362  list.clear();
+
363  detail::scan_list(
+
364  in,
+
365  [&l = list](std::istream& in) mutable {
+
366  T& i = l.emplace_back();
+
367  if constexpr (is_name<T>) {
+
368  NameTraits<T>::scan(in, i);
+
369  } else if constexpr (is_complex<T>) {
+
370  detail::scan_complex(in, i);
+
371  } else {
+
372  in >> i;
+
373  }
+
374  },
+
375  '[',
+
376  ']'
+
377  );
+
378  return in;
+
379  }
+
380 
+
381  // edge io
+
382 
+
383  template<typename Symmetry>
+
384  std::ostream& operator<<(std::ostream& out, const Edge<Symmetry>& edge) {
+
385  if constexpr (Symmetry::length == 0) {
+
386  out << edge.segments().front().second;
+
387  } else {
+
388  if constexpr (Symmetry::is_fermi_symmetry) {
+
389  out << '{';
+
390  out << "arrow" << ':';
+
391  out << edge.arrow();
+
392  out << ',';
+
393  out << "segment" << ':';
+
394  }
+
395  detail::print_list(
+
396  out,
+
397  [offset = 0, l = edge.segments().data(), count = edge.segments().size()](std::ostream& out) mutable {
+
398  if (offset == count) {
+
399  return true;
+
400  }
+
401  const auto& [symmetry, dimension] = l[offset];
+
402  out << symmetry << ':' << dimension;
+
403  ++offset;
+
404  return offset == count;
+
405  },
+
406  '{',
+
407  '}'
+
408  );
+
409  if constexpr (Symmetry::is_fermi_symmetry) {
+
410  out << '}';
+
411  }
+
412  }
+
413  return out;
+
414  }
+
415  template<typename Symmetry>
+
416  std::istream& operator>>(std::istream& in, Edge<Symmetry>& edge) {
+
417  if constexpr (Symmetry::length == 0) {
+
418  Size dimension;
+
419  in >> dimension;
+
420  edge = Edge<Symmetry>(dimension);
+
421  } else {
+
422  bool arrow = false;
+
423  if constexpr (Symmetry::is_fermi_symmetry) {
+
424  detail::ignore_until(in, ':');
+
425  in >> arrow;
+
426  }
+
427  std::vector<std::pair<Symmetry, Size>> segments;
+
428  detail::scan_list(
+
429  in,
+
430  [&l = segments](std::istream& in) mutable {
+
431  Symmetry symmetry;
+
432  in >> symmetry;
+
433  detail::ignore_until(in, ':');
+
434  Size dimension;
+
435  in >> dimension;
+
436  l.emplace_back(symmetry, dimension);
+
437  },
+
438  '{',
+
439  '}'
+
440  );
+
441  edge = {std::move(segments), arrow};
+
442  if constexpr (Symmetry::is_fermi_symmetry) {
+
443  detail::ignore_until(in, '}');
+
444  }
+
445  }
+
446  return in;
+
447  }
+
448 
+
449  template<typename Symmetry>
+
450  std::ostream& operator<(std::ostream& out, const Edge<Symmetry>& edge) {
+
451  if constexpr (Symmetry::is_fermi_symmetry) {
+
452  out < edge.arrow();
+
453  }
+
454  out < edge.segments();
+
455  return out;
+
456  }
+
457  template<typename Symmetry>
+
458  std::istream& operator>(std::istream& in, Edge<Symmetry>& edge) {
+
459  bool arrow = false;
+
460  if constexpr (Symmetry::is_fermi_symmetry) {
+
461  in > arrow;
+
462  }
+
463  std::vector<std::pair<Symmetry, Size>> segments;
+
464  in > segments;
+
465  edge = {std::move(segments), arrow};
+
466  return in;
+
467  }
+
468 
+
469  // symmetry io, text only, bin can use direct
+
470 
+
471  namespace detail {
+
472  template<typename Symmetry, std::size_t... Is>
+
473  void print_symmetry_sequence(std::ostream& out, const Symmetry& symmetry, std::index_sequence<Is...>) {
+
474  (((Is == 0 ? out : out << ',') << std::get<Is>(symmetry)), ...);
+
475  }
+
476 
+
477  template<typename Symmetry, std::size_t... Is>
+
478  void scan_symmetry_sequence(std::istream& in, Symmetry& symmetry, std::index_sequence<Is...>) {
+
479  (((Is == 0 ? in : (detail::ignore_until(in, ','), in)) >> std::get<Is>(symmetry)), ...);
+
480  }
+
481  } // namespace detail
+
482  template<typename... T>
+
483  std::ostream& operator<<(std::ostream& out, const Symmetry<T...>& symmetry) {
+
484  using Symmetry = Symmetry<T...>;
+
485  if constexpr (Symmetry::length != 0) {
+
486  if constexpr (Symmetry::length == 1) {
+
487  out << std::get<0>(symmetry);
+
488  } else {
+
489  out << '(';
+
490  detail::print_symmetry_sequence(out, symmetry, typename Symmetry::index_sequence_t());
+
491  out << ')';
+
492  }
+
493  }
+
494  return out;
+
495  }
+
496  template<typename... T>
+
497  std::istream& operator>>(std::istream& in, Symmetry<T...>& symmetry) {
+
498  using Symmetry = Symmetry<T...>;
+
499  if constexpr (Symmetry::length != 0) {
+
500  if constexpr (Symmetry::length == 1) {
+
501  in >> std::get<0>(symmetry);
+
502  } else {
+
503  detail::ignore_until(in, '(');
+
504  detail::scan_symmetry_sequence(in, symmetry, typename Symmetry::index_sequence_t());
+
505  detail::ignore_until(in, ')');
+
506  }
+
507  }
+
508  return in;
+
509  }
+
510 
+
514  struct UnixColorCode {
+
515  std::string color_code;
+
516  UnixColorCode(const char* code) : color_code(code) { }
+
517  };
+
518  inline const UnixColorCode console_red = "\x1B[31m";
+
519  inline const UnixColorCode console_green = "\x1B[32m";
+
520  inline const UnixColorCode console_yellow = "\x1B[33m";
+
521  inline const UnixColorCode console_blue = "\x1B[34m";
+
522  inline const UnixColorCode console_origin = "\x1B[0m";
+
523  inline std::ostream& operator<<(std::ostream& out, const UnixColorCode& value) {
+
524  out << value.color_code;
+
525  return out;
+
526  }
+
527 
+
528  // tensor shape, text output only
+
529 
+
530  template<
+
531  typename ScalarType,
+
532  typename Symmetry,
+
533  typename Name,
+
534  typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
+
535  std::ostream& operator<<(std::ostream& out, const TensorShape<ScalarType, Symmetry, Name>& shape) {
+
536  const auto& tensor = *shape.owner;
+
537  out << '{' << console_green << "names" << console_origin << ':';
+
538  out << tensor.names() << ',';
+
539  out << console_green << "edges" << console_origin << ':';
+
540  out << tensor.edges() << '}';
+
541  return out;
+
542  }
+
543 
+
544  // tensor text in out
+
545 
+
546  template<
+
547  typename ScalarType,
+
548  typename Symmetry,
+
549  typename Name,
+
550  typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
+
551  std::ostream& operator<<(std::ostream& out, const Tensor<ScalarType, Symmetry, Name>& tensor) {
+
552  out << '{' << console_green << "names" << console_origin << ':';
+
553  out << tensor.names() << ',';
+
554  out << console_green << "edges" << console_origin << ':';
+
555  out << tensor.edges() << ',';
+
556  out << console_green << "blocks" << console_origin << ':';
+
557  if constexpr (Symmetry::length == 0) {
+
558  out << tensor.storage();
+
559  } else {
+
560  detail::print_list(
+
561  out,
+
562  [&tensor, it = tensor.blocks().begin()](std::ostream& out) mutable {
+
563  if (it.offset == 0) {
+
564  while (true) {
+
565  if (!it.valid) {
+
566  return true;
+
567  }
+
568  if (it->has_value()) {
+
569  break;
+
570  }
+
571  ++it;
+
572  }
+
573  }
+
574  std::vector<Symmetry> symmetries;
+
575  symmetries.reserve(tensor.rank());
+
576  for (auto j = 0; j < tensor.rank(); j++) {
+
577  symmetries.push_back(tensor.edges(j).segments(it.indices[j]).first);
+
578  }
+
579  out << console_yellow << symmetries << console_origin << ':';
+
580  detail::print_list(
+
581  out,
+
582  [offset = 0, l = it->value().data(), count = it->value().size()](std::ostream& out) mutable {
+
583  if (offset == count) {
+
584  return true;
+
585  }
+
586  if constexpr (is_complex<ScalarType>) {
+
587  detail::print_complex(out, l[offset]);
+
588  } else {
+
589  out << l[offset];
+
590  }
+
591  ++offset;
+
592  return offset == count;
+
593  },
+
594  '[',
+
595  ']'
+
596  );
+
597  while (true) {
+
598  ++it;
+
599  if (!it.valid) {
+
600  return true;
+
601  }
+
602  if (it->has_value()) {
+
603  return false;
+
604  }
+
605  }
+
606  },
+
607  '{',
+
608  '}'
+
609  );
+
610  }
+
611  out << '}';
+
612  return out;
+
613  }
+
614 
+
615  template<
+
616  typename ScalarType,
+
617  typename Symmetry,
+
618  typename Name,
+
619  typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
+
620  std::istream& operator>>(std::istream& in, Tensor<ScalarType, Symmetry, Name>& tensor) {
+
621  detail::ignore_until(in, ':');
+
622  std::vector<Name> names;
+
623  in >> names;
+
624  detail::ignore_until(in, ':');
+
625  std::vector<Edge<Symmetry>> edges;
+
626  in >> edges;
+
627  tensor = Tensor<ScalarType, Symmetry, Name>(std::move(names), std::move(edges));
+
628  detail::ignore_until(in, ':');
+
629  if constexpr (Symmetry::length == 0) {
+
630  auto storage = tensor.storage().data();
+
631  detail::scan_list(
+
632  in,
+
633  [offset = 0, l = storage](std::istream& in) mutable {
+
634  if constexpr (is_complex<ScalarType>) {
+
635  detail::scan_complex(in, l[offset++]);
+
636  } else {
+
637  in >> l[offset++];
+
638  }
+
639  },
+
640  '[',
+
641  ']'
+
642  );
+
643  } else {
+
644  detail::scan_list(
+
645  in,
+
646  [&tensor](std::istream& in) {
+
647  std::vector<Symmetry> symmetries;
+
648  in >> symmetries;
+
649  detail::ignore_until(in, ':');
+
650  auto block = tensor.blocks(symmetries).data();
+
651  detail::scan_list(
+
652  in,
+
653  [offset = 0, l = block](std::istream& in) mutable {
+
654  if constexpr (is_complex<ScalarType>) {
+
655  detail::scan_complex(in, l[offset++]);
+
656  } else {
+
657  in >> l[offset++];
+
658  }
+
659  },
+
660  '[',
+
661  ']'
+
662  );
+
663  },
+
664  '{',
+
665  '}'
+
666  );
+
667  }
+
668  detail::ignore_until(in, '}');
+
669  return in;
+
670  }
+
671 
+
672  template<typename ScalarType, typename Symmetry, typename Name>
+
673  std::string Tensor<ScalarType, Symmetry, Name>::show() const {
+
674  detail::basic_outstringstream<char> out;
+
675  out << *this;
+
676  return std::move(out).str();
+
677  }
+
678 
+
679  // tensor bin out
+
680  inline timer tensor_dump_guard("tensor_dump");
+
681 
+
682  template<
+
683  typename ScalarType,
+
684  typename Symmetry,
+
685  typename Name,
+
686  typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
+
687  std::ostream& operator<(std::ostream& out, const Tensor<ScalarType, Symmetry, Name>& tensor) {
+
688  auto timer_guard = tensor_dump_guard();
+
689  out << 'T' << 'A' << 'T';
+
690  Rank version = 1;
+
691  out < version;
+
692  out < tensor.names();
+
693  out < tensor.edges();
+
694  out < tensor.storage();
+
695  return out;
+
696  }
+
697 
+
698  template<typename ScalarType, typename Symmetry, typename Name>
+
699  std::string Tensor<ScalarType, Symmetry, Name>::dump() const {
+
700  detail::basic_outstringstream<char> out;
+
701  out < *this;
+
702  return std::move(out).str();
+
703  }
+
704 
+
705  // tensor bin in
+
706  inline timer tensor_load_guard("tensor_load");
+
707 
+
708  template<
+
709  typename ScalarType,
+
710  typename Symmetry,
+
711  typename Name,
+
712  typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
+
713  std::istream& operator>(std::istream& in, Tensor<ScalarType, Symmetry, Name>& tensor) {
+
714  auto timer_guard = tensor_load_guard();
+
715  Rank version = 0;
+
716  if (in.get() == 'T') {
+
717  if (in.get() == 'A') {
+
718  if (in.get() == 'T') {
+
719  in > version;
+
720  } else {
+
721  in.unget();
+
722  in.unget();
+
723  in.unget();
+
724  version = 0;
+
725  }
+
726  } else {
+
727  in.unget();
+
728  in.unget();
+
729  version = 0;
+
730  }
+
731  } else {
+
732  in.unget();
+
733  version = 0;
+
734  }
+
735  if (version == 0) {
+
736  std::vector<Name> names;
+
737  in > names;
+
738  std::vector<Edge<Symmetry>> edges;
+
739  in > edges;
+
740  tensor = Tensor<ScalarType, Symmetry, Name>(std::move(names), std::move(edges));
+
741  in > tensor.storage();
+
742  tensor._block_order_v0_to_v1();
+
743  } else if (version == 1) {
+
744  std::vector<Name> names;
+
745  in > names;
+
746  std::vector<Edge<Symmetry>> edges;
+
747  in > edges;
+
748  tensor = Tensor<ScalarType, Symmetry, Name>(std::move(names), std::move(edges));
+
749  in > tensor.storage();
+
750  }
+
751  return in;
+
752  }
+
753 
+
754  template<typename ScalarType, typename Symmetry, typename Name>
+
755  Tensor<ScalarType, Symmetry, Name>& Tensor<ScalarType, Symmetry, Name>::load(const std::string& input) & {
+
756  detail::basic_instringstream<char> in(input);
+
757  in > *this;
+
758  return *this;
+
759  }
+
760 
+
761  // binary io move
+
762 
+
763  template<typename T>
+
764  std::istream&& operator>(std::istream&& in, T& v) {
+
765  in > v;
+
766  return std::move(in);
+
767  }
+
768  template<typename T>
+
769  std::ostream&& operator<(std::ostream&& out, const T& v) {
+
770  out < v;
+
771  return std::move(out);
+
772  }
+
773 } // namespace TAT
+
774 #endif
+
FastName as tensor edge name.
Definition: name.hpp:39
+
TAT is A Tensor library.
Definition: clear_symmetry.hpp:28
+
std::uint64_t Size
Tensor content data size, or dimension size type.
Definition: common_variable.hpp:157
+
std::uint16_t Rank
Tensor rank type.
Definition: common_variable.hpp:149
+
const char * version
TAT version.
Definition: common_variable.hpp:45
+
Name type also need input and output method.
Definition: name.hpp:196
+
A type control console color.
Definition: io.hpp:514
+
+
+ + + + diff --git a/jquery.js b/jquery.js new file mode 100644 index 000000000..103c32d79 --- /dev/null +++ b/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/menu.js b/menu.js new file mode 100644 index 000000000..2fe2214f2 --- /dev/null +++ b/menu.js @@ -0,0 +1,51 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/menudata.js b/menudata.js new file mode 100644 index 000000000..6d6ce0f25 --- /dev/null +++ b/menudata.js @@ -0,0 +1,86 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Namespaces",url:"namespaces.html",children:[ +{text:"Namespace List",url:"namespaces.html"}, +{text:"Namespace Members",url:"namespacemembers.html",children:[ +{text:"All",url:"namespacemembers.html"}, +{text:"Functions",url:"namespacemembers_func.html"}, +{text:"Variables",url:"namespacemembers_vars.html"}, +{text:"Typedefs",url:"namespacemembers_type.html"}]}]}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"_",url:"functions.html#index__5F"}, +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions.html#index_b"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"e",url:"functions.html#index_e"}, +{text:"g",url:"functions.html#index_g"}, +{text:"h",url:"functions.html#index_h"}, +{text:"i",url:"functions.html#index_i"}, +{text:"l",url:"functions.html#index_l"}, +{text:"m",url:"functions.html#index_m"}, +{text:"n",url:"functions.html#index_n"}, +{text:"o",url:"functions.html#index_o"}, +{text:"p",url:"functions.html#index_p"}, +{text:"q",url:"functions.html#index_q"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"u",url:"functions.html#index_u"}, +{text:"v",url:"functions.html#index_v"}, +{text:"w",url:"functions.html#index_w"}, +{text:"z",url:"functions.html#index_z"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"_",url:"functions_func.html#index__5F"}, +{text:"a",url:"functions_func.html#index_a"}, +{text:"b",url:"functions_func.html#index_b"}, +{text:"c",url:"functions_func.html#index_c"}, +{text:"d",url:"functions_func.html#index_d"}, +{text:"e",url:"functions_func.html#index_e"}, +{text:"g",url:"functions_func.html#index_g"}, +{text:"h",url:"functions_func.html#index_h"}, +{text:"i",url:"functions_func.html#index_i"}, +{text:"l",url:"functions_func.html#index_l"}, +{text:"m",url:"functions_func.html#index_m"}, +{text:"n",url:"functions_func.html#index_n"}, +{text:"o",url:"functions_func.html#index_o"}, +{text:"p",url:"functions_func.html#index_p"}, +{text:"q",url:"functions_func.html#index_q"}, +{text:"r",url:"functions_func.html#index_r"}, +{text:"s",url:"functions_func.html#index_s"}, +{text:"t",url:"functions_func.html#index_t"}, +{text:"u",url:"functions_func.html#index_u"}, +{text:"v",url:"functions_func.html#index_v"}, +{text:"w",url:"functions_func.html#index_w"}, +{text:"z",url:"functions_func.html#index_z"}]}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/mpi_8hpp.html b/mpi_8hpp.html new file mode 100644 index 000000000..63ce35364 --- /dev/null +++ b/mpi_8hpp.html @@ -0,0 +1,170 @@ + + + + + + + +TAT: include/TAT/miscellaneous/mpi.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    mpi.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <iostream>
    +#include <sstream>
    +#include <stdexcept>
    +#include "../utility/timer.hpp"
    +#include "io.hpp"
    +#include <mpi.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + +

    +Classes

    struct  TAT::mpi_one_output_stream
     Wrapper for ostream, the stream will only output in the rank which is specified when creating. More...
     
    struct  TAT::mpi_rank_output_stream
     Wrapper for ostream, the stream will output the rank which is psecified when creating. More...
     
    struct  TAT::mpi_t
     MPI handler type. More...
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + +

    +Typedefs

    +template<typename T >
    using TAT::detail::serializable_helper = std::pair< decltype(std::declval< std::ostream & >()< std::declval< const T & >()), decltype(std::declval< std::istream & >() > std::declval< T & >())>
     
    + + + + + + + + + + + + + + +

    +Variables

    +template<typename T >
    constexpr bool TAT::serializable = is_detected_v<detail::serializable_helper, T>
     
    +timer TAT::mpi_send_guard ("mpi_send")
     
    +timer TAT::mpi_receive_guard ("mpi_receive")
     
    +timer TAT::mpi_broadcast_guard ("mpi_broadcast")
     
    +timer TAT::mpi_reduce_guard ("mpi_reduce")
     
    +mpi_t TAT::mpi
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/mpi_8hpp.js b/mpi_8hpp.js new file mode 100644 index 000000000..838f55173 --- /dev/null +++ b/mpi_8hpp.js @@ -0,0 +1,14 @@ +var mpi_8hpp = +[ + [ "mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html", "structTAT_1_1mpi__one__output__stream" ], + [ "mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html", "structTAT_1_1mpi__rank__output__stream" ], + [ "mpi_t", "structTAT_1_1mpi__t.html", "structTAT_1_1mpi__t" ], + [ "TAT_MPI_HPP", "mpi_8hpp.html#a7412048edc41b6032ae34364b389d9d9", null ], + [ "serializable_helper", "mpi_8hpp.html#a2f1434e47d9415ee79ec0d78d1c6bf67", null ], + [ "mpi", "mpi_8hpp.html#a8023345bfaa3e140a1b117a7aa5244d9", null ], + [ "mpi_broadcast_guard", "mpi_8hpp.html#a32aa0eb030296986f9bec7061cefa186", null ], + [ "mpi_receive_guard", "mpi_8hpp.html#a38c255827ff7f4da9fb3928f96a5c743", null ], + [ "mpi_reduce_guard", "mpi_8hpp.html#a013442988c8b371b846db565f525a615", null ], + [ "mpi_send_guard", "mpi_8hpp.html#afb0b2dd4c1e61c2be89bebcfecbdf4a5", null ], + [ "serializable", "mpi_8hpp.html#a4d4ea72f38e5a29f0b74ce0d3ee27bfd", null ] +]; \ No newline at end of file diff --git a/mpi_8hpp_source.html b/mpi_8hpp_source.html new file mode 100644 index 000000000..3c9bc2ec7 --- /dev/null +++ b/mpi_8hpp_source.html @@ -0,0 +1,389 @@ + + + + + + + +TAT: include/TAT/miscellaneous/mpi.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    mpi.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_MPI_HPP
    +
    22 #define TAT_MPI_HPP
    +
    23 
    +
    24 #include <iostream>
    +
    25 #include <sstream>
    +
    26 #include <stdexcept>
    +
    27 
    +
    28 #include "../utility/timer.hpp"
    +
    29 #include "io.hpp"
    +
    30 
    +
    31 #ifdef TAT_USE_MPI
    +
    32 // Can not use extern "C" here, since some version of mpi will detect macro __cplusplus
    +
    33 // and then it will declare some c++ function, and this macro cannot be mask
    +
    34 #include <mpi.h>
    +
    35 #endif
    +
    36 
    +
    37 #ifdef _WIN32
    +
    38 // windows.h will define macro min and max by default which is annoying
    +
    39 #define NOMINMAX
    +
    40 #include <windows.h>
    +
    41 #endif
    +
    42 
    +
    43 namespace TAT {
    + +
    48  std::ostream& out;
    +
    49  bool valid;
    +
    50  std::ostringstream string;
    + +
    52  out << string.str() << std::flush;
    +
    53  }
    +
    54  mpi_one_output_stream(std::ostream& out, bool valid) : out(out), valid(valid) { }
    +
    55 
    +
    56  template<typename Type>
    +
    57  mpi_one_output_stream& operator<<(const Type& value) & {
    +
    58  if (valid) {
    +
    59  string << value;
    +
    60  }
    +
    61  return *this;
    +
    62  }
    +
    63 
    +
    64  template<typename Type>
    +
    65  mpi_one_output_stream&& operator<<(const Type& value) && {
    +
    66  if (valid) {
    +
    67  string << value;
    +
    68  }
    +
    69  return std::move(*this);
    +
    70  }
    +
    71  };
    +
    72 
    + +
    77  std::ostream& out;
    +
    78  std::ostringstream string;
    + +
    80  out << string.str() << std::flush;
    +
    81  }
    +
    82  mpi_rank_output_stream(std::ostream& out, int rank) : out(out) {
    +
    83  if (rank != -1) {
    +
    84  string << "[rank " << rank << "] ";
    +
    85  }
    +
    86  }
    +
    87 
    +
    88  template<typename Type>
    +
    89  mpi_rank_output_stream& operator<<(const Type& value) & {
    +
    90  string << value;
    +
    91  return *this;
    +
    92  }
    +
    93 
    +
    94  template<typename Type>
    +
    95  mpi_rank_output_stream&& operator<<(const Type& value) && {
    +
    96  string << value;
    +
    97  return std::move(*this);
    +
    98  }
    +
    99  };
    +
    100 
    +
    101  namespace detail {
    +
    102  template<typename T>
    +
    103  using serializable_helper = std::
    +
    104  pair<decltype(std::declval<std::ostream&>() < std::declval<const T&>()), decltype(std::declval<std::istream&>() > std::declval<T&>())>;
    +
    105  } // namespace detail
    +
    106  template<typename T>
    +
    107  constexpr bool serializable = is_detected_v<detail::serializable_helper, T>;
    +
    108 
    +
    109  inline timer mpi_send_guard("mpi_send");
    +
    110  inline timer mpi_receive_guard("mpi_receive");
    +
    111  inline timer mpi_broadcast_guard("mpi_broadcast");
    +
    112  inline timer mpi_reduce_guard("mpi_reduce");
    +
    113 
    +
    122  struct mpi_t {
    +
    123  int size = 1;
    +
    124  int rank = 0;
    +
    125 #ifdef TAT_USE_MPI
    +
    126  static constexpr bool enabled = true;
    +
    127 #else
    +
    128  static constexpr bool enabled = false;
    +
    129 #endif
    +
    130 #ifdef TAT_USE_MPI
    +
    131  static bool initialized() {
    +
    132  int result;
    +
    133  MPI_Initialized(&result);
    +
    134  return result;
    +
    135  }
    +
    136  static bool finalized() {
    +
    137  int result;
    +
    138  MPI_Finalized(&result);
    +
    139  return result;
    +
    140  }
    +
    141  mpi_t() {
    +
    142  if (!initialized()) {
    +
    143  MPI_Init(nullptr, nullptr);
    +
    144  }
    +
    145  MPI_Comm_size(MPI_COMM_WORLD, &size);
    +
    146  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    +
    147  }
    +
    148  ~mpi_t() {
    +
    149  if (!finalized()) {
    +
    150  MPI_Finalize();
    +
    151  }
    +
    152  }
    +
    153 
    +
    154  static void barrier() {
    +
    155  MPI_Barrier(MPI_COMM_WORLD);
    +
    156  }
    +
    157 
    +
    158  static constexpr int mpi_tag = 0;
    +
    159 
    +
    160  template<typename Type, typename = std::enable_if_t<serializable<Type>>>
    +
    161  static void send(const Type& value, const int destination) {
    +
    162  auto timer_guard = mpi_send_guard();
    +
    163  detail::basic_outstringstream<char> stream;
    +
    164  stream < value;
    +
    165  auto data = std::move(stream).str();
    +
    166  MPI_Send(data.data(), data.length(), MPI_BYTE, destination, mpi_tag, MPI_COMM_WORLD);
    +
    167  }
    +
    168 
    +
    169  template<typename Type, typename = std::enable_if_t<serializable<Type>>>
    +
    170  static Type receive(const int source) {
    +
    171  auto timer_guard = mpi_receive_guard();
    +
    172  auto status = MPI_Status();
    +
    173  MPI_Probe(source, mpi_tag, MPI_COMM_WORLD, &status);
    +
    174  int length;
    +
    175  MPI_Get_count(&status, MPI_BYTE, &length);
    +
    176  auto data = std::string();
    +
    177  data.resize(length);
    +
    178  MPI_Recv(data.data(), length, MPI_BYTE, source, mpi_tag, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
    +
    179  detail::basic_instringstream<char> stream(data);
    +
    180  auto result = Type();
    +
    181  stream > result;
    +
    182  return result;
    +
    183  }
    +
    184 
    +
    185  template<typename Type, typename = std::enable_if_t<serializable<Type>>>
    +
    186  Type send_receive(const Type& value, const int source, const int destination) const {
    +
    187  if (rank == source) {
    +
    188  send(value, destination);
    +
    189  }
    +
    190  if (rank == destination) {
    +
    191  return receive<Type>(source);
    +
    192  }
    +
    193  return Type();
    +
    194  }
    +
    195 
    +
    196  template<typename Type, typename = std::enable_if_t<serializable<Type>>>
    +
    197  Type broadcast(const Type& value, const int root) const {
    +
    198  auto timer_guard = mpi_broadcast_guard();
    +
    199  if (size == 1) {
    +
    200  return value;
    +
    201  }
    +
    202  // there is many time wasted in mpi communication so there is no constexpr if here again
    +
    203  if (0 > root || root >= size) {
    +
    204  detail::error("Invalid root rank when mpi broadcast");
    +
    205  }
    +
    206  const auto this_fake_rank = (size + rank - root) % size;
    +
    207  Type result;
    +
    208  // get from father
    +
    209  if (this_fake_rank != 0) {
    +
    210  const auto father_fake_rank = (this_fake_rank - 1) / 2;
    +
    211  const auto father_real_rank = (father_fake_rank + root) % size;
    +
    212  result = receive<Type>(father_real_rank);
    +
    213  } else {
    +
    214  // if itself is root, copy the value
    +
    215  result = value;
    +
    216  }
    +
    217  // send to son
    +
    218  const auto left_son_fake_rank = this_fake_rank * 2 + 1;
    +
    219  const auto right_son_fake_rank = this_fake_rank * 2 + 2;
    +
    220  if (left_son_fake_rank < size) {
    +
    221  const auto left_son_real_rank = (left_son_fake_rank + root) % size;
    +
    222  send(result, left_son_real_rank);
    +
    223  }
    +
    224  if (right_son_fake_rank < size) {
    +
    225  const auto right_son_real_rank = (right_son_fake_rank + root) % size;
    +
    226  send(result, right_son_real_rank);
    +
    227  }
    +
    228  return result;
    +
    229  }
    +
    230 
    +
    231  template<typename Type, typename Func, typename = std::enable_if_t<serializable<Type> && std::is_invocable_r_v<Type, Func, Type, Type>>>
    +
    232  Type reduce(const Type& value, const int root, Func&& function) const {
    +
    233  auto timer_guard = mpi_reduce_guard();
    +
    234  if (size == 1) {
    +
    235  return value;
    +
    236  }
    +
    237  if (0 > root || root >= size) {
    +
    238  detail::error("Invalid root rank when mpi reduce");
    +
    239  }
    +
    240  const auto this_fake_rank = (size + rank - root) % size;
    +
    241  Type result;
    +
    242  // get from son
    +
    243  const auto left_son_fake_rank = this_fake_rank * 2 + 1;
    +
    244  const auto right_son_fake_rank = this_fake_rank * 2 + 2;
    +
    245  if (left_son_fake_rank < size) {
    +
    246  const auto left_son_real_rank = (left_son_fake_rank + root) % size;
    +
    247  result = function(value, receive<Type>(left_son_real_rank));
    +
    248  }
    +
    249  if (right_son_fake_rank < size) {
    +
    250  const auto right_son_real_rank = (right_son_fake_rank + root) % size;
    +
    251  // if left son does not exist, then right son does not exist definitely
    +
    252  // so it does not need to check validity of result
    +
    253  result = function(result, receive<Type>(right_son_real_rank));
    +
    254  }
    +
    255  // pass to father
    +
    256  if (this_fake_rank != 0) {
    +
    257  const auto father_fake_rank = (this_fake_rank - 1) / 2;
    +
    258  const auto father_real_rank = (father_fake_rank + root) % size;
    +
    259  if (left_son_fake_rank < size) {
    +
    260  send(result, father_real_rank);
    +
    261  } else {
    +
    262  send(value, father_real_rank);
    +
    263  }
    +
    264  }
    +
    265  return result;
    +
    266  }
    +
    267 #endif
    +
    268  auto out_one(int rank_specified = 0) {
    +
    269  return mpi_one_output_stream(std::cout, rank_specified == rank);
    +
    270  }
    +
    271  auto log_one(int rank_specified = 0) {
    +
    272  return mpi_one_output_stream(std::clog, rank_specified == rank);
    +
    273  }
    +
    274  auto err_one(int rank_specified = 0) {
    +
    275  return mpi_one_output_stream(std::cerr, rank_specified == rank);
    +
    276  }
    +
    277 
    +
    278  auto out_rank() {
    +
    279  return mpi_rank_output_stream(std::cout, size == 1 ? -1 : rank);
    +
    280  }
    +
    281  auto log_rank() {
    +
    282  return mpi_rank_output_stream(std::clog, size == 1 ? -1 : rank);
    +
    283  }
    +
    284  auto err_rank() {
    +
    285  return mpi_rank_output_stream(std::cerr, size == 1 ? -1 : rank);
    +
    286  }
    +
    287  };
    +
    288  inline mpi_t mpi;
    +
    289 
    +
    290  inline detail::evil_t::evil_t() {
    +
    291 #ifdef _WIN32
    +
    292  HANDLE output_handle = GetStdHandle(STD_OUTPUT_HANDLE);
    +
    293  DWORD output_mode = 0;
    +
    294  GetConsoleMode(output_handle, &output_mode);
    +
    295  SetConsoleMode(output_handle, output_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
    +
    296  HANDLE error_handle = GetStdHandle(STD_ERROR_HANDLE);
    +
    297  DWORD error_mode = 0;
    +
    298  GetConsoleMode(error_handle, &error_mode);
    +
    299  SetConsoleMode(error_handle, error_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
    +
    300 #endif
    +
    301  }
    +
    302  inline detail::evil_t::~evil_t() { }
    +
    303 
    +
    304  inline void detail::log(const char* message) {
    +
    305  mpi.log_rank() << console_yellow << message << console_origin << '\n';
    +
    306  }
    +
    307 
    +
    308  inline void detail::warning(const char* message) {
    +
    309  mpi.err_rank() << console_red << message << console_origin << '\n';
    +
    310  }
    +
    311 
    +
    312  inline void detail::error(const char* message) {
    +
    313  throw std::runtime_error(message);
    +
    314  }
    +
    315 } // namespace TAT
    +
    316 #endif
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    Wrapper for ostream, the stream will only output in the rank which is specified when creating.
    Definition: mpi.hpp:47
    +
    Wrapper for ostream, the stream will output the rank which is psecified when creating.
    Definition: mpi.hpp:76
    +
    MPI handler type.
    Definition: mpi.hpp:122
    +
    +
    + + + + diff --git a/multidimension__span_8hpp.html b/multidimension__span_8hpp.html new file mode 100644 index 000000000..2c1de8b07 --- /dev/null +++ b/multidimension__span_8hpp.html @@ -0,0 +1,156 @@ + + + + + + + +TAT: include/TAT/utility/multidimension_span.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    multidimension_span.hpp File Reference
    +
    +
    + +

    Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <array>
    +#include <vector>
    +#include "common_variable.hpp"
    +#include "const_integral.hpp"
    +#include "timer.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Classes

    class  TAT::mdspan< T, U >
     
    struct  TAT::mdspan< T, U >::iterator_general< is_const >
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + + +

    +Functions

    +template<typename T1 , typename T2 , typename Vector , typename Func , typename LastSize = int>
    void TAT::detail::mdspan_transform_kernel (const T1 *__restrict source, T2 *__restrict destination, const Vector &dimensions, const Vector &leadings_source, const Vector &leadings_destination, Func &&func, const LastSize last_size=0)
     
    +template<typename T1 , typename T2 , typename U1 , typename U2 , typename Func >
    void TAT::mdspan_transform (const mdspan< T1, U1 > &source, mdspan< T2, U2 > &destination, Func &&func)
     
    +template<typename Vector = std::vector<Size>, typename T >
    void TAT::matrix_transpose (Size m, Size n, const T *source, T *destination)
     
    + + + +

    +Variables

    +timer TAT::transform_kernel_guard ("transform_kernel")
     
    +

    Detailed Description

    +

    Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/multidimension__span_8hpp.js b/multidimension__span_8hpp.js new file mode 100644 index 000000000..25ef828a7 --- /dev/null +++ b/multidimension__span_8hpp.js @@ -0,0 +1,10 @@ +var multidimension__span_8hpp = +[ + [ "mdspan", "classTAT_1_1mdspan.html", "classTAT_1_1mdspan" ], + [ "iterator_general", "structTAT_1_1mdspan_1_1iterator__general.html", "structTAT_1_1mdspan_1_1iterator__general" ], + [ "TAT_MULTIDIMENSION_SPAN_HPP", "multidimension__span_8hpp.html#aba823dc3df8cacc96390c8d62453699d", null ], + [ "matrix_transpose", "multidimension__span_8hpp.html#a2e680ac079273e89f0121721bb3d2c9e", null ], + [ "mdspan_transform", "multidimension__span_8hpp.html#a91bebe488e9813387cff45103860cfc4", null ], + [ "mdspan_transform_kernel", "multidimension__span_8hpp.html#ab6cbfc6155e87282231bbd1b51030e74", null ], + [ "transform_kernel_guard", "multidimension__span_8hpp.html#a60595d7f51c84fb44e614d26e4d83a39", null ] +]; \ No newline at end of file diff --git a/multidimension__span_8hpp_source.html b/multidimension__span_8hpp_source.html new file mode 100644 index 000000000..cc28a2438 --- /dev/null +++ b/multidimension__span_8hpp_source.html @@ -0,0 +1,480 @@ + + + + + + + +TAT: include/TAT/utility/multidimension_span.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    multidimension_span.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_MULTIDIMENSION_SPAN_HPP
    +
    22 #define TAT_MULTIDIMENSION_SPAN_HPP
    +
    23 
    +
    24 #include <array>
    +
    25 #include <vector>
    +
    26 
    +
    27 #include "common_variable.hpp"
    +
    28 #include "const_integral.hpp"
    +
    29 #include "timer.hpp"
    +
    30 
    +
    31 namespace TAT {
    +
    32  template<typename T, typename U = std::vector<Size>>
    +
    33  class mdspan {
    +
    34  // data is const when
    +
    35  // const mdspan, const T
    +
    36  // const mdspan, T
    +
    37  // mdspan, const T
    +
    38  // data is not const only when
    +
    39  // mdspan, T
    +
    40 
    +
    41  using vector_t = U; // used to present indices
    +
    42  using self_t = mdspan<T, U>;
    +
    43 
    +
    44  public:
    +
    45  template<bool is_const>
    +
    46  struct iterator_general;
    + + +
    49  friend const_iterator;
    +
    50  friend iterator;
    +
    51 
    +
    52  private:
    +
    53  T* m_data;
    +
    54  const Rank m_rank;
    +
    55  const Size m_size;
    +
    56  const vector_t m_leadings;
    +
    57  const vector_t m_dimensions;
    +
    58 
    +
    59  public:
    +
    60  Rank rank() const {
    +
    61  return m_rank;
    +
    62  }
    +
    63  Size size() const {
    +
    64  return m_size;
    +
    65  }
    +
    66  const vector_t& leadings() const {
    +
    67  return m_leadings;
    +
    68  }
    +
    69  const vector_t& dimensions() const {
    +
    70  return m_dimensions;
    +
    71  }
    +
    72  Size leadings(Rank i) const {
    +
    73  return m_leadings[i];
    +
    74  }
    +
    75  Size dimensions(Rank i) const {
    +
    76  return m_dimensions[i];
    +
    77  }
    +
    78  T* data() {
    +
    79  return m_data;
    +
    80  }
    +
    81  const T* data() const {
    +
    82  return m_data;
    +
    83  }
    +
    84  void set_data(T* pointer) {
    +
    85  m_data = pointer;
    +
    86  }
    +
    87 
    +
    88  private:
    +
    89  static vector_t contiguous_leadings(const vector_t& dimension) {
    +
    90  auto rank = dimension.size();
    +
    91  auto result = vector_t(rank);
    +
    92  for (auto i = rank; i-- > 0;) {
    +
    93  if (i == rank - 1) {
    +
    94  result[i] = 1;
    +
    95  } else {
    +
    96  result[i] = result[i + 1] * dimension[i + 1];
    +
    97  }
    +
    98  }
    +
    99  return result;
    +
    100  }
    +
    101  static Size get_size(const vector_t& dimension) {
    +
    102  Size size = 1;
    +
    103  for (const auto& i : dimension) {
    +
    104  size *= i;
    +
    105  }
    +
    106  return size;
    +
    107  }
    +
    108 
    +
    109  public:
    +
    110  mdspan(T* pointer, vector_t input_dimensions, vector_t input_leadings) :
    +
    111  m_data(pointer),
    +
    112  m_rank(input_dimensions.size()),
    +
    113  m_size(get_size(input_dimensions)),
    +
    114  m_leadings(std::move(input_leadings)),
    +
    115  m_dimensions(std::move(input_dimensions)) { }
    +
    116  mdspan(T* pointer, vector_t ds) :
    +
    117  m_data(pointer),
    +
    118  m_rank(ds.size()),
    +
    119  m_size(get_size(ds)),
    +
    120  m_leadings(contiguous_leadings(ds)),
    +
    121  m_dimensions(std::move(ds)) { }
    +
    122 
    +
    123  private:
    +
    124  template<typename Vector>
    +
    125  Size get_offset(const Vector& indices) const {
    +
    126  Size offset = 0;
    +
    127  for (auto i = 0; i < rank(); i++) {
    +
    128  offset += indices[i] * leadings(i);
    +
    129  }
    +
    130  return offset;
    +
    131  }
    +
    132  public:
    +
    133  template<typename Vector = vector_t>
    +
    134  const T& at(const Vector& indices) const {
    +
    135  return data()[get_offset(indices)];
    +
    136  }
    +
    137  template<typename Vector = vector_t>
    +
    138  T& at(const Vector& indices) {
    +
    139  return data()[get_offset(indices)];
    +
    140  }
    +
    141 
    +
    142  public:
    +
    143  template<bool is_const>
    + +
    145  private:
    +
    146  template<typename Y>
    +
    147  using maybe_const = std::conditional_t<is_const, const Y, Y>;
    +
    148 
    +
    149  public:
    +
    150  maybe_const<self_t>* owner;
    +
    151  Size offset;
    +
    152  bool valid;
    +
    153  vector_t indices;
    +
    154 
    +
    155  iterator_general(maybe_const<self_t>* owner, Size offset, bool valid, vector_t indices) :
    +
    156  owner(owner),
    +
    157  offset(offset),
    +
    158  valid(valid),
    +
    159  indices(std::move(indices)) { }
    +
    160 
    +
    161  maybe_const<T>& operator*() const {
    +
    162  return owner->data()[offset];
    +
    163  }
    +
    164  maybe_const<T>* operator->() const {
    +
    165  return &owner->data()[offset];
    +
    166  }
    +
    167 
    +
    168  iterator_general& operator++() {
    +
    169  Rank current = owner->rank();
    +
    170  while (true) {
    +
    171  if (current-- == 0) {
    +
    172  valid = false;
    +
    173  return *this;
    +
    174  }
    +
    175  Size dimension = owner->dimensions(current);
    +
    176  Size leading = owner->leadings(current);
    +
    177  offset += leading;
    +
    178  ++indices[current];
    +
    179  if (indices[current] != dimension) {
    +
    180  break;
    +
    181  }
    +
    182  indices[current] = 0;
    +
    183  offset -= dimension * leading;
    +
    184  }
    +
    185  return *this;
    +
    186  }
    +
    187 
    +
    188  bool operator==(const iterator_general<is_const>& other) const {
    +
    189  return (owner == other.owner) && ((!valid && !other.valid) || (valid && other.valid && offset == other.offset));
    +
    190  }
    +
    191  bool operator!=(const iterator_general<is_const>& other) const {
    +
    192  return !(*this == other);
    +
    193  }
    +
    194  };
    +
    195 
    +
    196  public:
    +
    197  const_iterator begin() const {
    +
    198  if (size() != 0) {
    +
    199  return const_iterator(this, 0, true, vector_t(rank(), 0));
    +
    200  } else {
    +
    201  return const_iterator(this, 0, false, vector_t(rank(), 0));
    +
    202  }
    +
    203  }
    +
    204 
    +
    205  const_iterator end() const {
    +
    206  return const_iterator(this, 0, false, vector_t(rank(), 0));
    +
    207  }
    +
    208 
    +
    209  iterator begin() {
    +
    210  if (size() != 0) {
    +
    211  return iterator(this, 0, true, vector_t(rank(), 0));
    +
    212  } else {
    +
    213  return iterator(this, 0, false, vector_t(rank(), 0));
    +
    214  }
    +
    215  }
    +
    216 
    +
    217  iterator end() {
    +
    218  return iterator(this, 0, false, vector_t(rank(), 0));
    +
    219  }
    +
    220 
    +
    221  public:
    +
    222  template<typename Vector = vector_t>
    +
    223  mdspan<T, U> transpose(const Vector& plan) {
    +
    224  vector_t new_dimensions(rank());
    +
    225  vector_t new_leadings(rank());
    +
    226  for (auto i = 0; i < rank(); i++) {
    +
    227  new_dimensions[i] = dimensions(plan[i]);
    +
    228  new_leadings[i] = leadings(plan[i]);
    +
    229  }
    +
    230  return mdspan<T, U>(data(), std::move(new_dimensions), std::move(new_leadings));
    +
    231  }
    +
    232  template<typename Vector = vector_t>
    +
    233  mdspan<const T, U> transpose(const Vector& plan) const {
    +
    234  vector_t new_dimensions(rank());
    +
    235  vector_t new_leadings(rank());
    +
    236  for (auto i = 0; i < rank(); i++) {
    +
    237  new_dimensions[i] = dimensions(plan[i]);
    +
    238  new_leadings[i] = leadings(plan[i]);
    +
    239  }
    +
    240  return mdspan<const T, U>(data(), std::move(new_dimensions), std::move(new_leadings));
    +
    241  }
    +
    242  };
    +
    243 
    +
    244  inline timer transform_kernel_guard("transform_kernel");
    +
    245 
    +
    246  namespace detail {
    +
    247  template<typename T1, typename T2, typename Vector, typename Func, typename LastSize = int>
    +
    248  void mdspan_transform_kernel(
    +
    249  const T1* __restrict source,
    +
    250  T2* __restrict destination,
    +
    251  const Vector& dimensions,
    +
    252  const Vector& leadings_source,
    +
    253  const Vector& leadings_destination,
    +
    254  Func&& func,
    +
    255  const LastSize last_size = 0
    +
    256  ) {
    +
    257  auto kernel_guard = transform_kernel_guard();
    +
    258  constexpr bool loop_last = !std::is_same_v<LastSize, int>; // not int -> last_size specified.
    +
    259  const Rank rank = dimensions.size();
    +
    260  auto indices = Vector(rank, 0);
    +
    261  // if size = 0, program won't call this function
    +
    262  while (true) {
    +
    263  if constexpr (loop_last) {
    +
    264  for (auto i = 0; i < last_size.value(); i++) {
    +
    265  *destination++ = func(*source++);
    +
    266  }
    +
    267  indices.back() = dimensions.back() - 1;
    +
    268  --source;
    +
    269  --destination;
    +
    270  } else {
    +
    271  *destination = func(*source);
    +
    272  }
    +
    273  Rank current = rank;
    +
    274  while (true) {
    +
    275  if (current-- == 0) {
    +
    276  return;
    +
    277  }
    +
    278  Size dimension = dimensions[current];
    +
    279  Size leading_source = leadings_source[current];
    +
    280  Size leading_destination = leadings_destination[current];
    +
    281  source += leading_source;
    +
    282  destination += leading_destination;
    +
    283  ++indices[current];
    +
    284  if (indices[current] != dimension) {
    +
    285  break;
    +
    286  }
    +
    287  indices[current] = 0;
    +
    288  source -= leading_source * dimension;
    +
    289  destination -= leading_destination * dimension;
    +
    290  }
    +
    291  }
    +
    292  }
    +
    293  } // namespace detail
    +
    294  template<typename T1, typename T2, typename U1, typename U2, typename Func>
    +
    295  void mdspan_transform(const mdspan<T1, U1>& source, mdspan<T2, U2>& destination, Func&& func) {
    +
    296  if constexpr (debug_mode) {
    +
    297  if (!std::equal(
    +
    298  source.dimensions().begin(),
    +
    299  source.dimensions().end(),
    +
    300  destination.dimensions().begin(),
    +
    301  destination.dimensions().end()
    +
    302  )) {
    +
    303  detail::error("transform data between mdspan where dimension are not the same");
    +
    304  }
    +
    305  }
    +
    306  if (destination.size() == 0) {
    +
    307  return;
    +
    308  }
    +
    309  if (destination.size() == 1) {
    +
    310  *destination.data() = func(*source.data());
    +
    311  return;
    +
    312  }
    +
    313 
    +
    314  auto rank = destination.rank();
    +
    315  auto result_dimensions = U2();
    +
    316  auto result_leadings_destination = U2();
    +
    317  auto result_leadings_source = U2();
    +
    318  result_dimensions.reserve(rank);
    +
    319  result_leadings_destination.reserve(rank);
    +
    320  result_leadings_source.reserve(rank);
    +
    321  // Remove all dimension=1 edge and squash leading squashable edges.
    +
    322  // There is at least one non-1 dimension edge
    +
    323  Size dimension = 0;
    +
    324  Size leading_destination = 0;
    +
    325  Size leading_source = 0;
    +
    326  for (auto current = 0; current < rank; current++) {
    +
    327  auto dimension_current = destination.dimensions(current);
    +
    328  auto leading_destination_current = destination.leadings(current);
    +
    329  auto leading_source_current = source.leadings(current);
    +
    330  if (dimension_current == 1) {
    +
    331  continue;
    +
    332  }
    +
    333  if ((leading_destination == dimension_current * leading_destination_current) &&
    +
    334  (leading_source == dimension_current * leading_source_current)) {
    +
    335  dimension *= dimension_current;
    +
    336  leading_destination = leading_destination_current;
    +
    337  leading_source = leading_source_current;
    +
    338  continue;
    +
    339  }
    +
    340  if (dimension != 0) {
    +
    341  result_dimensions.push_back(dimension);
    +
    342  result_leadings_destination.push_back(leading_destination);
    +
    343  result_leadings_source.push_back(leading_source);
    +
    344  }
    +
    345  dimension = dimension_current;
    +
    346  leading_destination = leading_destination_current;
    +
    347  leading_source = leading_source_current;
    +
    348  }
    +
    349  result_dimensions.push_back(dimension);
    +
    350  result_leadings_destination.push_back(leading_destination);
    +
    351  result_leadings_source.push_back(leading_source);
    +
    352 
    +
    353  if (result_leadings_destination.back() == 1 && result_leadings_source.back() == 1) {
    +
    354  Size line_size = result_dimensions.back();
    +
    355  std::visit(
    +
    356  [&](const auto& const_line_size) {
    +
    357  detail::mdspan_transform_kernel(
    +
    358  source.data(),
    +
    359  destination.data(),
    +
    360  result_dimensions,
    +
    361  result_leadings_source,
    +
    362  result_leadings_destination,
    +
    363  std::forward<Func>(func),
    +
    364  const_line_size
    +
    365  );
    +
    366  },
    +
    367  to_const_integral_0_to_16<Size>(line_size)
    +
    368  );
    +
    369  } else {
    +
    370  detail::mdspan_transform_kernel(
    +
    371  source.data(),
    +
    372  destination.data(),
    +
    373  result_dimensions,
    +
    374  result_leadings_source,
    +
    375  result_leadings_destination,
    +
    376  std::forward<Func>(func)
    +
    377  );
    +
    378  }
    +
    379  }
    +
    380 
    +
    381  template<typename Vector = std::vector<Size>, typename T>
    +
    382  void matrix_transpose(Size m, Size n, const T* source, T* destination) {
    +
    383  // source m*n
    +
    384  // destination n*m
    +
    385  detail::mdspan_transform_kernel(source, destination, Vector{n, m}, Vector{1, n}, Vector{m, 1}, [](const auto& x) { return x; });
    +
    386  }
    +
    387 } // namespace TAT
    +
    388 
    +
    389 #endif
    +
    Definition: multidimension_span.hpp:33
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    Copyright (C) 2021-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    std::uint16_t Rank
    Tensor rank type.
    Definition: common_variable.hpp:149
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    Definition: multidimension_span.hpp:144
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    +
    + + + + diff --git a/name_8hpp.html b/name_8hpp.html new file mode 100644 index 000000000..12fdbcea4 --- /dev/null +++ b/name_8hpp.html @@ -0,0 +1,385 @@ + + + + + + + +TAT: include/TAT/structure/name.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    name.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <memory>
    +#include <string>
    +#include <string_view>
    +#include <type_traits>
    +#include <unordered_map>
    +#include <utility>
    +#include "../utility/common_variable.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + +

    +Classes

    class  TAT::FastName
     FastName as tensor edge name. More...
     
    struct  TAT::InternalName< Name >
     For every Name type, some internal name is needed. More...
     
    struct  TAT::NameTraits< Name >
     Name type also need input and output method. More...
     
    struct  std::hash< TAT::FastName >
     
    struct  std::hash< pair< Name, Name > >
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + + + + + +

    +Macros

    +#define TAT_NAME_HPP
     
    #define TAT_DEFINE_FASTNAME_COMPARE(OP, EVAL)
     
    +#define TAT_DEFINE_ALL_INTERNAL_NAME(x)   static const Name x;
     
    +#define TAT_DEFINE_ALL_INTERNAL_NAME(x)   static const Name& x;
     
    #define TAT_DEFINE_DEFAULT_INTERNAL_NAME(x, n)
     
    #define TAT_DEFINE_INTERNAL_NAME(x)
     
    + + + + + + + + + + + + + + + + + + + + + +

    +Typedefs

    +using TAT::DefaultName = std::string
     
    +template<typename Name >
    using TAT::out_operator_t = std::ostream &(*)(std::ostream &, const Name &)
     
    +template<typename Name >
    using TAT::in_operator_t = std::istream &(*)(std::istream &, Name &)
     
    +template<typename T >
    using TAT::detail::name_write_checker = decltype(NameTraits< T >::write(std::declval< std::ostream & >(), std::declval< const T & >()))
     
    +template<typename T >
    using TAT::detail::name_read_checker = decltype(NameTraits< T >::read(std::declval< std::istream & >(), std::declval< T & >()))
     
    +template<typename T >
    using TAT::detail::name_print_checker = decltype(NameTraits< T >::print(std::declval< std::ostream & >(), std::declval< const T & >()))
     
    +template<typename T >
    using TAT::detail::name_scan_checker = decltype(NameTraits< T >::scan(std::declval< std::istream & >(), std::declval< T & >()))
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    +const FastName TAT::target_preset_name_of_fastname_Contract_0 = "__" "Contract_0"
     
    +const std::string TAT::target_preset_name_of_string_Contract_0 = "__" "Contract_0"
     
    +const FastName TAT::target_preset_name_of_fastname_Contract_1 = "__" "Contract_1"
     
    +const std::string TAT::target_preset_name_of_string_Contract_1 = "__" "Contract_1"
     
    +const FastName TAT::target_preset_name_of_fastname_Contract_2 = "__" "Contract_2"
     
    +const std::string TAT::target_preset_name_of_string_Contract_2 = "__" "Contract_2"
     
    +const FastName TAT::target_preset_name_of_fastname_SVD_U = "__" "SVD_U"
     
    +const std::string TAT::target_preset_name_of_string_SVD_U = "__" "SVD_U"
     
    +const FastName TAT::target_preset_name_of_fastname_SVD_V = "__" "SVD_V"
     
    +const std::string TAT::target_preset_name_of_string_SVD_V = "__" "SVD_V"
     
    +const FastName TAT::target_preset_name_of_fastname_QR_1 = "__" "QR_1"
     
    +const std::string TAT::target_preset_name_of_string_QR_1 = "__" "QR_1"
     
    +const FastName TAT::target_preset_name_of_fastname_QR_2 = "__" "QR_2"
     
    +const std::string TAT::target_preset_name_of_string_QR_2 = "__" "QR_2"
     
    +const FastName TAT::target_preset_name_of_fastname_Trace_1 = "__" "Trace_1"
     
    +const std::string TAT::target_preset_name_of_string_Trace_1 = "__" "Trace_1"
     
    +const FastName TAT::target_preset_name_of_fastname_Trace_2 = "__" "Trace_2"
     
    +const std::string TAT::target_preset_name_of_string_Trace_2 = "__" "Trace_2"
     
    +const FastName TAT::target_preset_name_of_fastname_Trace_3 = "__" "Trace_3"
     
    +const std::string TAT::target_preset_name_of_string_Trace_3 = "__" "Trace_3"
     
    +const FastName TAT::target_preset_name_of_fastname_Trace_4 = "__" "Trace_4"
     
    +const std::string TAT::target_preset_name_of_string_Trace_4 = "__" "Trace_4"
     
    +const FastName TAT::target_preset_name_of_fastname_Trace_5 = "__" "Trace_5"
     
    +const std::string TAT::target_preset_name_of_string_Trace_5 = "__" "Trace_5"
     
    +const FastName TAT::target_preset_name_of_fastname_No_Old_Name = "__" "No_Old_Name"
     
    +const std::string TAT::target_preset_name_of_string_No_Old_Name = "__" "No_Old_Name"
     
    +const FastName TAT::target_preset_name_of_fastname_No_New_Name = "__" "No_New_Name"
     
    +const std::string TAT::target_preset_name_of_string_No_New_Name = "__" "No_New_Name"
     
    +const FastName TAT::target_preset_name_of_fastname_Exp_1 = "__" "Exp_1"
     
    +const std::string TAT::target_preset_name_of_string_Exp_1 = "__" "Exp_1"
     
    +const FastName TAT::target_preset_name_of_fastname_Exp_2 = "__" "Exp_2"
     
    +const std::string TAT::target_preset_name_of_string_Exp_2 = "__" "Exp_2"
     
    template<typename Name >
    constexpr bool TAT::is_name
     Check whether a type is a Name type. More...
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +

    Macro Definition Documentation

    + +

    ◆ TAT_DEFINE_DEFAULT_INTERNAL_NAME

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define TAT_DEFINE_DEFAULT_INTERNAL_NAME( x,
     
    )
    +
    +Value:
    template<typename Name> \
    +
    const Name& InternalName<Name>::x = InternalName<Name>::Default_##n;
    +
    +
    +
    + +

    ◆ TAT_DEFINE_FASTNAME_COMPARE

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define TAT_DEFINE_FASTNAME_COMPARE( OP,
     EVAL 
    )
    +
    +Value:
    inline bool OP(const FastName& other) const { \
    +
    const auto& a = hash; \
    +
    const auto& b = other.hash; \
    +
    return EVAL; \
    +
    }
    +
    +
    +
    + +

    ◆ TAT_DEFINE_INTERNAL_NAME

    + +
    +
    + + + + + + + + +
    #define TAT_DEFINE_INTERNAL_NAME( x)
    +
    +Value:
    inline const FastName target_preset_name_of_fastname_##x = "__" #x; \
    +
    inline const std::string target_preset_name_of_string_##x = "__" #x; \
    +
    template<> \
    +
    inline const FastName& InternalName<FastName>::x = target_preset_name_of_fastname_##x; \
    +
    template<> \
    +
    inline const std::string& InternalName<std::string>::x = target_preset_name_of_string_##x;
    +
    +
    +
    +
    +
    + + + + diff --git a/name_8hpp.js b/name_8hpp.js new file mode 100644 index 000000000..3f99a2f04 --- /dev/null +++ b/name_8hpp.js @@ -0,0 +1,54 @@ +var name_8hpp = +[ + [ "FastName", "classTAT_1_1FastName.html", "classTAT_1_1FastName" ], + [ "InternalName", "structTAT_1_1InternalName.html", "structTAT_1_1InternalName" ], + [ "NameTraits", "structTAT_1_1NameTraits.html", null ], + [ "hash< TAT::FastName >", "structstd_1_1hash_3_01TAT_1_1FastName_01_4.html", "structstd_1_1hash_3_01TAT_1_1FastName_01_4" ], + [ "hash< pair< Name, Name > >", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4" ], + [ "TAT_DEFINE_ALL_INTERNAL_NAME", "name_8hpp.html#aa54b10578ce5a765152ffbe6cf0c572b", null ], + [ "TAT_DEFINE_ALL_INTERNAL_NAME", "name_8hpp.html#aa54b10578ce5a765152ffbe6cf0c572b", null ], + [ "TAT_DEFINE_DEFAULT_INTERNAL_NAME", "name_8hpp.html#afa518b428f58da660c080d37c42b9814", null ], + [ "TAT_DEFINE_FASTNAME_COMPARE", "name_8hpp.html#abe7c36585540651f41a7d5657d0d9f8c", null ], + [ "TAT_DEFINE_INTERNAL_NAME", "name_8hpp.html#a5cb68a629f65bebcb24673a37d0d7266", null ], + [ "TAT_NAME_HPP", "name_8hpp.html#acb0e5c2bab2297bb1176b05174828047", null ], + [ "DefaultName", "name_8hpp.html#a0642e231ccf247522499397715a068c2", null ], + [ "in_operator_t", "name_8hpp.html#a85888371cdd8defe66dffb13a3ca2076", null ], + [ "name_print_checker", "name_8hpp.html#a13640c116bac7a897a9d480ade9b3415", null ], + [ "name_read_checker", "name_8hpp.html#a7bcfab14214436cdcdcdbc4c48496582", null ], + [ "name_scan_checker", "name_8hpp.html#af243b27b3bf3667963729e42ef60a1e2", null ], + [ "name_write_checker", "name_8hpp.html#a1c5c24688b42397d7ac4744f0495eccf", null ], + [ "out_operator_t", "name_8hpp.html#a2bd3fb1837e0b4ae61a011fd3302bae9", null ], + [ "is_name", "name_8hpp.html#abe997f7e8402883a5e89b0cbf3f60af2", null ], + [ "target_preset_name_of_fastname_Contract_0", "name_8hpp.html#a2f17c34ac30cae22d26a81d6e9e2df20", null ], + [ "target_preset_name_of_fastname_Contract_1", "name_8hpp.html#a2cae5c7573098086c6ee03960e767130", null ], + [ "target_preset_name_of_fastname_Contract_2", "name_8hpp.html#aaa3e97867fb354fd83d749e43f5c949a", null ], + [ "target_preset_name_of_fastname_Exp_1", "name_8hpp.html#a37834bf30b726067e700635344ce8683", null ], + [ "target_preset_name_of_fastname_Exp_2", "name_8hpp.html#a0aa539127f2d0c216bc0a9ac2fb6a6da", null ], + [ "target_preset_name_of_fastname_No_New_Name", "name_8hpp.html#adf67d39c003c47434d230079e470035e", null ], + [ "target_preset_name_of_fastname_No_Old_Name", "name_8hpp.html#a1bc4b193e73e23e23a58790095fc2395", null ], + [ "target_preset_name_of_fastname_QR_1", "name_8hpp.html#a5ed6ccd3fc8ffd509c9c646e6e5015ca", null ], + [ "target_preset_name_of_fastname_QR_2", "name_8hpp.html#a7cb0cab51d6986f788aec7426759ae85", null ], + [ "target_preset_name_of_fastname_SVD_U", "name_8hpp.html#a4ef4ab4953fbb3bae9c7ae8d355f292e", null ], + [ "target_preset_name_of_fastname_SVD_V", "name_8hpp.html#aa3e4ca82783fb79c415faa79f7764247", null ], + [ "target_preset_name_of_fastname_Trace_1", "name_8hpp.html#a91990fa5c2ce77ce6cb052e11a2a44d5", null ], + [ "target_preset_name_of_fastname_Trace_2", "name_8hpp.html#ad111ce30e0f0740c91013d3ecee0c5e4", null ], + [ "target_preset_name_of_fastname_Trace_3", "name_8hpp.html#afb25765c7db55c3bf5e203c095b0a107", null ], + [ "target_preset_name_of_fastname_Trace_4", "name_8hpp.html#ac92f4b27a4e2c0769e46f66a4a80ac16", null ], + [ "target_preset_name_of_fastname_Trace_5", "name_8hpp.html#a1c6822042e7841af26394aff06381d77", null ], + [ "target_preset_name_of_string_Contract_0", "name_8hpp.html#a80d41a66cf1b88f3a50a2feb600b3295", null ], + [ "target_preset_name_of_string_Contract_1", "name_8hpp.html#a73a67144fcb52ef97526f9acda942ba3", null ], + [ "target_preset_name_of_string_Contract_2", "name_8hpp.html#ae6588489ef50db311a9fb5f8a1abd9a8", null ], + [ "target_preset_name_of_string_Exp_1", "name_8hpp.html#a87f1e52349c8afc3ca76ee132f61475c", null ], + [ "target_preset_name_of_string_Exp_2", "name_8hpp.html#a952548c131e1792d9b59ed05d08e2826", null ], + [ "target_preset_name_of_string_No_New_Name", "name_8hpp.html#af79930fda1075e6936edfe5bbe712770", null ], + [ "target_preset_name_of_string_No_Old_Name", "name_8hpp.html#a8fd7f63bce2ebeee5cf5665251f71c30", null ], + [ "target_preset_name_of_string_QR_1", "name_8hpp.html#ae89634908d2d10b1539a97f3923af0fe", null ], + [ "target_preset_name_of_string_QR_2", "name_8hpp.html#af0c365268cc002ead84468622c17ac92", null ], + [ "target_preset_name_of_string_SVD_U", "name_8hpp.html#a65d4cf69c0cf4f4c18a2c078a3df9280", null ], + [ "target_preset_name_of_string_SVD_V", "name_8hpp.html#ad127dd41cde5503f87c6c3c844c5a2de", null ], + [ "target_preset_name_of_string_Trace_1", "name_8hpp.html#a638f4c8bf9e91301e4a16c2320fe79de", null ], + [ "target_preset_name_of_string_Trace_2", "name_8hpp.html#a0243b14e55a31f23147eec45bdc7219d", null ], + [ "target_preset_name_of_string_Trace_3", "name_8hpp.html#a62d0b0144445b24a8172bb18155b2439", null ], + [ "target_preset_name_of_string_Trace_4", "name_8hpp.html#acaea1a2ae826b3273b077a379d1dcbb6", null ], + [ "target_preset_name_of_string_Trace_5", "name_8hpp.html#a12fc2e049a1b956db9679b41584258a0", null ] +]; \ No newline at end of file diff --git a/name_8hpp_source.html b/name_8hpp_source.html new file mode 100644 index 000000000..83c7d333f --- /dev/null +++ b/name_8hpp_source.html @@ -0,0 +1,305 @@ + + + + + + + +TAT: include/TAT/structure/name.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    name.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_NAME_HPP
    +
    22 #define TAT_NAME_HPP
    +
    23 
    +
    24 #include <memory>
    +
    25 #include <string>
    +
    26 #include <string_view>
    +
    27 #include <type_traits>
    +
    28 #include <unordered_map>
    +
    29 #include <utility>
    +
    30 
    +
    31 #include "../utility/common_variable.hpp"
    +
    32 
    +
    33 namespace TAT {
    +
    39  class FastName {
    +
    40  private:
    +
    41  using hash_t = std::size_t;
    +
    42 
    +
    43  hash_t hash;
    +
    44 
    +
    45  friend std::hash<FastName>;
    +
    46 
    +
    47  private:
    +
    48  // Singleton
    +
    49  struct dataset_t {
    +
    50  std::unordered_map<hash_t, std::string> hash_to_name = {};
    +
    51  const std::hash<std::string_view> hash_function = {};
    +
    52 
    +
    53  static dataset_t& instance() {
    +
    54  static const auto pointer = std::make_unique<dataset_t>();
    +
    55  return *pointer;
    +
    56  }
    +
    57  };
    +
    58  static auto& dataset() {
    +
    59  return dataset_t::instance();
    +
    60  }
    +
    61 
    +
    62  public:
    +
    63  FastName() : FastName("") { }
    +
    64 
    +
    65  template<
    +
    66  typename String,
    +
    67  typename = std::enable_if_t<std::is_convertible_v<String, std::string_view> && !std::is_same_v<remove_cvref_t<String>, FastName>>>
    +
    68  FastName(String&& name) : hash(dataset().hash_function(name)) {
    +
    69  if (auto found = dataset().hash_to_name.find(hash); found == dataset().hash_to_name.end()) {
    +
    70  dataset().hash_to_name[hash] = name;
    +
    71  }
    +
    72  }
    +
    73 
    +
    74  public:
    +
    75  operator const std::string&() const {
    +
    76  // hash must be in dataset, which has been added into dataset when construct FastName.
    +
    77  auto found = dataset().hash_to_name.find(hash);
    +
    78  return found->second;
    +
    79  }
    +
    80 
    +
    81  // This is not needed by TAT, but maybe needed by user for put it in map or set.
    +
    82 #define TAT_DEFINE_FASTNAME_COMPARE(OP, EVAL) \
    +
    83  inline bool OP(const FastName& other) const { \
    +
    84  const auto& a = hash; \
    +
    85  const auto& b = other.hash; \
    +
    86  return EVAL; \
    +
    87  }
    +
    88  TAT_DEFINE_FASTNAME_COMPARE(operator==, a == b)
    +
    89  TAT_DEFINE_FASTNAME_COMPARE(operator!=, a != b)
    +
    90  TAT_DEFINE_FASTNAME_COMPARE(operator<, a < b)
    +
    91  TAT_DEFINE_FASTNAME_COMPARE(operator>, a > b)
    +
    92  TAT_DEFINE_FASTNAME_COMPARE(operator<=, a <= b)
    +
    93  TAT_DEFINE_FASTNAME_COMPARE(operator>=, a >= b)
    +
    94 #undef TAT_DEFINE_FASTNAME_COMPARE
    +
    95  };
    +
    96 
    +
    97  using DefaultName =
    +
    98 #ifdef TAT_USE_FAST_NAME
    +
    99  FastName
    +
    100 #else
    +
    101  std::string
    +
    102 #endif
    +
    103  ;
    +
    104 
    +
    111  template<typename Name>
    +
    112  struct InternalName {
    +
    113 #define TAT_DEFINE_ALL_INTERNAL_NAME(x) static const Name x;
    +
    114  TAT_DEFINE_ALL_INTERNAL_NAME(Default_0)
    +
    115  TAT_DEFINE_ALL_INTERNAL_NAME(Default_1)
    +
    116  TAT_DEFINE_ALL_INTERNAL_NAME(Default_2)
    +
    117  TAT_DEFINE_ALL_INTERNAL_NAME(Default_3)
    +
    118  TAT_DEFINE_ALL_INTERNAL_NAME(Default_4)
    +
    119 #undef TAT_DEFINE_ALL_INTERNAL_NAME
    +
    120 #define TAT_DEFINE_ALL_INTERNAL_NAME(x) static const Name& x;
    +
    121  TAT_DEFINE_ALL_INTERNAL_NAME(Contract_0) // Used in contract temporary tensor
    +
    122  TAT_DEFINE_ALL_INTERNAL_NAME(Contract_1) // Used in contract temporary tensor
    +
    123  TAT_DEFINE_ALL_INTERNAL_NAME(Contract_2) // used in contract temporary tensor
    +
    124  TAT_DEFINE_ALL_INTERNAL_NAME(SVD_U) // used in svd temporary tensor and singular matrix tensor
    +
    125  TAT_DEFINE_ALL_INTERNAL_NAME(SVD_V) // used in svd temporary tensor and singular matrix tensor
    +
    126  TAT_DEFINE_ALL_INTERNAL_NAME(QR_1) // used in qr temporary tensor
    +
    127  TAT_DEFINE_ALL_INTERNAL_NAME(QR_2) // used in qr temporary tensor
    +
    128  TAT_DEFINE_ALL_INTERNAL_NAME(Trace_1) // used in trace temporary tensor
    +
    129  TAT_DEFINE_ALL_INTERNAL_NAME(Trace_2) // used in trace temporary tensor
    +
    130  TAT_DEFINE_ALL_INTERNAL_NAME(Trace_3) // used in trace temporary tensor
    +
    131  TAT_DEFINE_ALL_INTERNAL_NAME(Trace_4) // used in trace temporary tensor
    +
    132  TAT_DEFINE_ALL_INTERNAL_NAME(Trace_5) // used in trace temporary tensor
    +
    133  TAT_DEFINE_ALL_INTERNAL_NAME(No_Old_Name) // used in expand configuration
    +
    134  TAT_DEFINE_ALL_INTERNAL_NAME(No_New_Name) // used in shrink configuration
    +
    135  TAT_DEFINE_ALL_INTERNAL_NAME(Exp_1) // used in exponential temporary tensor
    +
    136  TAT_DEFINE_ALL_INTERNAL_NAME(Exp_2) // used in exponential temporary tensor
    +
    137 #undef TAT_DEFINE_ALL_INTERNAL_NAME
    +
    138  };
    +
    139 #define TAT_DEFINE_DEFAULT_INTERNAL_NAME(x, n) \
    +
    140  template<typename Name> \
    +
    141  const Name& InternalName<Name>::x = InternalName<Name>::Default_##n;
    +
    142  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Contract_0, 0)
    +
    143  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Contract_1, 1)
    +
    144  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Contract_2, 2)
    +
    145  TAT_DEFINE_DEFAULT_INTERNAL_NAME(SVD_U, 1)
    +
    146  TAT_DEFINE_DEFAULT_INTERNAL_NAME(SVD_V, 2)
    +
    147  TAT_DEFINE_DEFAULT_INTERNAL_NAME(QR_1, 1)
    +
    148  TAT_DEFINE_DEFAULT_INTERNAL_NAME(QR_2, 2)
    +
    149  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Trace_1, 0)
    +
    150  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Trace_2, 1)
    +
    151  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Trace_3, 2)
    +
    152  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Trace_4, 3)
    +
    153  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Trace_5, 4)
    +
    154  TAT_DEFINE_DEFAULT_INTERNAL_NAME(No_Old_Name, 0)
    +
    155  TAT_DEFINE_DEFAULT_INTERNAL_NAME(No_New_Name, 0)
    +
    156  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Exp_1, 1)
    +
    157  TAT_DEFINE_DEFAULT_INTERNAL_NAME(Exp_2, 2)
    +
    158 #undef TAT_DEFINE_DEFAULT_INTERNAL_NAME
    +
    159 #define TAT_DEFINE_INTERNAL_NAME(x) \
    +
    160  inline const FastName target_preset_name_of_fastname_##x = "__" #x; \
    +
    161  inline const std::string target_preset_name_of_string_##x = "__" #x; \
    +
    162  template<> \
    +
    163  inline const FastName& InternalName<FastName>::x = target_preset_name_of_fastname_##x; \
    +
    164  template<> \
    +
    165  inline const std::string& InternalName<std::string>::x = target_preset_name_of_string_##x;
    +
    166  TAT_DEFINE_INTERNAL_NAME(Contract_0)
    +
    167  TAT_DEFINE_INTERNAL_NAME(Contract_1)
    +
    168  TAT_DEFINE_INTERNAL_NAME(Contract_2)
    +
    169  TAT_DEFINE_INTERNAL_NAME(SVD_U)
    +
    170  TAT_DEFINE_INTERNAL_NAME(SVD_V)
    +
    171  TAT_DEFINE_INTERNAL_NAME(QR_1)
    +
    172  TAT_DEFINE_INTERNAL_NAME(QR_2)
    +
    173  TAT_DEFINE_INTERNAL_NAME(Trace_1)
    +
    174  TAT_DEFINE_INTERNAL_NAME(Trace_2)
    +
    175  TAT_DEFINE_INTERNAL_NAME(Trace_3)
    +
    176  TAT_DEFINE_INTERNAL_NAME(Trace_4)
    +
    177  TAT_DEFINE_INTERNAL_NAME(Trace_5)
    +
    178  TAT_DEFINE_INTERNAL_NAME(No_Old_Name)
    +
    179  TAT_DEFINE_INTERNAL_NAME(No_New_Name)
    +
    180  TAT_DEFINE_INTERNAL_NAME(Exp_1)
    +
    181  TAT_DEFINE_INTERNAL_NAME(Exp_2)
    +
    182 #undef TAT_DEFINE_INTERNAL_NAME
    +
    183 
    +
    184  template<typename Name>
    +
    185  using out_operator_t = std::ostream& (*)(std::ostream&, const Name&);
    +
    186  template<typename Name>
    +
    187  using in_operator_t = std::istream& (*)(std::istream&, Name&);
    +
    188 
    +
    195  template<typename Name>
    +
    196  struct NameTraits { };
    +
    197 
    +
    198  namespace detail {
    +
    199  template<typename T>
    +
    200  using name_write_checker = decltype(NameTraits<T>::write(std::declval<std::ostream&>(), std::declval<const T&>()));
    +
    201  template<typename T>
    +
    202  using name_read_checker = decltype(NameTraits<T>::read(std::declval<std::istream&>(), std::declval<T&>()));
    +
    203  template<typename T>
    +
    204  using name_print_checker = decltype(NameTraits<T>::print(std::declval<std::ostream&>(), std::declval<const T&>()));
    +
    205  template<typename T>
    +
    206  using name_scan_checker = decltype(NameTraits<T>::scan(std::declval<std::istream&>(), std::declval<T&>()));
    +
    207  } // namespace detail
    +
    208 
    +
    215  template<typename Name>
    +
    216  constexpr bool is_name = is_detected_v<detail::name_write_checker, Name> || is_detected_v<detail::name_read_checker, Name> ||
    +
    217  is_detected_v<detail::name_print_checker, Name> || is_detected_v<detail::name_scan_checker, Name>;
    +
    218 } // namespace TAT
    +
    219 
    +
    220 namespace std {
    +
    221  template<>
    +
    222  struct hash<TAT::FastName> {
    +
    223  size_t operator()(const TAT::FastName& name) const {
    +
    224  return name.hash;
    +
    225  }
    +
    226  };
    +
    227 
    +
    228  template<typename Name>
    +
    229  struct hash<pair<Name, Name>> {
    +
    230  size_t operator()(const pair<Name, Name>& names) const {
    +
    231  const auto& [name_1, name_2] = names;
    +
    232  auto hash_1 = hash<Name>()(name_1);
    +
    233  auto hash_2 = hash<Name>()(name_2);
    +
    234  auto seed = hash_1;
    +
    235  auto v = hash_2;
    +
    236  TAT::hash_absorb(seed, v);
    +
    237  return seed;
    +
    238  }
    +
    239  };
    +
    240 } // namespace std
    +
    241 #endif
    +
    FastName as tensor edge name.
    Definition: name.hpp:39
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    constexpr bool is_name
    Check whether a type is a Name type.
    Definition: name.hpp:216
    +
    For every Name type, some internal name is needed.
    Definition: name.hpp:112
    +
    Name type also need input and output method.
    Definition: name.hpp:196
    +
    +
    + + + + diff --git a/namespaceTAT.html b/namespaceTAT.html new file mode 100644 index 000000000..8d292f950 --- /dev/null +++ b/namespaceTAT.html @@ -0,0 +1,1080 @@ + + + + + + + +TAT: TAT Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT Namespace Reference
    +
    +
    + +

    TAT is A Tensor library. +More...

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Classes

    struct  NameTraits< FastName >
     
    struct  NameTraits< std::string >
     
    struct  UnixColorCode
     A type control console color. More...
     
    struct  mpi_one_output_stream
     Wrapper for ostream, the stream will only output in the rank which is specified when creating. More...
     
    struct  mpi_rank_output_stream
     Wrapper for ostream, the stream will output the rank which is psecified when creating. More...
     
    struct  mpi_t
     MPI handler type. More...
     
    class  Core
     Contains nearly all tensor data except edge name, include edge shape and tensor content. More...
     
    class  edge_segments_t
     
    struct  edge_bose_arrow_t
     
    struct  edge_fermi_arrow_t
     
    class  Edge
     The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment. More...
     
    class  FastName
     FastName as tensor edge name. More...
     
    struct  InternalName
     For every Name type, some internal name is needed. More...
     
    struct  NameTraits
     Name type also need input and output method. More...
     
    struct  fermi
     
    struct  Symmetry
     General symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied. More...
     
    struct  RemainCut
     
    struct  RelativeCut
     
    struct  NoCut
     
    struct  Cut
     Used to describle how to cut when doing svd to a tensor. More...
     
    struct  TensorShape
     
    class  Tensor
     Tensor type. More...
     
    struct  scope_resource
     
    struct  remove_cvref
     
    struct  type_identity
     
    struct  empty_list
     
    struct  overloaded
     
    class  mdspan
     
    struct  timer
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Typedefs

    +template<typename Symmetry >
    using edge_arrow_t = std::conditional_t< Symmetry::is_fermi_symmetry, edge_fermi_arrow_t, edge_bose_arrow_t >
     
    template<typename Symmetry >
    using EdgePointer = Edge< Symmetry, true >
     An edge but only containing a pointer to other edge's segment data. More...
     
    +using DefaultName = std::string
     
    +template<typename Name >
    using out_operator_t = std::ostream &(*)(std::ostream &, const Name &)
     
    +template<typename Name >
    using in_operator_t = std::istream &(*)(std::istream &, Name &)
     
    +template<typename T >
    using bose = T
     
    using Z2 = bool
     Z2 Symmetry. More...
     
    using U1 = std::int32_t
     U1 symmetry. More...
     
    +using NoSymmetry = Symmetry<>
     
    +using Z2Symmetry = Symmetry< bose< Z2 > >
     
    +using U1Symmetry = Symmetry< bose< U1 > >
     
    +using FermiSymmetry = Symmetry< fermi< U1 > >
     
    +using FermiZ2Symmetry = Symmetry< fermi< U1 >, bose< Z2 > >
     
    +using FermiU1Symmetry = Symmetry< fermi< U1 >, bose< U1 > >
     
    +using ParitySymmetry = Symmetry< fermi< Z2 > >
     
    +using FermiFermiSymmetry = Symmetry< fermi< U1 >, fermi< U1 > >
     
    using Rank = std::uint16_t
     Tensor rank type. More...
     
    using Nums = std::uint32_t
     Tensor block number, or dimension segment number type. More...
     
    using Size = std::uint64_t
     Tensor content data size, or dimension size type. More...
     
    using Arrow = bool
     Fermi arrow type. More...
     
    template<typename T >
    using real_scalar = typename detail::real_scalar_helper< T >::type
     Get corresponding real type, used in svd and norm. More...
     
    +template<template< typename... > class Op, typename... Args>
    using is_detected = typename detail::detector< void, Op, Args... >
     
    +template<typename T >
    using remove_cvref_t = typename remove_cvref< T >::type
     
    +template<typename T >
    using type_identity_t = typename type_identity< T >::type
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +template<typename ScalarType , typename Symmetry , typename Name >
    Tensor< ScalarType, Symmetry, Name > contract_without_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor_1, const Tensor< ScalarType, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs)
     
    +template<typename ScalarType , typename Name >
    Tensor< ScalarType, Symmetry<>, Name > contract_with_fuse (const Tensor< ScalarType, Symmetry<>, Name > &tensor_1, const Tensor< ScalarType, Symmetry<>, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names)
     
    +template<typename ScalarType , typename Symmetry , typename Name >
    Tensor< ScalarType, Symmetry, Name > trace_with_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor, const std::unordered_set< std::pair< Name, Name >> &trace_pairs, const std::unordered_map< Name, std::pair< Name, Name >> &fuse_names)
     
    +template<typename ScalarType , typename Symmetry , typename Name >
    Tensor< ScalarType, Symmetry, Name > trace_without_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor, const std::unordered_set< std::pair< Name, Name >> &trace_pairs)
     
    +template<typename T , typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
    std::ostream & operator< (std::ostream &out, const T &data)
     
    +template<typename T , typename = std::enable_if_t<std::is_trivially_destructible_v<T>>>
    std::istream & operator> (std::istream &in, T &data)
     
    +std::ostream & print_string_for_name (std::ostream &out, const std::string &name)
     
    +std::ostream & print_fastname_for_name (std::ostream &out, const FastName &name)
     
    +std::istream & scan_string_for_name (std::istream &in, std::string &name)
     
    +std::istream & scan_fastname_for_name (std::istream &in, FastName &name)
     
    +std::ostream & write_string_for_name (std::ostream &out, const std::string &string)
     
    +std::istream & read_string_for_name (std::istream &in, std::string &string)
     
    +std::ostream & write_fastname_for_name (std::ostream &out, const FastName &name)
     
    +std::istream & read_fastname_for_name (std::istream &in, FastName &name)
     
    +template<typename T , typename A >
    std::ostream & operator< (std::ostream &out, const std::vector< T, A > &list)
     
    +template<typename T , typename A >
    std::istream & operator> (std::istream &in, std::vector< T, A > &list)
     
    +template<typename T , typename A , typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
    std::ostream & operator<< (std::ostream &out, const std::vector< T, A > &list)
     
    +template<typename T , typename A , typename = std::enable_if_t<is_scalar<T> || is_edge<T> || is_symmetry<T> || is_name<T>>>
    std::istream & operator>> (std::istream &in, std::vector< T, A > &list)
     
    +template<typename Symmetry >
    std::ostream & operator<< (std::ostream &out, const Edge< Symmetry > &edge)
     
    +template<typename Symmetry >
    std::istream & operator>> (std::istream &in, Edge< Symmetry > &edge)
     
    +template<typename Symmetry >
    std::ostream & operator< (std::ostream &out, const Edge< Symmetry > &edge)
     
    +template<typename Symmetry >
    std::istream & operator> (std::istream &in, Edge< Symmetry > &edge)
     
    +template<typename... T>
    std::ostream & operator<< (std::ostream &out, const Symmetry< T... > &symmetry)
     
    +template<typename... T>
    std::istream & operator>> (std::istream &in, Symmetry< T... > &symmetry)
     
    +std::ostream & operator<< (std::ostream &out, const UnixColorCode &value)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
    std::ostream & operator<< (std::ostream &out, const TensorShape< ScalarType, Symmetry, Name > &shape)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
    std::ostream & operator<< (std::ostream &out, const Tensor< ScalarType, Symmetry, Name > &tensor)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
    std::istream & operator>> (std::istream &in, Tensor< ScalarType, Symmetry, Name > &tensor)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
    std::ostream & operator< (std::ostream &out, const Tensor< ScalarType, Symmetry, Name > &tensor)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>>>
    std::istream & operator> (std::istream &in, Tensor< ScalarType, Symmetry, Name > &tensor)
     
    +template<typename T >
    std::istream && operator> (std::istream &&in, T &v)
     
    +template<typename T >
    std::ostream && operator< (std::ostream &&out, const T &v)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto operator+ (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto operator- (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto operator* (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto operator/ (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator+ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator+ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator+ (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator- (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator- (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator- (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator* (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator* (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator* (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator/ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator/ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto operator/ (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator+= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator+= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator-= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator-= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator*= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator*= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator/= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & operator/= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename Symmetry , bool is_pointer>
    bool operator== (const edge_segments_t< Symmetry, is_pointer > &edge_1, const edge_segments_t< Symmetry, is_pointer > &edge_2)
     
    +template<typename Symmetry , bool is_pointer>
    bool operator!= (const edge_segments_t< Symmetry, is_pointer > &edge_1, const edge_segments_t< Symmetry, is_pointer > &edge_2)
     
    +template<typename Symmetry , bool is_pointer>
    bool operator== (const Edge< Symmetry, is_pointer > &edge_1, const Edge< Symmetry, is_pointer > &edge_2)
     
    +template<typename Symmetry , bool is_pointer>
    bool operator!= (const Edge< Symmetry, is_pointer > &edge_1, const Edge< Symmetry, is_pointer > &edge_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name >
    auto contract (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs)
     
    +template<typename... Fs>
     overloaded (Fs...) -> overloaded< Fs... >
     
    +std::size_t & hash_absorb (std::size_t &seed, std::size_t value)
     
    template<typename T , T... possible_value>
    auto to_const_integral (T value)
     Convert a variable to std::variant<run time variable, compile time variable 1, compile time variable 2, ...> More...
     
    +template<typename T >
    auto to_const_integral_0_to_16 (T value)
     
    +template<typename T1 , typename T2 , typename U1 , typename U2 , typename Func >
    void mdspan_transform (const mdspan< T1, U1 > &source, mdspan< T2, U2 > &destination, Func &&func)
     
    +template<typename Vector = std::vector<Size>, typename T >
    void matrix_transpose (Size m, Size n, const T *source, T *destination)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    +timer conjugate_guard ("conjugate")
     
    +timer contract_kernel_guard ("contract_kernel")
     
    +timer contract_guard ("contract")
     
    +timer transpose_guard ("transpose")
     
    +timer exponential_guard ("exponential")
     
    +timer qr_kernel_guard ("qr_kernel")
     
    +timer qr_guard ("qr")
     
    +timer expand_guard ("expand")
     
    +timer shrink_guard ("shrink")
     
    +timer svd_kernel_guard ("svd_kernel")
     
    +timer svd_guard ("svd")
     
    +timer trace_guard ("trace")
     
    +const UnixColorCode console_red = "\x1B[31m"
     
    +const UnixColorCode console_green = "\x1B[32m"
     
    +const UnixColorCode console_yellow = "\x1B[33m"
     
    +const UnixColorCode console_blue = "\x1B[34m"
     
    +const UnixColorCode console_origin = "\x1B[0m"
     
    +timer tensor_dump_guard ("tensor_dump")
     
    +timer tensor_load_guard ("tensor_load")
     
    +template<typename T >
    constexpr bool serializable = is_detected_v<detail::serializable_helper, T>
     
    +timer mpi_send_guard ("mpi_send")
     
    +timer mpi_receive_guard ("mpi_receive")
     
    +timer mpi_broadcast_guard ("mpi_broadcast")
     
    +timer mpi_reduce_guard ("mpi_reduce")
     
    +mpi_t mpi
     
    +timer scalar_outplace_guard ("scalar_outplace")
     
    +timer scalar_inplace_guard ("scalar_inplace")
     
    +template<typename T >
    constexpr bool is_edge = detail::is_edge_helper<T>::value
     
    +template<typename T >
    constexpr bool is_edge_pointer = detail::is_edge_pointer_helper<T>::value
     
    +template<typename T >
    constexpr bool is_general_edge = is_edge<T> || is_edge_pointer<T>
     
    +const FastName target_preset_name_of_fastname_Contract_0 = "__" "Contract_0"
     
    +const std::string target_preset_name_of_string_Contract_0 = "__" "Contract_0"
     
    +const FastName target_preset_name_of_fastname_Contract_1 = "__" "Contract_1"
     
    +const std::string target_preset_name_of_string_Contract_1 = "__" "Contract_1"
     
    +const FastName target_preset_name_of_fastname_Contract_2 = "__" "Contract_2"
     
    +const std::string target_preset_name_of_string_Contract_2 = "__" "Contract_2"
     
    +const FastName target_preset_name_of_fastname_SVD_U = "__" "SVD_U"
     
    +const std::string target_preset_name_of_string_SVD_U = "__" "SVD_U"
     
    +const FastName target_preset_name_of_fastname_SVD_V = "__" "SVD_V"
     
    +const std::string target_preset_name_of_string_SVD_V = "__" "SVD_V"
     
    +const FastName target_preset_name_of_fastname_QR_1 = "__" "QR_1"
     
    +const std::string target_preset_name_of_string_QR_1 = "__" "QR_1"
     
    +const FastName target_preset_name_of_fastname_QR_2 = "__" "QR_2"
     
    +const std::string target_preset_name_of_string_QR_2 = "__" "QR_2"
     
    +const FastName target_preset_name_of_fastname_Trace_1 = "__" "Trace_1"
     
    +const std::string target_preset_name_of_string_Trace_1 = "__" "Trace_1"
     
    +const FastName target_preset_name_of_fastname_Trace_2 = "__" "Trace_2"
     
    +const std::string target_preset_name_of_string_Trace_2 = "__" "Trace_2"
     
    +const FastName target_preset_name_of_fastname_Trace_3 = "__" "Trace_3"
     
    +const std::string target_preset_name_of_string_Trace_3 = "__" "Trace_3"
     
    +const FastName target_preset_name_of_fastname_Trace_4 = "__" "Trace_4"
     
    +const std::string target_preset_name_of_string_Trace_4 = "__" "Trace_4"
     
    +const FastName target_preset_name_of_fastname_Trace_5 = "__" "Trace_5"
     
    +const std::string target_preset_name_of_string_Trace_5 = "__" "Trace_5"
     
    +const FastName target_preset_name_of_fastname_No_Old_Name = "__" "No_Old_Name"
     
    +const std::string target_preset_name_of_string_No_Old_Name = "__" "No_Old_Name"
     
    +const FastName target_preset_name_of_fastname_No_New_Name = "__" "No_New_Name"
     
    +const std::string target_preset_name_of_string_No_New_Name = "__" "No_New_Name"
     
    +const FastName target_preset_name_of_fastname_Exp_1 = "__" "Exp_1"
     
    +const std::string target_preset_name_of_string_Exp_1 = "__" "Exp_1"
     
    +const FastName target_preset_name_of_fastname_Exp_2 = "__" "Exp_2"
     
    +const std::string target_preset_name_of_string_Exp_2 = "__" "Exp_2"
     
    template<typename Name >
    constexpr bool is_name
     Check whether a type is a Name type. More...
     
    template<typename T >
    constexpr bool is_symmetry = detail::is_symmetry_helper<T>::value
     Check whether a type is a symmetry type. More...
     
    +template<typename T >
    constexpr bool is_tensor = detail::is_tensor_helper<T>::value
     
    +constexpr std::size_t default_buffer_size = 1 << 20
     
    const char * version = "0.3.12"
     TAT version. More...
     
    constexpr bool debug_mode
     Debug flag. More...
     
    const char * information
     TAT informations about compiler and license. More...
     
    +template<typename T >
    constexpr bool is_real = std::is_scalar_v<T>
     
    +template<typename T >
    constexpr bool is_complex = detail::is_complex_helper<T>::value
     
    +template<typename T >
    constexpr bool is_scalar = is_real<T> || is_complex<T>
     
    +template<template< typename... > class Op, typename... Args>
    constexpr bool is_detected_v = is_detected<Op, Args...>::value
     
    +constexpr std::size_t unordered_parameter = 4
     
    +timer transform_kernel_guard ("transform_kernel")
     
    +

    Detailed Description

    +

    TAT is A Tensor library.

    +

    Typedef Documentation

    + +

    ◆ Arrow

    + +
    +
    + + + + +
    using TAT::Arrow = typedef bool
    +
    + +

    Fermi arrow type.

    +
    Note
    For connected two edge, EPR pair is $a^\dagger b^\dagger$ then, tensor owning edge a have arrow=false, and tensor owning edge b has arrow=true. namely, the EPR pair arrow order is (false true)
    + +
    +
    + +

    ◆ EdgePointer

    + +
    +
    +
    +template<typename Symmetry >
    + + + + +
    using TAT::EdgePointer = typedef Edge<Symmetry, true>
    +
    + +

    An edge but only containing a pointer to other edge's segment data.

    +
    See also
    Edge
    + +
    +
    + +

    ◆ Nums

    + +
    +
    + + + + +
    using TAT::Nums = typedef std::uint32_t
    +
    + +

    Tensor block number, or dimension segment number type.

    + +
    +
    + +

    ◆ Rank

    + +
    +
    + + + + +
    using TAT::Rank = typedef std::uint16_t
    +
    + +

    Tensor rank type.

    + +
    +
    + +

    ◆ real_scalar

    + +
    +
    +
    +template<typename T >
    + + + + +
    using TAT::real_scalar = typedef typename detail::real_scalar_helper<T>::type
    +
    + +

    Get corresponding real type, used in svd and norm.

    +
    Template Parameters
    + + +
    Tif T is complex type, return corresponding basic real type, if it is real type, return itself, otherwise, return void
    +
    +
    + +
    +
    + +

    ◆ Size

    + +
    +
    + + + + +
    using TAT::Size = typedef std::uint64_t
    +
    + +

    Tensor content data size, or dimension size type.

    + +
    +
    + +

    ◆ U1

    + +
    +
    + + + + +
    using TAT::U1 = typedef std::int32_t
    +
    + +

    U1 symmetry.

    + +
    +
    + +

    ◆ Z2

    + +
    +
    + + + + +
    using TAT::Z2 = typedef bool
    +
    + +

    Z2 Symmetry.

    + +
    +
    +

    Function Documentation

    + +

    ◆ to_const_integral()

    + +
    +
    +
    +template<typename T , T... possible_value>
    + + + + + + + + +
    auto TAT::to_const_integral (value)
    +
    + +

    Convert a variable to std::variant<run time variable, compile time variable 1, compile time variable 2, ...>

    +

    Use std::visit([](const auto& variable) { xxx; variable.value(); xxx}, v) to dispatch compile time variable and run time variable

    + +
    +
    +

    Variable Documentation

    + +

    ◆ debug_mode

    + +
    +
    + + + + + +
    + + + + +
    constexpr bool TAT::debug_mode
    +
    +inlineconstexpr
    +
    +Initial value:
    =
    +
    +
    +
    +
    true
    +
    +

    Debug flag.

    + +
    +
    + +

    ◆ information

    + +
    +
    + + + + + +
    + + + + +
    const char* TAT::information
    +
    +inline
    +
    +Initial value:
    = "TAT " "0.3.12" " ("
    +
    +
    +
    +
    "" __DATE__ ", " __TIME__
    +
    +
    +
    +
    ")\n"
    +
    "Copyright (C) 2019-2023 Hao Zhang<zh970205@mail.ustc.edu.cn>\n"
    +
    "This is free software; see the source for copying conditions. There is NO\n"
    +
    "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    +
    +

    TAT informations about compiler and license.

    + +
    +
    + +

    ◆ is_name

    + +
    +
    +
    +template<typename Name >
    + + + + + +
    + + + + +
    constexpr bool TAT::is_name
    +
    +constexpr
    +
    +Initial value:
    = is_detected_v<detail::name_write_checker, Name> || is_detected_v<detail::name_read_checker, Name> ||
    +
    is_detected_v<detail::name_print_checker, Name> || is_detected_v<detail::name_scan_checker, Name>
    +
    +

    Check whether a type is a Name type.

    +

    If any one of those four function is defined, it is a Name type. Because it is considered that user want to use it as Name for only some operator.

    + +
    +
    + +

    ◆ is_symmetry

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + +
    constexpr bool TAT::is_symmetry = detail::is_symmetry_helper<T>::value
    +
    +constexpr
    +
    + +

    Check whether a type is a symmetry type.

    +

    Only type specialized by Symmetry is symmetry type

    +
    See also
    Symmetry
    + +
    +
    + +

    ◆ version

    + +
    +
    + + + + + +
    + + + + +
    const char* TAT::version = "0.3.12"
    +
    +inline
    +
    + +

    TAT version.

    + +
    +
    +
    +
    + + + + diff --git a/namespaceTAT.js b/namespaceTAT.js new file mode 100644 index 000000000..38fbfebe3 --- /dev/null +++ b/namespaceTAT.js @@ -0,0 +1,290 @@ +var namespaceTAT = +[ + [ "detail", null, [ + [ "name_print_checker", "name_8hpp.html#a13640c116bac7a897a9d480ade9b3415", null ], + [ "name_read_checker", "name_8hpp.html#a7bcfab14214436cdcdcdbc4c48496582", null ], + [ "name_scan_checker", "name_8hpp.html#af243b27b3bf3667963729e42ef60a1e2", null ], + [ "name_write_checker", "name_8hpp.html#a1c5c24688b42397d7ac4744f0495eccf", null ], + [ "serializable_helper", "mpi_8hpp.html#a2f1434e47d9415ee79ec0d78d1c6bf67", null ], + [ "symmetry_unwrap", "symmetry_8hpp.html#ac4c605a4070d76f412bb5cf7c59c2e50", null ], + [ "calculate_qr", "qr_8hpp.html#a5e2e9ce15f5030e8e7db17e1298a75aa", null ], + [ "calculate_qr_kernel", "qr_8hpp.html#acf427e916e25511ea7b2542496e8f840", null ], + [ "calculate_svd", "svd_8hpp.html#a8ee272a620a6c18cad9ac926ab4e4d76", null ], + [ "calculate_svd_kernel", "svd_8hpp.html#a4bb1d50acc412ebc98a944716ea07614", null ], + [ "calculate_svd_kernel< double >", "svd_8hpp.html#ab75e7b09e352b453f88ac0fd2419f626", null ], + [ "calculate_svd_kernel< float >", "svd_8hpp.html#a154cec59ab5b376f018b0bbfc808e945", null ], + [ "calculate_svd_kernel< std::complex< double > >", "svd_8hpp.html#a52023b2357f3418bec18e6ac21c9dd64", null ], + [ "calculate_svd_kernel< std::complex< float > >", "svd_8hpp.html#a15182441a849d1bfc7fac3709483865d", null ], + [ "check_valid_contract_plan", "contract_8hpp.html#abf99beb96f2f8e79fdc0826447061ab4", null ], + [ "const_integral_t", "const__integral_8hpp.html#aac3c5f7fcc8daa4f3fb2158a4762279d", null ], + [ "error", "common__variable_8hpp.html#a701eeade9e0991be1161d1d77fffa1c1", null ], + [ "gemm_batch", "contract_8hpp.html#a4a8c733402ffe0529f2be4a8e17d169b", null ], + [ "generate_contract_map", "contract_8hpp.html#af049267e8ed446cb154dfab7c6a253f5", null ], + [ "get_default_resource", "allocator_8hpp.html#a3afaf0f25c123ad1dfbdcf5796d653bc", null ], + [ "ignore_until", "io_8hpp.html#a10594d9aab2aa2c685c884b606c73cdf", null ], + [ "initialize_identity_matrix", "exponential_8hpp.html#a744b2a122ec8bd1fab236022770475e3", null ], + [ "linear_solve", "exponential_8hpp.html#a7809e8417610a6eb443f97246ad16720", null ], + [ "log", "common__variable_8hpp.html#a74538be91c8fa85b6f8ac2b5ac884ce2", null ], + [ "map_on_2tuple", "symmetry_8hpp.html#ac943729c1ba643f87215d5efbc01b2cf", null ], + [ "map_on_tuple", "symmetry_8hpp.html#a5cbc362d8172208d8636172cae848a3e", null ], + [ "matrix_exponential", "exponential_8hpp.html#a9e1e3cfa5decdb1089d29446985cc2c2", null ], + [ "max_of_abs", "exponential_8hpp.html#af04b0be923236b7a12594b295be1e5c8", null ], + [ "mdspan_transform_kernel", "multidimension__span_8hpp.html#ab6cbfc6155e87282231bbd1b51030e74", null ], + [ "nothing", "common__variable_8hpp.html#afb968550316dbe2e1ebd9075c74928ad", null ], + [ "operator!=", "allocator_8hpp.html#a74c237f1506d98f4a57321efc290c8bf", null ], + [ "operator!=", "allocator_8hpp.html#ac9ec13e49adab3334c04444b293278a4", null ], + [ "operator!=", "allocator_8hpp.html#a5c7e4a497d12887402f34f6b83196ec2", null ], + [ "operator==", "allocator_8hpp.html#a40c40965f136826e7492fb97e8184326", null ], + [ "operator==", "allocator_8hpp.html#a4ba1ab28b9bc9ceead3f990236a62f33", null ], + [ "operator==", "allocator_8hpp.html#af463dd2142a80660f292035420272b60", null ], + [ "print_complex", "io_8hpp.html#aac12b72cf395c6bb2509238dc8a91701", null ], + [ "print_complex", "io_8hpp.html#a6c88100aff09e587b58f025843b2caa6", null ], + [ "print_list", "io_8hpp.html#a2655c04ef1967f485203d54a79e818d3", null ], + [ "print_symmetry_sequence", "io_8hpp.html#afa9cff8ab3ef8ce92011856ecd279a4d", null ], + [ "scan_complex", "io_8hpp.html#a8d57daae76b83323d99be6b757c07a03", null ], + [ "scan_complex", "io_8hpp.html#ada545d7a9205c968bf8954359df96266", null ], + [ "scan_list", "io_8hpp.html#aeaa4cbb124c2d8ff68ea396688699618", null ], + [ "scan_symmetry_sequence", "io_8hpp.html#aa11f7022239c65f14359dab0ab12f38d", null ], + [ "set_default_resource", "allocator_8hpp.html#aca37c3ba26f16963a6fcf64684878fc3", null ], + [ "singular_to_tensor", "svd_8hpp.html#a2b184468a1433cbc160547bd680d5839", null ], + [ "to_const_integral_helper", "const__integral_8hpp.html#a01feaa4c4b1e2f31dbad1e29f5df8289", null ], + [ "to_const_integral_helper", "const__integral_8hpp.html#a14afb807479b2d34b1c2ac005a324361", null ], + [ "to_int", "qr_8hpp.html#a660232f8007702f1a0c7f61f869de2ac", null ], + [ "valid_name_character", "io_8hpp.html#a4f2b473afa1ecde4f263136b9d7c88fd", null ], + [ "warning", "common__variable_8hpp.html#a7e782f1f68a68861d1e3c7b325e6729e", null ], + [ "default_resource", "allocator_8hpp.html#acef22560451755ab6487271f8559c9d4", null ], + [ "evil", "common__variable_8hpp.html#a887c1efdb013f16657048ebd7ab72fb8", null ], + [ "gelqf", "qr_8hpp.html#a22d06c274efaa927fad0144ecd273a3b", null ], + [ "gelqf< double >", "qr_8hpp.html#a07b8cda1947bfd49f309a6b7a84ec895", null ], + [ "gelqf< float >", "qr_8hpp.html#ac47d9e7822607861b11260b7212272f7", null ], + [ "gemm", "contract_8hpp.html#ad84e829f9df2575d7816483f39c9ed95", null ], + [ "gemm< double >", "contract_8hpp.html#a5453a4c7b8b50c758393472190f2edf8", null ], + [ "gemm< float >", "contract_8hpp.html#a612368e11e244c25d980ace9525a7418", null ], + [ "geqrf", "qr_8hpp.html#aec8bebe6f55502afd5a38ac9191cd473", null ], + [ "geqrf< double >", "qr_8hpp.html#a67468ddf9b61c83195900844503512e5", null ], + [ "geqrf< float >", "qr_8hpp.html#ab05aebb4f9303bc13e61b8c1bb1093cb", null ], + [ "gesv", "exponential_8hpp.html#ac48c1370efd4e33097d5c1f26624baa8", null ], + [ "gesv< double >", "exponential_8hpp.html#af9bac1385ace56ebe922c0f133859efa", null ], + [ "gesv< float >", "exponential_8hpp.html#a192b8899b53418bddaa72aa5637ad774", null ], + [ "is_fermi", "symmetry_8hpp.html#aea1199c9635158e1376bb03e51146a53", null ], + [ "mkl_gemm_batch", "contract_8hpp.html#a9d65831412264dc5ee328f0928c7bfad", null ], + [ "new_delete_resource_object", "allocator_8hpp.html#a418d35e2cc9765f29641cafc4ea4ba38", null ], + [ "orglq", "qr_8hpp.html#a04f78241bcafb1e15dd6b9dcaf0e4d43", null ], + [ "orglq< double >", "qr_8hpp.html#a2a94c2c8202dc6a461a009cc08cab5af", null ], + [ "orglq< float >", "qr_8hpp.html#adbf8ea481b1517564856c22b7e79cd2d", null ], + [ "orgqr", "qr_8hpp.html#a1c07c0feb588b61f9fd29fa5051c4981", null ], + [ "orgqr< double >", "qr_8hpp.html#a32dcaf1a676edb3c7ea1aed5f2907874", null ], + [ "orgqr< float >", "qr_8hpp.html#a2d81f5c7c4855cc46723ec6908203e72", null ], + [ "what_if_copy_shared", "common__variable_8hpp.html#a5ace4712d999d52767ef7253f208a124", null ], + [ "what_if_lapack_error", "common__variable_8hpp.html#a767192ad661109eee8452ca747c1a005", null ] + ] ], + [ "no_initialize", null, [ + [ "pmr", null, [ + [ "vector", "allocator_8hpp.html#a156f923af61f5648f2bc1852e50d7852", null ] + ] ], + [ "vector", "allocator_8hpp.html#a8067213d4c0bd9223e68bd841f7a3883", null ] + ] ], + [ "pmr", null, [ + [ "list", "allocator_8hpp.html#acfd524216b1a1c4d39fb2f20abe86089", null ], + [ "map", "allocator_8hpp.html#ac44ff6c3e5878fcc12eeb8d433942960", null ], + [ "set", "allocator_8hpp.html#a42ada3c2809ae76ec9b46273460aa1cc", null ], + [ "unordered_map", "allocator_8hpp.html#aa9106e06fd12adc94e61d7f324472260", null ], + [ "unordered_set", "allocator_8hpp.html#afc76aeb1587c2b4692b67c0768048195", null ], + [ "vector", "allocator_8hpp.html#a3b0d7e1403e14bf93b80fcb10d886fb8", null ] + ] ], + [ "NameTraits< FastName >", "structTAT_1_1NameTraits_3_01FastName_01_4.html", "structTAT_1_1NameTraits_3_01FastName_01_4" ], + [ "NameTraits< std::string >", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html", "structTAT_1_1NameTraits_3_01std_1_1string_01_4" ], + [ "UnixColorCode", "structTAT_1_1UnixColorCode.html", "structTAT_1_1UnixColorCode" ], + [ "mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html", "structTAT_1_1mpi__one__output__stream" ], + [ "mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html", "structTAT_1_1mpi__rank__output__stream" ], + [ "mpi_t", "structTAT_1_1mpi__t.html", "structTAT_1_1mpi__t" ], + [ "Core", "classTAT_1_1Core.html", "classTAT_1_1Core" ], + [ "edge_segments_t", "classTAT_1_1edge__segments__t.html", "classTAT_1_1edge__segments__t" ], + [ "edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html", "structTAT_1_1edge__bose__arrow__t" ], + [ "edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html", "structTAT_1_1edge__fermi__arrow__t" ], + [ "Edge", "classTAT_1_1Edge.html", "classTAT_1_1Edge" ], + [ "FastName", "classTAT_1_1FastName.html", "classTAT_1_1FastName" ], + [ "InternalName", "structTAT_1_1InternalName.html", "structTAT_1_1InternalName" ], + [ "NameTraits", "structTAT_1_1NameTraits.html", null ], + [ "fermi", "structTAT_1_1fermi.html", null ], + [ "Symmetry", "structTAT_1_1Symmetry.html", "structTAT_1_1Symmetry" ], + [ "RemainCut", "structTAT_1_1RemainCut.html", "structTAT_1_1RemainCut" ], + [ "RelativeCut", "structTAT_1_1RelativeCut.html", "structTAT_1_1RelativeCut" ], + [ "NoCut", "structTAT_1_1NoCut.html", null ], + [ "Cut", "structTAT_1_1Cut.html", "structTAT_1_1Cut" ], + [ "TensorShape", "structTAT_1_1TensorShape.html", "structTAT_1_1TensorShape" ], + [ "Tensor", "classTAT_1_1Tensor.html", "classTAT_1_1Tensor" ], + [ "scope_resource", "structTAT_1_1scope__resource.html", "structTAT_1_1scope__resource" ], + [ "remove_cvref", "structTAT_1_1remove__cvref.html", "structTAT_1_1remove__cvref" ], + [ "type_identity", "structTAT_1_1type__identity.html", "structTAT_1_1type__identity" ], + [ "empty_list", "structTAT_1_1empty__list.html", "structTAT_1_1empty__list" ], + [ "overloaded", "structTAT_1_1overloaded.html", null ], + [ "mdspan", "classTAT_1_1mdspan.html", "classTAT_1_1mdspan" ], + [ "timer", "structTAT_1_1timer.html", "structTAT_1_1timer" ], + [ "Arrow", "namespaceTAT.html#a78326bee7cc963cd2d165718de5c0465", null ], + [ "bose", "namespaceTAT.html#a8a961016ff45e81893384b29d146eee6", null ], + [ "DefaultName", "namespaceTAT.html#a0642e231ccf247522499397715a068c2", null ], + [ "edge_arrow_t", "namespaceTAT.html#a4d5e39e35255bd2dcf7aef942e58fe9d", null ], + [ "EdgePointer", "namespaceTAT.html#ae21b38ad84427829832b86083f28b8cc", null ], + [ "FermiFermiSymmetry", "namespaceTAT.html#a5052c780024af5ae4c5955c42c8e7848", null ], + [ "FermiSymmetry", "namespaceTAT.html#aa28c061821585641d5d3ff71fc2c4960", null ], + [ "FermiU1Symmetry", "namespaceTAT.html#aefba6da15c56fc8323e7ab30044624c9", null ], + [ "FermiZ2Symmetry", "namespaceTAT.html#afa4283fe7df78e7ca6db74f1252916e3", null ], + [ "in_operator_t", "namespaceTAT.html#a85888371cdd8defe66dffb13a3ca2076", null ], + [ "is_detected", "namespaceTAT.html#a4b6f9d765bf49123b445e7000bfe19ac", null ], + [ "NoSymmetry", "namespaceTAT.html#aacb9a1b91b188d91bf9353919a17a194", null ], + [ "Nums", "namespaceTAT.html#a713d18eb8b9832d7eefc21eb22df52c4", null ], + [ "out_operator_t", "namespaceTAT.html#a2bd3fb1837e0b4ae61a011fd3302bae9", null ], + [ "ParitySymmetry", "namespaceTAT.html#ab830827d1c6dc8f4d4b685dec9a8df4e", null ], + [ "Rank", "namespaceTAT.html#a59fa5a93972a6b9079e60c4b8c237eeb", null ], + [ "real_scalar", "namespaceTAT.html#ac116f771206a618203057bffa8074f5c", null ], + [ "remove_cvref_t", "namespaceTAT.html#a257c3ce45b3735b3fbdb0b1732282c33", null ], + [ "Size", "namespaceTAT.html#a165aa7ea040b184dc85762582d2b5a9c", null ], + [ "type_identity_t", "namespaceTAT.html#a377476874ed86fe3247ff3559b1b18dc", null ], + [ "U1", "namespaceTAT.html#acaff1ad08de8cf21a6ad0d08d9f8f07a", null ], + [ "U1Symmetry", "namespaceTAT.html#a1fce66aa6bbe72d7c1d99785e6dffea2", null ], + [ "Z2", "namespaceTAT.html#a9f0315e334e454cc7330c18d2cbd677b", null ], + [ "Z2Symmetry", "namespaceTAT.html#a6f08c4753204137c8192e118cbc04285", null ], + [ "contract", "namespaceTAT.html#ad87023480759ee62f00606ec09d962a0", null ], + [ "contract_with_fuse", "namespaceTAT.html#a3eba06e87c7ca473c065c10f9db30d6a", null ], + [ "contract_without_fuse", "namespaceTAT.html#a23b6ff3bbbdb40390aa75f2ab845ef70", null ], + [ "hash_absorb", "namespaceTAT.html#a4f21d44d814756f9339e8e12ffbfd7e2", null ], + [ "matrix_transpose", "namespaceTAT.html#a2e680ac079273e89f0121721bb3d2c9e", null ], + [ "mdspan_transform", "namespaceTAT.html#a91bebe488e9813387cff45103860cfc4", null ], + [ "operator!=", "namespaceTAT.html#a44563f2033e002a16da8f9c9b4a7d1cf", null ], + [ "operator!=", "namespaceTAT.html#a8b3c0476ed24ff8650e8fd5b363679bc", null ], + [ "operator*", "namespaceTAT.html#a7bd43b663870b5fa36f798e2a7e17562", null ], + [ "operator*", "namespaceTAT.html#a9c240b61015114f3537bd895ecbf1508", null ], + [ "operator*", "namespaceTAT.html#a558d05e485e6b20db81e4aae53ff40a0", null ], + [ "operator*", "namespaceTAT.html#a87a9aaf5195f27693ccb882b655d1c8c", null ], + [ "operator*=", "namespaceTAT.html#a053e5c0d7d761656ee833672f4f44ccf", null ], + [ "operator*=", "namespaceTAT.html#aeb4638c3fc6c117de2516730445bed75", null ], + [ "operator+", "namespaceTAT.html#adc4b0e1fca5c6d410977bd8d26556511", null ], + [ "operator+", "namespaceTAT.html#ab99ec2d624e8a258c0805971759c7c20", null ], + [ "operator+", "namespaceTAT.html#a7dd4828880a779ad810c1d8990aebc66", null ], + [ "operator+", "namespaceTAT.html#a4099028f19ae940f54599d4223c78229", null ], + [ "operator+=", "namespaceTAT.html#a69d0026cd4c2e7b14478c6544c0070cf", null ], + [ "operator+=", "namespaceTAT.html#ad1665c8b30f00b96e586062ad5978f01", null ], + [ "operator-", "namespaceTAT.html#a98cf9c52fd48921a7027a798f2a981c6", null ], + [ "operator-", "namespaceTAT.html#a223cdc779ae84723dbb1f8dda141f7c7", null ], + [ "operator-", "namespaceTAT.html#acefec6590aaea19299029cd8d328c20a", null ], + [ "operator-", "namespaceTAT.html#a6845fb0497221873e74cc87c5b492624", null ], + [ "operator-=", "namespaceTAT.html#ad720483d26ebca23a7b91a0c9165730e", null ], + [ "operator-=", "namespaceTAT.html#a661c8243c69994b08ac04e3f2a884947", null ], + [ "operator/", "namespaceTAT.html#a46fe0f012d83e497619d36a8e0358f3c", null ], + [ "operator/", "namespaceTAT.html#a27618ca0abccaefce93b20933d77e71e", null ], + [ "operator/", "namespaceTAT.html#ad40061b79237f5c0e63be06a3be101bf", null ], + [ "operator/", "namespaceTAT.html#ad633334dea817fad6219ae6edeffc15a", null ], + [ "operator/=", "namespaceTAT.html#a25fa76d2a6bc6f5c0a208241b8ff4696", null ], + [ "operator/=", "namespaceTAT.html#aa713a95f8cae031632e5ec7582f49bdb", null ], + [ "operator<", "namespaceTAT.html#a4cb16202480a072671790dda4f217ac1", null ], + [ "operator<", "namespaceTAT.html#a25ab92707d9f192d2bfc240c4573996c", null ], + [ "operator<", "namespaceTAT.html#a8f99d3e3cca0e0b82393647ace57160f", null ], + [ "operator<", "namespaceTAT.html#a1c9b25458cc9c6ec62c9422a54bccb14", null ], + [ "operator<", "namespaceTAT.html#a4387c288b3b412fdd58d81290048b696", null ], + [ "operator<<", "namespaceTAT.html#a8dd7daad5a8d7c39a0268b8cebe12497", null ], + [ "operator<<", "namespaceTAT.html#a13002a177520161a55c46862200af0a7", null ], + [ "operator<<", "namespaceTAT.html#a14bb7bba0af22950707d8696dcf27f71", null ], + [ "operator<<", "namespaceTAT.html#af074bc67f01c3aa686377f977e833f11", null ], + [ "operator<<", "namespaceTAT.html#a2a3bdc186e2eb08b3d258e81daa9414d", null ], + [ "operator<<", "namespaceTAT.html#acc2f55e19d46917363973d272e6695ff", null ], + [ "operator==", "namespaceTAT.html#a28e1fc81d3a9e17e79962fdd0b15d855", null ], + [ "operator==", "namespaceTAT.html#ab93ddd2f8c1c8d76b1fcafb85c202789", null ], + [ "operator>", "namespaceTAT.html#a90274dfa0c2cf49e3b7cffb580fd85be", null ], + [ "operator>", "namespaceTAT.html#a8619114e5350c68b3dfc562b9b8c486d", null ], + [ "operator>", "namespaceTAT.html#a5e5afe3e6956ef596dcdd2bfba62d24f", null ], + [ "operator>", "namespaceTAT.html#a65c258b3e38a3d1883ed876629b5572c", null ], + [ "operator>", "namespaceTAT.html#a18a8d725957fc91b7c7d4354c3447831", null ], + [ "operator>>", "namespaceTAT.html#a2c7344d49c8fd21291470fb5dd02e865", null ], + [ "operator>>", "namespaceTAT.html#a9929c09c801b973aa84e8e34f2a16301", null ], + [ "operator>>", "namespaceTAT.html#a9f77380a916a18dcb0f168e5665739c1", null ], + [ "operator>>", "namespaceTAT.html#ab679d2e6320623d08a4cf3cfb8d2678f", null ], + [ "overloaded", "namespaceTAT.html#a2c743d6f3e759644e279c26aacf5915c", null ], + [ "print_fastname_for_name", "namespaceTAT.html#aeb0579c63393be4d82d04421f60d8c78", null ], + [ "print_string_for_name", "namespaceTAT.html#a0d502066f73035565ca1214ffd8bdd52", null ], + [ "read_fastname_for_name", "namespaceTAT.html#a761b31643d594896812339fe7ce73327", null ], + [ "read_string_for_name", "namespaceTAT.html#a1faae795a9bd9b5ba169ada60bdbe461", null ], + [ "scan_fastname_for_name", "namespaceTAT.html#a1df151abfc11c364fdad8b358b387a48", null ], + [ "scan_string_for_name", "namespaceTAT.html#aa110d47ac565ae2779de3de5ff635c59", null ], + [ "to_const_integral", "namespaceTAT.html#a310b619f23bfbff05a8bb9f0fe28b198", null ], + [ "to_const_integral_0_to_16", "namespaceTAT.html#a502965ec85fd816764a376bab412faf3", null ], + [ "trace_with_fuse", "namespaceTAT.html#af2a118f08f742b75afe835daba6fdb91", null ], + [ "trace_without_fuse", "namespaceTAT.html#aca3223eb1d72c9dd625cb0e0310cc8f5", null ], + [ "write_fastname_for_name", "namespaceTAT.html#a8eebcfddb1e0738a33ac290904ba45c6", null ], + [ "write_string_for_name", "namespaceTAT.html#a5703b34050460a0eb928d65e7efbf99b", null ], + [ "conjugate_guard", "namespaceTAT.html#a972d66e56d3ea52097e02a22719a848c", null ], + [ "console_blue", "namespaceTAT.html#a812c17cc2001a142260ae10bb8c4c1e6", null ], + [ "console_green", "namespaceTAT.html#a33f7b66a780be2a3c25a97fb51ff9fc9", null ], + [ "console_origin", "namespaceTAT.html#a38c688241972425df2d55d7c13e93ed7", null ], + [ "console_red", "namespaceTAT.html#a1ff0950988386a714f0f9e737f79aa8b", null ], + [ "console_yellow", "namespaceTAT.html#a4abd9dd3c1973d84ec13109f1a219b89", null ], + [ "contract_guard", "namespaceTAT.html#aa067943298228377128a6e4b16e65350", null ], + [ "contract_kernel_guard", "namespaceTAT.html#a3255badd634a0d77996a634bb8eaaf83", null ], + [ "debug_mode", "namespaceTAT.html#a6d44e6f53051ef6947a1906a0d5e7a2f", null ], + [ "default_buffer_size", "namespaceTAT.html#a4b6b207de36a27793b710ea1208d8b0e", null ], + [ "expand_guard", "namespaceTAT.html#a976ff40ebd1f82de3e181ffaec939fb6", null ], + [ "exponential_guard", "namespaceTAT.html#a635cad001bc619a9b4cbd587e16b0c48", null ], + [ "information", "namespaceTAT.html#a4bd3f61e9cfc98419950be0791e15e1d", null ], + [ "is_complex", "namespaceTAT.html#a924c2c0559af13f5c90b56acec224f37", null ], + [ "is_detected_v", "namespaceTAT.html#ab1ee68ca346aaa0989b16cc4d3f3ad58", null ], + [ "is_edge", "namespaceTAT.html#aab7a6d99c30988d863264780441266c4", null ], + [ "is_edge_pointer", "namespaceTAT.html#ac06843b7eba1277c89d82d35f1e677c4", null ], + [ "is_general_edge", "namespaceTAT.html#aee2225a59e59910bc7ac1b9f1f40936c", null ], + [ "is_name", "namespaceTAT.html#abe997f7e8402883a5e89b0cbf3f60af2", null ], + [ "is_real", "namespaceTAT.html#af164463714182ae66c7100157f741286", null ], + [ "is_scalar", "namespaceTAT.html#a092a64e24ac3617c86d8635f6eb7cc46", null ], + [ "is_symmetry", "namespaceTAT.html#aebd8b134e9b359acd653ad1aab1a37e1", null ], + [ "is_tensor", "namespaceTAT.html#a8d892d6579cfeb06dc84a00cb05348cb", null ], + [ "mpi", "namespaceTAT.html#a8023345bfaa3e140a1b117a7aa5244d9", null ], + [ "mpi_broadcast_guard", "namespaceTAT.html#a32aa0eb030296986f9bec7061cefa186", null ], + [ "mpi_receive_guard", "namespaceTAT.html#a38c255827ff7f4da9fb3928f96a5c743", null ], + [ "mpi_reduce_guard", "namespaceTAT.html#a013442988c8b371b846db565f525a615", null ], + [ "mpi_send_guard", "namespaceTAT.html#afb0b2dd4c1e61c2be89bebcfecbdf4a5", null ], + [ "qr_guard", "namespaceTAT.html#a99aebf9653e8cc827e66eef33fa736c3", null ], + [ "qr_kernel_guard", "namespaceTAT.html#a4ae81b142da61bc09271872fd59b95d9", null ], + [ "scalar_inplace_guard", "namespaceTAT.html#abc51e2d3cb81c712c8fff5d276dfba72", null ], + [ "scalar_outplace_guard", "namespaceTAT.html#a569376608583a332cf2b98a6fabcf06c", null ], + [ "serializable", "namespaceTAT.html#a4d4ea72f38e5a29f0b74ce0d3ee27bfd", null ], + [ "shrink_guard", "namespaceTAT.html#a427acc06f47984c8afe06d006e815c69", null ], + [ "svd_guard", "namespaceTAT.html#a5b2976cd695c711243a32430788fbea7", null ], + [ "svd_kernel_guard", "namespaceTAT.html#a37f97a54937a6075ee0a69e7f5de92c5", null ], + [ "target_preset_name_of_fastname_Contract_0", "namespaceTAT.html#a2f17c34ac30cae22d26a81d6e9e2df20", null ], + [ "target_preset_name_of_fastname_Contract_1", "namespaceTAT.html#a2cae5c7573098086c6ee03960e767130", null ], + [ "target_preset_name_of_fastname_Contract_2", "namespaceTAT.html#aaa3e97867fb354fd83d749e43f5c949a", null ], + [ "target_preset_name_of_fastname_Exp_1", "namespaceTAT.html#a37834bf30b726067e700635344ce8683", null ], + [ "target_preset_name_of_fastname_Exp_2", "namespaceTAT.html#a0aa539127f2d0c216bc0a9ac2fb6a6da", null ], + [ "target_preset_name_of_fastname_No_New_Name", "namespaceTAT.html#adf67d39c003c47434d230079e470035e", null ], + [ "target_preset_name_of_fastname_No_Old_Name", "namespaceTAT.html#a1bc4b193e73e23e23a58790095fc2395", null ], + [ "target_preset_name_of_fastname_QR_1", "namespaceTAT.html#a5ed6ccd3fc8ffd509c9c646e6e5015ca", null ], + [ "target_preset_name_of_fastname_QR_2", "namespaceTAT.html#a7cb0cab51d6986f788aec7426759ae85", null ], + [ "target_preset_name_of_fastname_SVD_U", "namespaceTAT.html#a4ef4ab4953fbb3bae9c7ae8d355f292e", null ], + [ "target_preset_name_of_fastname_SVD_V", "namespaceTAT.html#aa3e4ca82783fb79c415faa79f7764247", null ], + [ "target_preset_name_of_fastname_Trace_1", "namespaceTAT.html#a91990fa5c2ce77ce6cb052e11a2a44d5", null ], + [ "target_preset_name_of_fastname_Trace_2", "namespaceTAT.html#ad111ce30e0f0740c91013d3ecee0c5e4", null ], + [ "target_preset_name_of_fastname_Trace_3", "namespaceTAT.html#afb25765c7db55c3bf5e203c095b0a107", null ], + [ "target_preset_name_of_fastname_Trace_4", "namespaceTAT.html#ac92f4b27a4e2c0769e46f66a4a80ac16", null ], + [ "target_preset_name_of_fastname_Trace_5", "namespaceTAT.html#a1c6822042e7841af26394aff06381d77", null ], + [ "target_preset_name_of_string_Contract_0", "namespaceTAT.html#a80d41a66cf1b88f3a50a2feb600b3295", null ], + [ "target_preset_name_of_string_Contract_1", "namespaceTAT.html#a73a67144fcb52ef97526f9acda942ba3", null ], + [ "target_preset_name_of_string_Contract_2", "namespaceTAT.html#ae6588489ef50db311a9fb5f8a1abd9a8", null ], + [ "target_preset_name_of_string_Exp_1", "namespaceTAT.html#a87f1e52349c8afc3ca76ee132f61475c", null ], + [ "target_preset_name_of_string_Exp_2", "namespaceTAT.html#a952548c131e1792d9b59ed05d08e2826", null ], + [ "target_preset_name_of_string_No_New_Name", "namespaceTAT.html#af79930fda1075e6936edfe5bbe712770", null ], + [ "target_preset_name_of_string_No_Old_Name", "namespaceTAT.html#a8fd7f63bce2ebeee5cf5665251f71c30", null ], + [ "target_preset_name_of_string_QR_1", "namespaceTAT.html#ae89634908d2d10b1539a97f3923af0fe", null ], + [ "target_preset_name_of_string_QR_2", "namespaceTAT.html#af0c365268cc002ead84468622c17ac92", null ], + [ "target_preset_name_of_string_SVD_U", "namespaceTAT.html#a65d4cf69c0cf4f4c18a2c078a3df9280", null ], + [ "target_preset_name_of_string_SVD_V", "namespaceTAT.html#ad127dd41cde5503f87c6c3c844c5a2de", null ], + [ "target_preset_name_of_string_Trace_1", "namespaceTAT.html#a638f4c8bf9e91301e4a16c2320fe79de", null ], + [ "target_preset_name_of_string_Trace_2", "namespaceTAT.html#a0243b14e55a31f23147eec45bdc7219d", null ], + [ "target_preset_name_of_string_Trace_3", "namespaceTAT.html#a62d0b0144445b24a8172bb18155b2439", null ], + [ "target_preset_name_of_string_Trace_4", "namespaceTAT.html#acaea1a2ae826b3273b077a379d1dcbb6", null ], + [ "target_preset_name_of_string_Trace_5", "namespaceTAT.html#a12fc2e049a1b956db9679b41584258a0", null ], + [ "tensor_dump_guard", "namespaceTAT.html#a87e28d5ac0c66617c2ff533c33b718f8", null ], + [ "tensor_load_guard", "namespaceTAT.html#a3e02c525317003507713a8725c968c2c", null ], + [ "trace_guard", "namespaceTAT.html#acca638529aa0d6db06d5dc7f29c2fcd1", null ], + [ "transform_kernel_guard", "namespaceTAT.html#a60595d7f51c84fb44e614d26e4d83a39", null ], + [ "transpose_guard", "namespaceTAT.html#af0b77c4e8a6ad17b3ef9952aa06cf4ac", null ], + [ "unordered_parameter", "namespaceTAT.html#ac52a5088a37c7f96a36b2ab72b8893ba", null ], + [ "version", "namespaceTAT.html#a8c4989bfe390f6c51321f9353b638e23", null ] +]; \ No newline at end of file diff --git a/namespacemembers.html b/namespacemembers.html new file mode 100644 index 000000000..90df70960 --- /dev/null +++ b/namespacemembers.html @@ -0,0 +1,139 @@ + + + + + + + +TAT: Namespace Members + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Here is a list of all documented namespace members with links to the namespaces they belong to:
      +
    • Arrow +: TAT +
    • +
    • debug_mode +: TAT +
    • +
    • EdgePointer +: TAT +
    • +
    • information +: TAT +
    • +
    • is_name +: TAT +
    • +
    • is_symmetry +: TAT +
    • +
    • Nums +: TAT +
    • +
    • Rank +: TAT +
    • +
    • real_scalar +: TAT +
    • +
    • Size +: TAT +
    • +
    • to_const_integral() +: TAT +
    • +
    • U1 +: TAT +
    • +
    • version +: TAT +
    • +
    • Z2 +: TAT +
    • +
    +
    +
    + + + + diff --git a/namespacemembers_func.html b/namespacemembers_func.html new file mode 100644 index 000000000..2a2d8889f --- /dev/null +++ b/namespacemembers_func.html @@ -0,0 +1,100 @@ + + + + + + + +TAT: Namespace Members + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
      +
    • to_const_integral() +: TAT +
    • +
    +
    +
    + + + + diff --git a/namespacemembers_type.html b/namespacemembers_type.html new file mode 100644 index 000000000..5c7e084a9 --- /dev/null +++ b/namespacemembers_type.html @@ -0,0 +1,121 @@ + + + + + + + +TAT: Namespace Members + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
      +
    • Arrow +: TAT +
    • +
    • EdgePointer +: TAT +
    • +
    • Nums +: TAT +
    • +
    • Rank +: TAT +
    • +
    • real_scalar +: TAT +
    • +
    • Size +: TAT +
    • +
    • U1 +: TAT +
    • +
    • Z2 +: TAT +
    • +
    +
    +
    + + + + diff --git a/namespacemembers_vars.html b/namespacemembers_vars.html new file mode 100644 index 000000000..f71761df4 --- /dev/null +++ b/namespacemembers_vars.html @@ -0,0 +1,112 @@ + + + + + + + +TAT: Namespace Members + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
      +
    • debug_mode +: TAT +
    • +
    • information +: TAT +
    • +
    • is_name +: TAT +
    • +
    • is_symmetry +: TAT +
    • +
    • version +: TAT +
    • +
    +
    +
    + + + + diff --git a/namespaces.html b/namespaces.html new file mode 100644 index 000000000..20ef383f2 --- /dev/null +++ b/namespaces.html @@ -0,0 +1,203 @@ + + + + + + + +TAT: Namespace List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Namespace List
    +
    +
    +
    Here is a list of all documented namespaces with brief descriptions:
    +
    [detail level 1234]
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Nlazy
     CCopyA helper class used to copy entire lazy node graph
     CNodeLazy node type, used to build a lazy evaluation graph, the value of it may be reset and when trying to get value of it, the needed node will be calculated automatically
     NstdSTL namespace
     Chash< TAT::FastName >
     Chash< pair< Name, Name > >
     Chash< TAT::Symmetry< T... > >
     NTATTAT is A Tensor library
     Ndetail
     Nno_initialize
     Npmr
     CNameTraits< FastName >
     CNameTraits< std::string >
     CUnixColorCodeA type control console color
     Cmpi_one_output_streamWrapper for ostream, the stream will only output in the rank which is specified when creating
     Cmpi_rank_output_streamWrapper for ostream, the stream will output the rank which is psecified when creating
     Cmpi_tMPI handler type
     CCoreContains nearly all tensor data except edge name, include edge shape and tensor content
     Cedge_segments_t
     Cedge_bose_arrow_t
     Cedge_fermi_arrow_t
     CEdgeThe shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like line segment
     CFastNameFastName as tensor edge name
     CInternalNameFor every Name type, some internal name is needed
     CNameTraitsName type also need input and output method
     Cfermi
     CSymmetryGeneral symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied
     CRemainCut
     CRelativeCut
     CNoCut
     CCutUsed to describle how to cut when doing svd to a tensor
     CTensorShape
     CTensorTensor type
     Cqr_resultQR result type
     Csvd_resultSVD result type
     Cscope_resource
     Cremove_cvref
     Ctype_identity
     Cempty_list
     Coverloaded
     Cmdspan
     Citerator_general
     Ctimer
     Ctimer_guard
     Ntetragono
     Nabstract_lattice
     CAbstractLatticeVirtualBondVirtual bond handler for abstract lattice
     CAbstractLatticeThe abstract lattice
     Nabstract_state
     CAbstractStatePhysicsEdgePhysics edge handler for abstract state
     CAbstractStateHamiltonianHamiltonian handler for abstract state
     CAbstractStateAbstract state, which is used to construct other type of state
     Nauxiliaries
     Ndouble_layer_auxiliaries
     Nsingle_layer_auxiliaries
     Nthree_line_auxiliaries
     Ncommon_tensor
     NFermi
     NFermi_Hubbard
     NFermiFermi_Hubbard
     NFermiU1_Hubbard
     NFermiU1_tJ
     NNo
     NParity
     NParity_Hubbard
     Ntensor_toolkit
     Nconversion
     Nexact_state
     CExactStateState for exact diagonalization
     Nsampling_lattice
     Ngradient
     Nlattice
     Nobserver
     Nsampling
     Nshell
     CConfig
     CAutoCmdMeta
     CAutoCmd
     CTetragonoCommandApp
     CTetragonoScriptApp
     Nsimple_update_lattice
     CSimpleUpdateLatticeEnvironmentEnvironment handler for simple update lattice
     CSimpleUpdateLatticeThe lattice used to do simple update
     Ntensor_element
     Nutility
     CSignalHandler
     CSeedDiffer
    +
    +
    +
    + + + + diff --git a/namespaces_dup.js b/namespaces_dup.js new file mode 100644 index 000000000..0556c057b --- /dev/null +++ b/namespaces_dup.js @@ -0,0 +1,275 @@ +var namespaces_dup = +[ + [ "lazy", null, [ + [ "Copy", "classlazy_1_1Copy.html", "classlazy_1_1Copy" ], + [ "Node", "classlazy_1_1Node.html", "classlazy_1_1Node" ], + [ "Root", "lazy__graph_2lazy_2____init_____8py.html#a15920ab1db7d09982bf702a0e61ba167", null ] + ] ], + [ "std", null, [ + [ "hash< TAT::FastName >", "structstd_1_1hash_3_01TAT_1_1FastName_01_4.html", "structstd_1_1hash_3_01TAT_1_1FastName_01_4" ], + [ "hash< pair< Name, Name > >", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4" ], + [ "hash< TAT::Symmetry< T... > >", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4" ] + ] ], + [ "TAT", "namespaceTAT.html", "namespaceTAT" ], + [ "tetragono", null, [ + [ "abstract_lattice", null, [ + [ "AbstractLatticeVirtualBond", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html", "classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond" ], + [ "AbstractLattice", "classtetragono_1_1abstract__lattice_1_1AbstractLattice.html", "classtetragono_1_1abstract__lattice_1_1AbstractLattice" ] + ] ], + [ "abstract_state", null, [ + [ "AbstractStatePhysicsEdge", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html", "classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge" ], + [ "AbstractStateHamiltonian", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html", "classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian" ], + [ "AbstractState", "classtetragono_1_1abstract__state_1_1AbstractState.html", "classtetragono_1_1abstract__state_1_1AbstractState" ] + ] ], + [ "auxiliaries", null, [ + [ "double_layer_auxiliaries", null, [ + [ "DoubleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries" ] + ] ], + [ "single_layer_auxiliaries", null, [ + [ "SingleLayerAuxiliaries", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries" ] + ] ], + [ "three_line_auxiliaries", null, [ + [ "ThreeLineAuxiliaries", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html", "classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries" ] + ] ] + ] ], + [ "common_tensor", null, [ + [ "Fermi", null, [ + [ "C0C1", "Fermi_8py.html#a7f0faefb488f2feee6a6720069e9c8c6", null ], + [ "C1C0", "Fermi_8py.html#a75b8d91b10041cf616cd468292bfa325", null ], + [ "CC", "Fermi_8py.html#a012218863d2ebfd8b37e92a6ef11ba15", null ], + [ "CM", "Fermi_8py.html#a5f18b742a9ed770c360ff5cebaeb2935", null ], + [ "CP", "Fermi_8py.html#a3d881ce6acad90697d49429166dc9606", null ], + [ "EF", "Fermi_8py.html#a709b88c128ce47a7755264c900a821d0", null ], + [ "ET", "Fermi_8py.html#a0e9535f58bfbd680b248c46f6fd78abe", null ], + [ "I", "Fermi_8py.html#ad56d6da8d9c91b866f8680491c77bc1f", null ], + [ "N", "Fermi_8py.html#a9f531dbf2c13275742a46f33ec56cd28", null ], + [ "Tensor", "Fermi_8py.html#abfc3a2822bb00e2299d2a6367e36ade9", null ] + ] ], + [ "Fermi_Hubbard", null, [ + [ "CDCD", "Fermi__Hubbard_8py.html#ad6f479e4e88046b3d24608b1dbd43982", null ], + [ "CDCU", "Fermi__Hubbard_8py.html#abc025b91548ba132e5ba1254f5813f66", null ], + [ "CSCS", "Fermi__Hubbard_8py.html#ae580cfe6f39e9227351334891d396f90", null ], + [ "CUCD", "Fermi__Hubbard_8py.html#a2e24dfb020e3ffe5c6cc741519597704", null ], + [ "CUCU", "Fermi__Hubbard_8py.html#af5cd715d0692f099f2a0917802add796", null ], + [ "N0", "Fermi__Hubbard_8py.html#a4edf0422d219b02575289651f934f5c7", null ], + [ "N1", "Fermi__Hubbard_8py.html#ac536b648581df0480468e40de041beec", null ], + [ "NN", "Fermi__Hubbard_8py.html#abdf051256c29bb020166e4206ed4dd3c", null ], + [ "put_sign_in_H", "Fermi__Hubbard_8py.html#a89f4d04e55cce36202bb98903c1c2eb2", null ] + ] ], + [ "FermiFermi_Hubbard", null, [ + [ "_generate_Up_and_Down", "FermiFermi__Hubbard_8py.html#a0a1d5f88b3eb75ff19b48234de149ec1", null ], + [ "CSCS", "FermiFermi__Hubbard_8py.html#a889b1e9b4ce259492024eaf8043e6d1a", null ], + [ "Down", "FermiFermi__Hubbard_8py.html#abbf3ab903b84e7c9c50655e171dd3c9c", null ], + [ "EF", "FermiFermi__Hubbard_8py.html#ad78cceb99dbcef0daddeb1e79f3d2a1c", null ], + [ "ET", "FermiFermi__Hubbard_8py.html#a25bf529df3b4f5e57c670ad531407ac0", null ], + [ "NN", "FermiFermi__Hubbard_8py.html#a82fd1cd79c8ae8d200a04a5793e54d7f", null ], + [ "Tensor", "FermiFermi__Hubbard_8py.html#a8a5e09ae54efddc765539a5ae8ea7950", null ], + [ "Up", "FermiFermi__Hubbard_8py.html#a7cdcc3098a11b2a79784da78146a4dbc", null ] + ] ], + [ "FermiU1_Hubbard", null, [ + [ "_generate_Up_and_Down", "FermiU1__Hubbard_8py.html#a99db501080affaf6736bd3cc7392de74", null ], + [ "CSCS", "FermiU1__Hubbard_8py.html#a46f8e115ff92528c68235970b0e2c32a", null ], + [ "Down", "FermiU1__Hubbard_8py.html#adc1342a48807ea67fcbace8f9f0d7ad5", null ], + [ "EF", "FermiU1__Hubbard_8py.html#aa79ebd1ebb62ffb0ec4645565feb6cce", null ], + [ "ET", "FermiU1__Hubbard_8py.html#a3d0d7158857265d600617c60c39610c7", null ], + [ "NN", "FermiU1__Hubbard_8py.html#addd07732b3e63567d0cf2bd15c8cd0aa", null ], + [ "Tensor", "FermiU1__Hubbard_8py.html#abb59984f5754ca153caa06c046178269", null ], + [ "Up", "FermiU1__Hubbard_8py.html#a180af32bb03ecf65d4819c679f498682", null ] + ] ], + [ "FermiU1_tJ", null, [ + [ "C0DC1D", "FermiU1__tJ_8py.html#ad072d6527d73bd9b5d891c45a82be355", null ], + [ "C0UC1U", "FermiU1__tJ_8py.html#a4fbc368cd308152df2881097c726994f", null ], + [ "C1DC0D", "FermiU1__tJ_8py.html#ab6fc95a3d1070129fd6cbf21f446576a", null ], + [ "C1UC0U", "FermiU1__tJ_8py.html#ac8f2fe1ab66b8998682643780a9f6da6", null ], + [ "CC", "FermiU1__tJ_8py.html#a57c2460a0a8b453673cd5906748de308", null ], + [ "CMD", "FermiU1__tJ_8py.html#a974bdcf84a3dfb8c07e7e6f39fe18ad8", null ], + [ "CMU", "FermiU1__tJ_8py.html#ad0d43b851a0079cbe301d9ae665b27a9", null ], + [ "CPD", "FermiU1__tJ_8py.html#adfae0362336af60e36d8c65c27880037", null ], + [ "CPU", "FermiU1__tJ_8py.html#a23f97ffa7ca9c418f192b231b5288841", null ], + [ "EF", "FermiU1__tJ_8py.html#ab3e0ce34c4e2c3cee7605f10a205d154", null ], + [ "ET", "FermiU1__tJ_8py.html#a6450b33da023565df751d8c36a217ab9", null ], + [ "n", "FermiU1__tJ_8py.html#a78f4ccd01fee3931184aa1fc91ecd362", null ], + [ "nn", "FermiU1__tJ_8py.html#aa9e2c87ee7d776e496033d66c1122619", null ], + [ "SS", "FermiU1__tJ_8py.html#a040bb50a81a1e906a1433a7b2c38635f", null ], + [ "SxSxSySy2", "FermiU1__tJ_8py.html#a21db0a03663cf27eb82c1b5b48daab01", null ], + [ "Sz2", "FermiU1__tJ_8py.html#a427929a0aa92ef4c093637f0b7a3e287", null ], + [ "SzSz4", "FermiU1__tJ_8py.html#a397bd83f5d1d037a546bc075dc644e9f", null ], + [ "Tensor", "FermiU1__tJ_8py.html#a9c7d302f4c15931b43eabd009910296e", null ] + ] ], + [ "No", null, [ + [ "identity", "No_8py.html#a6d9a6ede304f5b16c681e9ea0c432e99", null ], + [ "pauli_x", "No_8py.html#a3e5be09d3be864d9e7c617eae24bea16", null ], + [ "pauli_x_pauli_x", "No_8py.html#aae7f69ed1d59364cea595e446e53ee79", null ], + [ "pauli_y", "No_8py.html#a778ae2c1fd05b2c6fd652c4513cb3cf0", null ], + [ "pauli_y_pauli_y", "No_8py.html#a71eefce19ff65d0ac016a409c664e817", null ], + [ "pauli_z", "No_8py.html#a5c3a569026534327fbf4a2282ce7162c", null ], + [ "pauli_z_pauli_z", "No_8py.html#aaf77e544c301e018e70cee5e9c76f3c9", null ], + [ "SS", "No_8py.html#ae073f5d4477d9c0899996f3b2202c70b", null ], + [ "Sx", "No_8py.html#aa28811fa93a8e92123a8d49654d043d9", null ], + [ "SxSx", "No_8py.html#a9efeb6d87d0c841ec08fe231705cfae7", null ], + [ "Sy", "No_8py.html#af0112ed1249c013fb07ef161173b3c22", null ], + [ "SySy", "No_8py.html#a2a28e8661d0fb3f7154c36c35dd9dc13", null ], + [ "Sz", "No_8py.html#a9cad21e6ad2426716bdd7bd4551bc10a", null ], + [ "SzSz", "No_8py.html#a3fa794b321faa13462e8dc0e43f6aa6b", null ], + [ "Tensor", "No_8py.html#a923b8301401aad2fdae8298f893231ca", null ] + ] ], + [ "Parity", null, [ + [ "C0C1", "Parity_8py.html#a2ec0236201d974abbf9aa39acc19faff", null ], + [ "C1C0", "Parity_8py.html#afd1bb24cec627b73111235d17b2d8370", null ], + [ "CC", "Parity_8py.html#a2aa459fd566733c9957025746ee99366", null ], + [ "CM", "Parity_8py.html#accd739da6498cddc9305cfe810dda848", null ], + [ "CM2", "Parity_8py.html#a5d377683299815975651934582274eeb", null ], + [ "CP", "Parity_8py.html#aad0488c192b37bf0dd27870205271114", null ], + [ "CP2", "Parity_8py.html#a58cdab770c6d7ea629dcb746742be4e6", null ], + [ "EF", "Parity_8py.html#a267b7ddf6abb2463035cb3842efc7232", null ], + [ "ET", "Parity_8py.html#a150945bce89a8cfbf36d7fa05665d723", null ], + [ "I", "Parity_8py.html#aa9773cf5cd5ade94f21438a4d822cade", null ], + [ "N", "Parity_8py.html#a152148b1ecc687401c9ce3d5195d2a55", null ], + [ "Tensor", "Parity_8py.html#aaaf4e0cd495e07348af2a669d5df131b", null ] + ] ], + [ "Parity_Hubbard", null, [ + [ "CDCD", "Parity__Hubbard_8py.html#abf5dd4502fe2d2a372b3818c5a675c32", null ], + [ "CDCU", "Parity__Hubbard_8py.html#a3be9ad178b59b95fa63f9de8a41b3370", null ], + [ "CSCS", "Parity__Hubbard_8py.html#a28ea3595f94f22d56dceca26ba56a123", null ], + [ "CUCD", "Parity__Hubbard_8py.html#aa0d36885313b9b495f7b4b056de400c1", null ], + [ "CUCU", "Parity__Hubbard_8py.html#adc081f64c92bb923263470e71bcb69b9", null ], + [ "N0", "Parity__Hubbard_8py.html#a6fbbf0fd110b59609b1541b8611fe6b9", null ], + [ "N1", "Parity__Hubbard_8py.html#a7a90f9e836f4e0806fe4fb6456abcf6f", null ], + [ "NN", "Parity__Hubbard_8py.html#a35c15e4a436afa7ad03cebad04832ec2", null ], + [ "put_sign_in_H", "Parity__Hubbard_8py.html#ae58418c2fffa1434e374a42463b0c350", null ], + [ "singlet", "Parity__Hubbard_8py.html#a84fa37f9f48c60488a54808b826374d9", null ], + [ "triplet", "Parity__Hubbard_8py.html#a924059c13193ec0e5abd894320be5fe3", null ] + ] ], + [ "tensor_toolkit", null, [ + [ "FakeEdge", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html", "classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge" ], + [ "half_reverse", "tensor__toolkit_8py.html#a2e346f10c32fc795a997e606359305e0", null ], + [ "kronecker_product", "tensor__toolkit_8py.html#abda6a000f333d34f8c1ab59a5235e554", null ], + [ "rename_io", "tensor__toolkit_8py.html#a8382ae21fe9a3206d1425c2f66695839", null ], + [ "Fedge", "tensor__toolkit_8py.html#aee4513330f170892ab705e146df680b9", null ], + [ "Tedge", "tensor__toolkit_8py.html#a3872056661a945654d62fcacdd025519", null ] + ] ] + ] ], + [ "conversion", null, [ + [ "sampling_lattice_to_exact_state", "conversion_8py.html#a6428a558dffaa765a68cfb2667c88b42", null ], + [ "simple_update_lattice_to_exact_state", "conversion_8py.html#a60b3b52a0a4f42b9a453489caacf6db4", null ], + [ "simple_update_lattice_to_sampling_lattice", "conversion_8py.html#a96e97a61bebc5f36e2c05d3eaf17a3c0", null ] + ] ], + [ "exact_state", null, [ + [ "ExactState", "classtetragono_1_1exact__state_1_1ExactState.html", "classtetragono_1_1exact__state_1_1ExactState" ] + ] ], + [ "sampling_lattice", null, [ + [ "gradient", null, [ + [ "check_difference", "gradient_8py.html#abbc68c81a6ae6820720dfe880263b77c", null ], + [ "gradient_descent", "gradient_8py.html#a9c67fe58b01ed561e274d743641d43e5", null ], + [ "line_search", "gradient_8py.html#a8c4b51e353a85f5c79899e2e1c258850", null ] + ] ], + [ "lattice", null, [ + [ "Configuration", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration" ], + [ "TailDictTree", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree" ], + [ "ConfigurationPool", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool" ], + [ "SamplingLattice", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html", "classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice" ] + ] ], + [ "observer", null, [ + [ "Observer", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html", "classtetragono_1_1sampling__lattice_1_1observer_1_1Observer" ] + ] ], + [ "sampling", null, [ + [ "Sampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling" ], + [ "SweepSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling" ], + [ "ErgodicSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling" ], + [ "DirectSampling", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html", "classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling" ] + ] ] + ] ], + [ "shell", null, [ + [ "Config", "classtetragono_1_1shell_1_1Config.html", "classtetragono_1_1shell_1_1Config" ], + [ "AutoCmdMeta", "classtetragono_1_1shell_1_1AutoCmdMeta.html", "classtetragono_1_1shell_1_1AutoCmdMeta" ], + [ "AutoCmd", "classtetragono_1_1shell_1_1AutoCmd.html", "classtetragono_1_1shell_1_1AutoCmd" ], + [ "TetragonoCommandApp", "classtetragono_1_1shell_1_1TetragonoCommandApp.html", "classtetragono_1_1shell_1_1TetragonoCommandApp" ], + [ "TetragonoScriptApp", "classtetragono_1_1shell_1_1TetragonoScriptApp.html", "classtetragono_1_1shell_1_1TetragonoScriptApp" ], + [ "app", "shell_8py.html#a27d9ae80ef8680196626f4bf61656620", null ], + [ "commands", "shell_8py.html#a105880d9f687b37ab951b8a9651741c5", null ], + [ "encoding", "shell_8py.html#a0f8b8495352f7d48cfdc1b2935afd300", null ], + [ "ex_create", "shell_8py.html#a2ecfc50e20fbf32af6da018edf246e37", null ], + [ "ex_dump", "shell_8py.html#a645412b293b20bd3625ce7184fa4ba42", null ], + [ "ex_energy", "shell_8py.html#a11765d86d27e48f7da990be7a79f03fe", null ], + [ "ex_load", "shell_8py.html#aaea01bdecb0b6e670cb5c1eb0acd88f4", null ], + [ "ex_update", "shell_8py.html#a586676890f0b4f6aaa052c31c08b6bb3", null ], + [ "gm_clear_symmetry", "shell_8py.html#a1f006c64dc711ee3e6b0a6a39657649a", null ], + [ "gm_conf_create", "shell_8py.html#a4d78e6ffe7d32ba3472ada1b8d86819f", null ], + [ "gm_conf_dump", "shell_8py.html#ab5e843e9b124f4903c91b8e0a0e1cdfe", null ], + [ "gm_conf_eq", "shell_8py.html#a0f4727fc3c9a2d8425fccbb4bb9eae5b", null ], + [ "gm_conf_load", "shell_8py.html#a56766cfa1f02177899c2634265b6a8de", null ], + [ "gm_conf_load_compat", "shell_8py.html#a507634e7292f6a69794cfb18476d20b6", null ], + [ "gm_create", "shell_8py.html#a1a35f26cfaa28027e2d7f19071f88e18", null ], + [ "gm_dump", "shell_8py.html#a549dcc0eb72e4a13d7609bfdfbcfff2f", null ], + [ "gm_expand", "shell_8py.html#a4efdad23363f04b4cdcd7d86c799b96b", null ], + [ "gm_hamiltonian", "shell_8py.html#a7ff6fe2bf35f7cff71d81c3fe4692dc6", null ], + [ "gm_load", "shell_8py.html#a524890d7de9323b9845c32934c5e2e36", null ], + [ "gm_run", "shell_8py.html#ab840d2bd861da46e49077a42e0f7472a", null ], + [ "gm_run_g", "shell_8py.html#aedf9fa54a975c9f487b22330362d9c92", null ], + [ "gm_to_ex", "shell_8py.html#a0a7c18791e5282b9831a682aae4638ee", null ], + [ "help_message", "shell_8py.html#abdefbf790cab78235562df60cbb3da57", null ], + [ "numpy_hamiltonian", "shell_8py.html#acbc1b09da03ceeb0fa6baeae20802921", null ], + [ "script_file", "shell_8py.html#a86ed0720f0860248d14042d435ab55cb", null ], + [ "script_file_name", "shell_8py.html#a8f97083e6a7073394f2d1aa239ca9953", null ], + [ "seed", "shell_8py.html#ad9be9dff48992fa32c82b7e29501b1eb", null ], + [ "shell", "shell_8py.html#a1f420b8831cfc505400ed1fa1e1d9513", null ], + [ "stdin", "shell_8py.html#ad38060fc6e49fe7ae7746751dfcfb385", null ], + [ "su_create", "shell_8py.html#a3ece26f6b9e89b792024fe4f8fe36c67", null ], + [ "su_dump", "shell_8py.html#a94a82c20b5ec0e7032b895639585f95f", null ], + [ "su_energy", "shell_8py.html#a475b7d19a337a55a12c8c6ba1602820f", null ], + [ "su_load", "shell_8py.html#a085ce85af358a10d958a00d12b8ede69", null ], + [ "su_to_ex", "shell_8py.html#acb1e586e582e1a11e9821f2e87e4498c", null ], + [ "su_to_gm", "shell_8py.html#a11ba48df4841b1fa6bdc9afd2278d239", null ], + [ "su_update", "shell_8py.html#a07ede394127cb2f6d7cb567d17c5764c", null ] + ] ], + [ "simple_update_lattice", null, [ + [ "SimpleUpdateLatticeEnvironment", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment" ], + [ "SimpleUpdateLattice", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html", "classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice" ], + [ "max_parallel_size_shown", "simple__update__lattice_8py.html#a72666096d74a823943d745c6d959e231", null ] + ] ], + [ "tensor_element", null, [ + [ "calculate_element", "tensor__element_8py.html#a68fadeb5abc54794d355c27db4428427", null ], + [ "conjugate_symmetry", "tensor__element_8py.html#ada391fcde7843324ce34ac7cc3911481", null ], + [ "loop_nonzero_block", "tensor__element_8py.html#a60292c6589ef813a9b321f4ec9bb8914", null ], + [ "loop_nonzero_tensor", "tensor__element_8py.html#a2c7663191408ebf7aa8143c67dfe4522", null ], + [ "tensor_element", "tensor__element_8py.html#a1e90fe7f60a190aff59b3da1b14a4078", null ], + [ "element_pool", "tensor__element_8py.html#a3742e90daad0b13e7c3c7144b75851bd", null ] + ] ], + [ "utility", null, [ + [ "SignalHandler", "classtetragono_1_1utility_1_1SignalHandler.html", "classtetragono_1_1utility_1_1SignalHandler" ], + [ "SeedDiffer", "classtetragono_1_1utility_1_1SeedDiffer.html", "classtetragono_1_1utility_1_1SeedDiffer" ], + [ "allgather_array", "utility_8py.html#aeb49a7a6c9b81c923c6eb42b6a36dba8", null ], + [ "allreduce_buffer", "utility_8py.html#a919e02772cf6499ad81a126957a13e00", null ], + [ "allreduce_iterator_buffer", "utility_8py.html#a8d6b22ffc1b75570855a0ceaec295504", null ], + [ "allreduce_lattice_buffer", "utility_8py.html#a8ab0c40f354c4d8c87530ff7a75a1493", null ], + [ "allreduce_number", "utility_8py.html#a66d8eeb3d6d5d3f5ca28b0c5a4c3e0f0", null ], + [ "bcast_buffer", "utility_8py.html#a65c06d14107a07382f797b319f9f196d", null ], + [ "bcast_iterator_buffer", "utility_8py.html#a5d9d38d1580046618215a94bda36b21e", null ], + [ "bcast_lattice_buffer", "utility_8py.html#ae9de79f8f58beb81b8dff98c7602a491", null ], + [ "bcast_number", "utility_8py.html#aa224ef84c2342733a1bfc55d3e459ba6", null ], + [ "get_imported_function", "utility_8py.html#a4855f72c363bff40541c9711f8ed23e5", null ], + [ "import_from_tetpath", "utility_8py.html#aa5ea770e12212d71c486f421f62c26fb", null ], + [ "lattice_conjugate", "utility_8py.html#a8f72eb3b8885d5e05f116ee64a599977", null ], + [ "lattice_dot", "utility_8py.html#acadfc18334488ffeda14e00f4090c513", null ], + [ "lattice_prod_sum", "utility_8py.html#a0b066e4236f328d79415f7a3539107a2", null ], + [ "lattice_randomize", "utility_8py.html#a9dbe7d68aa538ac313db4bc2a9f1d259", null ], + [ "lattice_update", "utility_8py.html#af2d3dd2a23c0ca6849b691114794ea8a", null ], + [ "read_configurations", "utility_8py.html#aca914a1b523f99de9fe855ae7cd3767b", null ], + [ "read_from_file", "utility_8py.html#a793669be83b9d56fe498b9518f06cf8a", null ], + [ "restrict_wrapper", "utility_8py.html#a08bfb331232c865fc0e758846df08bf0", null ], + [ "safe_contract", "utility_8py.html#acf31d133c10aabb3f33b19a4e2c6d003", null ], + [ "safe_rename", "utility_8py.html#a62031eb11dcc5c678d29d3da194d1796", null ], + [ "send", "utility_8py.html#adef7fd0a7a127ccfc468c07010061d27", null ], + [ "show", "utility_8py.html#a83e8a5a3c5a34842f1c4e67009672dd5", null ], + [ "showln", "utility_8py.html#af2854100d312af5f7b0191b520b104a1", null ], + [ "sigusr1_handler", "utility_8py.html#aa29740619cf11018ad7d5a80b95857d6", null ], + [ "write_configurations", "utility_8py.html#a115f62149cce4b6301dede0bcf706ed1", null ], + [ "write_to_file", "utility_8py.html#af9a6443441adb5eef050dd478231720e", null ], + [ "clear_line", "utility_8py.html#a1dc5d91c887c0680d71e0b0eac716277", null ], + [ "mpi_comm", "utility_8py.html#af3528b0de5bfd3e6f5ee905bc47fa586", null ], + [ "mpi_rank", "utility_8py.html#a2af1d79c45589ff63390fed82ab2dcbf", null ], + [ "mpi_size", "utility_8py.html#af7e1ca0977fc36f5638e6c06a84d0700", null ], + [ "seed_differ", "utility_8py.html#a0dbac0d0eb470bc5bf7d12f88108124f", null ] + ] ] + ] ] +]; \ No newline at end of file diff --git a/nav_f.png b/nav_f.png new file mode 100644 index 0000000000000000000000000000000000000000..72a58a529ed3a9ed6aa0c51a79cf207e026deee2 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc) zn!W8uqtnIQ>_z8U literal 0 HcmV?d00001 diff --git a/nav_g.png b/nav_g.png new file mode 100644 index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5=67#uj90@pIL wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&vFVdQ&MBb@0HFXL=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +var loadTriggered = false; +var readyTriggered = false; +var loadObject,loadToRoot,loadUrl,loadRelPath; + +$(window).on('load',function(){ + if (readyTriggered) { // ready first + navTo(loadObject,loadToRoot,loadUrl,loadRelPath); + showRoot(); + } + loadTriggered=true; +}); + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + if (loadTriggered) { // load before ready + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + } else { // ready before load + loadObject = o; + loadToRoot = toroot; + loadUrl = hashUrl(); + loadRelPath = relpath; + readyTriggered=true; + } + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM + + + + + + +TAT: include/TAT/implement/qr.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    qr.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +int sgeqrf_ (const int *m, const int *n, float *A, const int *lda, float *tau, float *work, const int *lwork, int *info)
     
    +int dgeqrf_ (const int *m, const int *n, double *A, const int *lda, double *tau, double *work, const int *lwork, int *info)
     
    +int cgeqrf_ (const int *m, const int *n, std::complex< float > *A, const int *lda, std::complex< float > *tau, std::complex< float > *work, const int *lwork, int *info)
     
    +int zgeqrf_ (const int *m, const int *n, std::complex< double > *A, const int *lda, std::complex< double > *tau, std::complex< double > *work, const int *lwork, int *info)
     
    +int sgelqf_ (const int *m, const int *n, float *A, const int *lda, float *tau, float *work, const int *lwork, int *info)
     
    +int dgelqf_ (const int *m, const int *n, double *A, const int *lda, double *tau, double *work, const int *lwork, int *info)
     
    +int cgelqf_ (const int *m, const int *n, std::complex< float > *A, const int *lda, std::complex< float > *tau, std::complex< float > *work, const int *lwork, int *info)
     
    +int zgelqf_ (const int *m, const int *n, std::complex< double > *A, const int *lda, std::complex< double > *tau, std::complex< double > *work, const int *lwork, int *info)
     
    +int sorgqr_ (const int *m, const int *n, const int *k, float *A, const int *lda, const float *tau, float *work, const int *lwork, int *info)
     
    +int dorgqr_ (const int *m, const int *n, const int *k, double *A, const int *lda, const double *tau, double *work, const int *lwork, int *info)
     
    +int cungqr_ (const int *m, const int *n, const int *k, std::complex< float > *A, const int *lda, const std::complex< float > *tau, std::complex< float > *work, const int *lwork, int *info)
     
    +int zungqr_ (const int *m, const int *n, const int *k, std::complex< double > *A, const int *lda, const std::complex< double > *tau, std::complex< double > *work, const int *lwork, int *info)
     
    +int sorglq_ (const int *m, const int *n, const int *k, float *A, const int *lda, const float *tau, float *work, const int *lwork, int *info)
     
    +int dorglq_ (const int *m, const int *n, const int *k, double *A, const int *lda, const double *tau, double *work, const int *lwork, int *info)
     
    +int cunglq_ (const int *m, const int *n, const int *k, std::complex< float > *A, const int *lda, const std::complex< float > *tau, std::complex< float > *work, const int *lwork, int *info)
     
    +int zunglq_ (const int *m, const int *n, const int *k, std::complex< double > *A, const int *lda, const std::complex< double > *tau, std::complex< double > *work, const int *lwork, int *info)
     
    +template<typename ScalarType >
    int TAT::detail::to_int (const ScalarType &value)
     
    +template<typename ScalarType >
    void TAT::detail::calculate_qr_kernel (const int &m, const int &n, const int &min, ScalarType *__restrict data, ScalarType *__restrict data_1, ScalarType *__restrict data_2, bool use_qr_not_lq)
     
    +template<typename ScalarType >
    void TAT::detail::calculate_qr (const int &m, const int &n, const int &min, ScalarType *__restrict data, ScalarType *__restrict data_1, ScalarType *__restrict data_2, bool use_qr_not_lq)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    +timer TAT::qr_kernel_guard ("qr_kernel")
     
    +template<typename ScalarType >
    constexpr auto TAT::detail::geqrf = nullptr
     
    +template<>
    constexpr auto TAT::detail::geqrf< float > = sgeqrf_
     
    +template<>
    constexpr auto TAT::detail::geqrf< double > = dgeqrf_
     
    +template<typename ScalarType >
    constexpr auto TAT::detail::gelqf = nullptr
     
    +template<>
    constexpr auto TAT::detail::gelqf< float > = sgelqf_
     
    +template<>
    constexpr auto TAT::detail::gelqf< double > = dgelqf_
     
    +template<typename ScalarType >
    constexpr auto TAT::detail::orgqr = nullptr
     
    +template<>
    constexpr auto TAT::detail::orgqr< float > = sorgqr_
     
    +template<>
    constexpr auto TAT::detail::orgqr< double > = dorgqr_
     
    +template<typename ScalarType >
    constexpr auto TAT::detail::orglq = nullptr
     
    +template<>
    constexpr auto TAT::detail::orglq< float > = sorglq_
     
    +template<>
    constexpr auto TAT::detail::orglq< double > = dorglq_
     
    +timer TAT::qr_guard ("qr")
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/qr_8hpp.js b/qr_8hpp.js new file mode 100644 index 000000000..d442e5097 --- /dev/null +++ b/qr_8hpp.js @@ -0,0 +1,37 @@ +var qr_8hpp = +[ + [ "TAT_QR_HPP", "qr_8hpp.html#a3ed3567667b879bcc68cfef3e6e8a8f5", null ], + [ "calculate_qr", "qr_8hpp.html#a5e2e9ce15f5030e8e7db17e1298a75aa", null ], + [ "calculate_qr_kernel", "qr_8hpp.html#acf427e916e25511ea7b2542496e8f840", null ], + [ "cgelqf_", "qr_8hpp.html#a6859f2034118dca620802f281cc4f620", null ], + [ "cgeqrf_", "qr_8hpp.html#a084e477f9c1a08a39656680962a5d963", null ], + [ "cunglq_", "qr_8hpp.html#ab624a28abfed542d6db8ec331f8ea5c1", null ], + [ "cungqr_", "qr_8hpp.html#a5f24000439913dc6a36f48ac7b6c8b6c", null ], + [ "dgelqf_", "qr_8hpp.html#a3a808ced3cbd089cdef7e3517a72d5d1", null ], + [ "dgeqrf_", "qr_8hpp.html#ab1aa8bcb70a2162036fe15e3658411e9", null ], + [ "dorglq_", "qr_8hpp.html#ae2400518491cf5a92e2fb051158c53df", null ], + [ "dorgqr_", "qr_8hpp.html#a4ab84d7c902b9bc13cbbb19d0c0cbe89", null ], + [ "sgelqf_", "qr_8hpp.html#a31940cf3cf2c7e86f514ec6bd8986d0c", null ], + [ "sgeqrf_", "qr_8hpp.html#a089df9420b1ff92ed7abf5891063d803", null ], + [ "sorglq_", "qr_8hpp.html#a22c35b6fb451fe2a9878af3339868a96", null ], + [ "sorgqr_", "qr_8hpp.html#afd4798d378d7500797d2dc96f7513eb8", null ], + [ "to_int", "qr_8hpp.html#a660232f8007702f1a0c7f61f869de2ac", null ], + [ "zgelqf_", "qr_8hpp.html#aa1aabd0204ab9bd05499bd774f72bb49", null ], + [ "zgeqrf_", "qr_8hpp.html#a78c34753dfd0b4f52e51500958e0b2d0", null ], + [ "zunglq_", "qr_8hpp.html#a1e4ba3d720f2b020e90f699ca74ab24c", null ], + [ "zungqr_", "qr_8hpp.html#af01552c8edacdef0f35451542414039c", null ], + [ "gelqf", "qr_8hpp.html#a22d06c274efaa927fad0144ecd273a3b", null ], + [ "gelqf< double >", "qr_8hpp.html#a07b8cda1947bfd49f309a6b7a84ec895", null ], + [ "gelqf< float >", "qr_8hpp.html#ac47d9e7822607861b11260b7212272f7", null ], + [ "geqrf", "qr_8hpp.html#aec8bebe6f55502afd5a38ac9191cd473", null ], + [ "geqrf< double >", "qr_8hpp.html#a67468ddf9b61c83195900844503512e5", null ], + [ "geqrf< float >", "qr_8hpp.html#ab05aebb4f9303bc13e61b8c1bb1093cb", null ], + [ "orglq", "qr_8hpp.html#a04f78241bcafb1e15dd6b9dcaf0e4d43", null ], + [ "orglq< double >", "qr_8hpp.html#a2a94c2c8202dc6a461a009cc08cab5af", null ], + [ "orglq< float >", "qr_8hpp.html#adbf8ea481b1517564856c22b7e79cd2d", null ], + [ "orgqr", "qr_8hpp.html#a1c07c0feb588b61f9fd29fa5051c4981", null ], + [ "orgqr< double >", "qr_8hpp.html#a32dcaf1a676edb3c7ea1aed5f2907874", null ], + [ "orgqr< float >", "qr_8hpp.html#a2d81f5c7c4855cc46723ec6908203e72", null ], + [ "qr_guard", "qr_8hpp.html#a99aebf9653e8cc827e66eef33fa736c3", null ], + [ "qr_kernel_guard", "qr_8hpp.html#a4ae81b142da61bc09271872fd59b95d9", null ] +]; \ No newline at end of file diff --git a/qr_8hpp_source.html b/qr_8hpp_source.html new file mode 100644 index 000000000..9773b8d73 --- /dev/null +++ b/qr_8hpp_source.html @@ -0,0 +1,602 @@ + + + + + + + +TAT: include/TAT/implement/qr.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    qr.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_QR_HPP
    +
    22 #define TAT_QR_HPP
    +
    23 
    +
    24 #include "../structure/tensor.hpp"
    +
    25 #include "../utility/allocator.hpp"
    +
    26 #include "../utility/timer.hpp"
    +
    27 
    +
    28 extern "C" {
    +
    29  int sgeqrf_(const int* m, const int* n, float* A, const int* lda, float* tau, float* work, const int* lwork, int* info);
    +
    30  int dgeqrf_(const int* m, const int* n, double* A, const int* lda, double* tau, double* work, const int* lwork, int* info);
    +
    31  int cgeqrf_(
    +
    32  const int* m,
    +
    33  const int* n,
    +
    34  std::complex<float>* A,
    +
    35  const int* lda,
    +
    36  std::complex<float>* tau,
    +
    37  std::complex<float>* work,
    +
    38  const int* lwork,
    +
    39  int* info
    +
    40  );
    +
    41  int zgeqrf_(
    +
    42  const int* m,
    +
    43  const int* n,
    +
    44  std::complex<double>* A,
    +
    45  const int* lda,
    +
    46  std::complex<double>* tau,
    +
    47  std::complex<double>* work,
    +
    48  const int* lwork,
    +
    49  int* info
    +
    50  );
    +
    51  int sgelqf_(const int* m, const int* n, float* A, const int* lda, float* tau, float* work, const int* lwork, int* info);
    +
    52  int dgelqf_(const int* m, const int* n, double* A, const int* lda, double* tau, double* work, const int* lwork, int* info);
    +
    53  int cgelqf_(
    +
    54  const int* m,
    +
    55  const int* n,
    +
    56  std::complex<float>* A,
    +
    57  const int* lda,
    +
    58  std::complex<float>* tau,
    +
    59  std::complex<float>* work,
    +
    60  const int* lwork,
    +
    61  int* info
    +
    62  );
    +
    63  int zgelqf_(
    +
    64  const int* m,
    +
    65  const int* n,
    +
    66  std::complex<double>* A,
    +
    67  const int* lda,
    +
    68  std::complex<double>* tau,
    +
    69  std::complex<double>* work,
    +
    70  const int* lwork,
    +
    71  int* info
    +
    72  );
    +
    73  int sorgqr_(const int* m, const int* n, const int* k, float* A, const int* lda, const float* tau, float* work, const int* lwork, int* info);
    +
    74  int dorgqr_(const int* m, const int* n, const int* k, double* A, const int* lda, const double* tau, double* work, const int* lwork, int* info);
    +
    75  int cungqr_(
    +
    76  const int* m,
    +
    77  const int* n,
    +
    78  const int* k,
    +
    79  std::complex<float>* A,
    +
    80  const int* lda,
    +
    81  const std::complex<float>* tau,
    +
    82  std::complex<float>* work,
    +
    83  const int* lwork,
    +
    84  int* info
    +
    85  );
    +
    86  int zungqr_(
    +
    87  const int* m,
    +
    88  const int* n,
    +
    89  const int* k,
    +
    90  std::complex<double>* A,
    +
    91  const int* lda,
    +
    92  const std::complex<double>* tau,
    +
    93  std::complex<double>* work,
    +
    94  const int* lwork,
    +
    95  int* info
    +
    96  );
    +
    97  int sorglq_(const int* m, const int* n, const int* k, float* A, const int* lda, const float* tau, float* work, const int* lwork, int* info);
    +
    98  int dorglq_(const int* m, const int* n, const int* k, double* A, const int* lda, const double* tau, double* work, const int* lwork, int* info);
    +
    99  int cunglq_(
    +
    100  const int* m,
    +
    101  const int* n,
    +
    102  const int* k,
    +
    103  std::complex<float>* A,
    +
    104  const int* lda,
    +
    105  const std::complex<float>* tau,
    +
    106  std::complex<float>* work,
    +
    107  const int* lwork,
    +
    108  int* info
    +
    109  );
    +
    110  int zunglq_(
    +
    111  const int* m,
    +
    112  const int* n,
    +
    113  const int* k,
    +
    114  std::complex<double>* A,
    +
    115  const int* lda,
    +
    116  const std::complex<double>* tau,
    +
    117  std::complex<double>* work,
    +
    118  const int* lwork,
    +
    119  int* info
    +
    120  );
    +
    121 }
    +
    122 
    +
    123 namespace TAT {
    +
    124 
    +
    125  inline timer qr_kernel_guard("qr_kernel");
    +
    126 
    +
    127  namespace detail {
    +
    128  template<typename ScalarType>
    +
    129  constexpr auto geqrf = nullptr;
    +
    130  template<>
    +
    131  inline constexpr auto geqrf<float> = sgeqrf_;
    +
    132  template<>
    +
    133  inline constexpr auto geqrf<double> = dgeqrf_;
    +
    134  template<>
    +
    135  inline constexpr auto geqrf<std::complex<float>> = cgeqrf_;
    +
    136  template<>
    +
    137  inline constexpr auto geqrf<std::complex<double>> = zgeqrf_;
    +
    138  template<typename ScalarType>
    +
    139  constexpr auto gelqf = nullptr;
    +
    140  template<>
    +
    141  inline constexpr auto gelqf<float> = sgelqf_;
    +
    142  template<>
    +
    143  inline constexpr auto gelqf<double> = dgelqf_;
    +
    144  template<>
    +
    145  inline constexpr auto gelqf<std::complex<float>> = cgelqf_;
    +
    146  template<>
    +
    147  inline constexpr auto gelqf<std::complex<double>> = zgelqf_;
    +
    148  template<typename ScalarType>
    +
    149  constexpr auto orgqr = nullptr;
    +
    150  template<>
    +
    151  inline constexpr auto orgqr<float> = sorgqr_;
    +
    152  template<>
    +
    153  inline constexpr auto orgqr<double> = dorgqr_;
    +
    154  template<>
    +
    155  inline constexpr auto orgqr<std::complex<float>> = cungqr_;
    +
    156  template<>
    +
    157  inline constexpr auto orgqr<std::complex<double>> = zungqr_;
    +
    158  template<typename ScalarType>
    +
    159  constexpr auto orglq = nullptr;
    +
    160  template<>
    +
    161  inline constexpr auto orglq<float> = sorglq_;
    +
    162  template<>
    +
    163  inline constexpr auto orglq<double> = dorglq_;
    +
    164  template<>
    +
    165  inline constexpr auto orglq<std::complex<float>> = cunglq_;
    +
    166  template<>
    +
    167  inline constexpr auto orglq<std::complex<double>> = zunglq_;
    +
    168 
    +
    169  template<typename ScalarType>
    +
    170  int to_int(const ScalarType& value) {
    +
    171  if constexpr (is_complex<ScalarType>) {
    +
    172  return int(value.real());
    +
    173  } else {
    +
    174  return int(value);
    +
    175  }
    +
    176  }
    +
    177 
    +
    178  template<typename ScalarType>
    +
    179  void calculate_qr_kernel(
    +
    180  const int& m,
    +
    181  const int& n,
    +
    182  const int& min,
    +
    183  ScalarType* __restrict data,
    +
    184  ScalarType* __restrict data_1,
    +
    185  ScalarType* __restrict data_2,
    +
    186  bool use_qr_not_lq
    +
    187  ) {
    +
    188  // m*n c matrix
    +
    189  // n*m fortran matrix
    +
    190  if (use_qr_not_lq) {
    +
    191  // c qr -> fortran lq
    +
    192  // LQ
    +
    193  //
    +
    194  // here X means matrix content, and Q means the data to generate Q matrix
    +
    195  //
    +
    196  // XX X XQ
    +
    197  // XX XX XX XX
    +
    198  // XX = XX XX -> XX
    +
    199  //
    +
    200  // XXX X XXX XQQ
    +
    201  // XXX = XX XXX -> XXQ
    +
    202  int result;
    +
    203  auto tau = no_initialize::pmr::vector<ScalarType>(min);
    +
    204  const int lwork_query = -1;
    +
    205  ScalarType float_lwork;
    +
    206  gelqf<ScalarType>(&n, &m, data, &n, tau.data(), &float_lwork, &lwork_query, &result);
    +
    207  if (result != 0) {
    +
    208  detail::what_if_lapack_error("Error in LQ");
    +
    209  }
    +
    210  const int lwork = to_int(float_lwork);
    +
    211  auto work = no_initialize::pmr::vector<ScalarType>(lwork);
    +
    212  gelqf<ScalarType>(&n, &m, data, &n, tau.data(), work.data(), &lwork, &result);
    +
    213  if (result != 0) {
    +
    214  detail::what_if_lapack_error("Error in LQ");
    +
    215  }
    +
    216  // Q matrix
    +
    217  // data n*m
    +
    218  // data_1 min*m
    +
    219  for (auto i = 0; i < m; i++) {
    +
    220  // it does not copy entire matrix for the first situation
    +
    221  // but it still copy useless lower triangular part
    +
    222  std::copy(data + i * n, data + i * n + min, data_1 + i * min);
    +
    223  }
    +
    224  orglq<ScalarType>(&min, &m, &min, data_1, &min, tau.data(), work.data(), &lwork, &result);
    +
    225  // WRONG -> orglq<ScalarType>(&min, &min, &min, data_1, &min, tau.data(), work.data(), &lwork, &result);
    +
    226  if (result != 0) {
    +
    227  detail::what_if_lapack_error("Error in LQ");
    +
    228  }
    +
    229  // L matrix
    +
    230  for (auto i = 0; i < min; i++) {
    +
    231  std::fill(data_2 + i * n, data_2 + i * n + i, 0);
    +
    232  std::copy(data + i * n + i, data + i * n + n, data_2 + i * n + i);
    +
    233  }
    +
    234  } else {
    +
    235  // c lq -> fortran qr
    +
    236  // QR
    +
    237  //
    +
    238  // XX XX XX
    +
    239  // XX XX XX QX
    +
    240  // XX = XX X -> QQ
    +
    241  //
    +
    242  // XXX XX XXX XXX
    +
    243  // XXX = XX XX -> QXX
    +
    244  int result;
    +
    245  auto tau = no_initialize::pmr::vector<ScalarType>(min);
    +
    246  const int lwork_query = -1;
    +
    247  ScalarType float_lwork;
    +
    248  geqrf<ScalarType>(&n, &m, data, &n, tau.data(), &float_lwork, &lwork_query, &result);
    +
    249  if (result != 0) {
    +
    250  detail::what_if_lapack_error("Error in QR");
    +
    251  }
    +
    252  const int lwork = to_int(float_lwork);
    +
    253  auto work = no_initialize::pmr::vector<ScalarType>(lwork);
    +
    254  geqrf<ScalarType>(&n, &m, data, &n, tau.data(), work.data(), &lwork, &result);
    +
    255  if (result != 0) {
    +
    256  detail::what_if_lapack_error("Error in QR");
    +
    257  }
    +
    258  // Q matrix
    +
    259  // it does copy the entire matrix for the both situation, it is different to the c qr branch
    +
    260  std::copy(data, data + n * min, data_2); // this copy useless upper triangular part
    +
    261  // fortran
    +
    262  // data n*m
    +
    263  // data_2 n*min
    +
    264  orgqr<ScalarType>(&n, &min, &min, data_2, &n, tau.data(), work.data(), &lwork, &result);
    +
    265  // WRONG -> orgqr<ScalarType>(&min, &min, &min, data_2, &n, tau.data(), work.data(), &lwork, &result);
    +
    266  // same size of lwork
    +
    267  if (result != 0) {
    +
    268  detail::what_if_lapack_error("Error in QR");
    +
    269  }
    +
    270  // R matrix
    +
    271  for (auto i = 0; i < min; i++) {
    +
    272  std::copy(data + n * i, data + n * i + i + 1, data_1 + min * i);
    +
    273  std::fill(data_1 + min * i + i + 1, data_1 + min * i + min, 0);
    +
    274  }
    +
    275  std::copy(data + n * min, data + n * m, data_1 + min * min);
    +
    276  // for the first situation, min == m, this copy do nothing
    +
    277  }
    +
    278  }
    +
    279 
    +
    280  template<typename ScalarType>
    +
    281  void calculate_qr(
    +
    282  const int& m,
    +
    283  const int& n,
    +
    284  const int& min,
    +
    285  ScalarType* __restrict data,
    +
    286  ScalarType* __restrict data_1,
    +
    287  ScalarType* __restrict data_2,
    +
    288  bool use_qr_not_lq
    +
    289  ) {
    +
    290  auto kernel_guard = qr_kernel_guard();
    +
    291  // sometimes, transpose before qr/lq is faster, there is a simular operation in svd
    +
    292  // by testing, m > n is better
    +
    293  if (m > n) {
    +
    294  auto new_data = no_initialize::pmr::vector<ScalarType>(n * m);
    +
    295  auto old_data_1 = no_initialize::pmr::vector<ScalarType>(n * min);
    +
    296  auto old_data_2 = no_initialize::pmr::vector<ScalarType>(min * m);
    +
    297  matrix_transpose<pmr::vector<Size>>(m, n, data, new_data.data());
    +
    298  calculate_qr_kernel(n, m, min, new_data.data(), old_data_1.data(), old_data_2.data(), !use_qr_not_lq);
    +
    299  matrix_transpose<pmr::vector<Size>>(n, min, old_data_1.data(), data_2);
    +
    300  matrix_transpose<pmr::vector<Size>>(min, m, old_data_2.data(), data_1);
    +
    301  } else {
    +
    302  calculate_qr_kernel(m, n, min, data, data_1, data_2, use_qr_not_lq);
    +
    303  }
    +
    304  }
    +
    305  } // namespace detail
    +
    306 
    +
    307  inline timer qr_guard("qr");
    +
    308 
    +
    309  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    311  char free_names_direction,
    +
    312  const std::unordered_set<Name>& free_names,
    +
    313  const Name& common_name_q,
    +
    314  const Name& common_name_r
    +
    315  ) const {
    +
    316  auto pmr_guard = scope_resource(default_buffer_size);
    +
    317  auto timer_guard = qr_guard();
    +
    318 
    +
    319  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
    +
    320 
    +
    321  if constexpr (debug_mode) {
    +
    322  // check free_name_set is valid
    +
    323  for (const auto& name : free_names) {
    +
    324  if (auto found = find_by_name(name); found == names().end()) {
    +
    325  detail::error("Missing name in qr");
    +
    326  }
    +
    327  }
    +
    328  }
    +
    329 
    +
    330  // determine do LQ or QR
    +
    331  bool use_r_name;
    +
    332  if (free_names_direction == 'r' || free_names_direction == 'R') {
    +
    333  use_r_name = true;
    +
    334  } else if (free_names_direction == 'q' || free_names_direction == 'Q') {
    +
    335  use_r_name = false;
    +
    336  } else {
    +
    337  detail::error("Invalid direction in QR");
    +
    338  };
    +
    339  bool use_qr_not_lq = names().empty() || ((free_names.find(names().back()) != free_names.end()) == use_r_name);
    +
    340  // use r, last in r -> qr
    +
    341  // use q, last in q -> last not in r -> lq
    +
    342 
    +
    343  // merge plan
    +
    344  auto free_name_list_1 = pmr::vector<Name>(); // part of merge map
    +
    345  auto free_name_list_2 = pmr::vector<Name>(); // part of merge map
    +
    346  auto reversed_names_input = pmr::unordered_set<Name>(unordered_parameter * rank());
    +
    347  // result name is trivial
    +
    348 
    +
    349  // split plan
    +
    350  auto reversed_names_1 = pmr::unordered_set<Name>(unordered_parameter * rank());
    +
    351  auto reversed_names_2 = pmr::unordered_set<Name>(unordered_parameter * rank());
    +
    352  auto result_names_1 = std::vector<Name>();
    +
    353  auto result_names_2 = std::vector<Name>();
    +
    354  auto free_names_and_edges_1 = pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>(); // part of split map
    +
    355  auto free_names_and_edges_2 = pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>(); // part of split map
    +
    356 
    +
    357  free_name_list_1.reserve(rank());
    +
    358  free_name_list_2.reserve(rank());
    +
    359  result_names_1.reserve(rank() + 1);
    +
    360  result_names_2.reserve(rank() + 1);
    +
    361  free_names_and_edges_1.reserve(rank());
    +
    362  free_names_and_edges_2.reserve(rank());
    +
    363 
    +
    364  result_names_2.push_back(use_qr_not_lq ? common_name_r : common_name_q);
    +
    365  for (Rank i = 0; i < rank(); i++) {
    +
    366  const auto& n = names(i);
    +
    367  // set.find() != set.end() => n in the set
    +
    368  // (!=) == use_r_name => n in the r name
    +
    369  // (!=) == use_r_name == use_qr_not_lq => in the second name
    +
    370  if ((free_names.find(n) != free_names.end()) == use_r_name == use_qr_not_lq) {
    +
    371  // tensor_2 side
    +
    372  free_name_list_2.push_back(n);
    +
    373  result_names_2.push_back(n);
    +
    374  free_names_and_edges_2.push_back({n, {edges(i).segments()}});
    +
    375  if constexpr (is_fermi) {
    +
    376  if (edges(i).arrow()) {
    +
    377  reversed_names_2.insert(n);
    +
    378  reversed_names_input.insert(n);
    +
    379  }
    +
    380  }
    +
    381  } else {
    +
    382  // tensor_1 side
    +
    383  free_name_list_1.push_back(n);
    +
    384  result_names_1.push_back(n);
    +
    385  free_names_and_edges_1.push_back({n, {edges(i).segments()}});
    +
    386  if constexpr (is_fermi) {
    +
    387  if (edges(i).arrow()) {
    +
    388  reversed_names_1.insert(n);
    +
    389  reversed_names_input.insert(n);
    +
    390  }
    +
    391  }
    +
    392  }
    +
    393  }
    +
    394  result_names_1.push_back(use_qr_not_lq ? common_name_q : common_name_r);
    +
    395 
    +
    396  auto tensor_merged = edge_operator_implement(
    +
    397  {},
    +
    398  reversed_names_input,
    +
    399  pmr::map<Name, pmr::vector<Name>>{
    +
    400  {InternalName<Name>::QR_1, std::move(free_name_list_1)},
    +
    401  {InternalName<Name>::QR_2, std::move(free_name_list_2)}},
    + +
    403  false,
    +
    404  {},
    +
    405  {},
    +
    406  {},
    +
    407  {},
    +
    408  {}
    +
    409  );
    +
    410 
    +
    411  const auto& edge_0_input = tensor_merged.edges(0);
    +
    412  const auto& edge_1_input = tensor_merged.edges(1);
    +
    413  // prepare result tensor
    +
    414  auto common_edge_segments_1 = std::vector<std::pair<Symmetry, Size>>();
    +
    415  auto common_edge_segments_2 = std::vector<std::pair<Symmetry, Size>>();
    +
    416  common_edge_segments_1.reserve(edge_0_input.segments_size());
    +
    417  common_edge_segments_2.reserve(edge_0_input.segments_size());
    +
    418  // arrow all false currently, arrow check is processed at the last
    +
    419  for (const auto& [symmetry_0, dimension_0] : edge_0_input.segments()) {
    +
    420  auto symmetry_1 = -symmetry_0;
    +
    421  if (auto found = edge_1_input.find_by_symmetry(symmetry_1); found != edge_1_input.segments().end()) {
    +
    422  // This block does exist
    +
    423  auto m = dimension_0;
    +
    424  auto n = found->second;
    +
    425  auto k = m > n ? n : m;
    +
    426  common_edge_segments_1.emplace_back(symmetry_1, k);
    +
    427  common_edge_segments_2.emplace_back(symmetry_0, k);
    +
    428  }
    +
    429  }
    +
    430  auto tensor_1 = Tensor<ScalarType, Symmetry, Name>{
    +
    431  {InternalName<Name>::QR_1, use_qr_not_lq ? common_name_q : common_name_r},
    +
    432  {std::move(tensor_merged.edges(0)), std::move(common_edge_segments_1)}};
    +
    433  auto tensor_2 = Tensor<ScalarType, Symmetry, Name>{
    +
    434  {use_qr_not_lq ? common_name_r : common_name_q, InternalName<Name>::QR_2},
    +
    435  {std::move(common_edge_segments_2), std::move(tensor_merged.edges(1))}};
    +
    436  // const auto& edge_common_1 = tensor_1.edges(1);
    +
    437  const auto& edge_common_2 = tensor_2.edges(0);
    +
    438 
    +
    439  // call lapack
    +
    440  for (const auto& [symmetry, _] : edge_0_input.segments()) {
    +
    441  Size position_0_input = edge_0_input.find_by_symmetry(symmetry) - edge_0_input.segments().begin();
    +
    442  Size position_1_input = edge_1_input.find_by_symmetry(-symmetry) - edge_1_input.segments().begin();
    +
    443  if (position_1_input == edge_1_input.segments_size()) {
    +
    444  continue;
    +
    445  }
    +
    446  Size position_common = edge_common_2.find_by_symmetry(symmetry) - edge_common_2.segments().begin();
    +
    447  const int m = edge_0_input.segments(position_0_input).second;
    +
    448  const int n = edge_1_input.segments(position_1_input).second;
    +
    449  const int k = edge_common_2.segments(position_common).second;
    +
    450 
    +
    451  auto* data_1 = tensor_1.blocks(pmr::vector<Size>{position_0_input, position_common}).data();
    +
    452  auto* data_2 = tensor_2.blocks(pmr::vector<Size>{position_common, position_1_input}).data();
    +
    453  auto* data = tensor_merged.blocks(pmr::vector<Size>{position_0_input, position_1_input}).data();
    +
    454 
    +
    455  if (m * n != 0) {
    +
    456  detail::calculate_qr<ScalarType>(m, n, k, data, data_1, data_2, use_qr_not_lq);
    +
    457  }
    +
    458  }
    +
    459 
    +
    460  // this is simular to svd
    +
    461  //
    +
    462  // no matter whether it is qr or lq
    +
    463  // tensor 1 common edge should be true
    +
    464  // tensor 2 common edge should be false
    +
    465  //
    +
    466  // beside reverse the input edge without sign
    +
    467  // what need to do is: tensor_1 reverse without apply sign
    +
    468  //
    +
    469  // what will be done in the following code:
    +
    470  // QR:
    +
    471  // tensor_1 reverse without apply sign
    +
    472  // LQ:
    +
    473  // tensor_2 reverse with apply sign
    +
    474 
    +
    475  // tensor_1 not_apply_reverse -> tensor_2 apply_reverse operation is:
    +
    476  // tensor_1 not_apply_reverse and tensor_2 apply_reverse, which does not change the network
    +
    477  // so up till now, it maintains that tensor Q always have a true edge
    +
    478  if constexpr (is_fermi) {
    +
    479  (use_qr_not_lq ? reversed_names_1 : reversed_names_2).insert(common_name_q);
    +
    480  }
    +
    481  auto new_tensor_1 = tensor_1.edge_operator_implement(
    +
    482  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>{
    +
    483  {InternalName<Name>::QR_1, std::move(free_names_and_edges_1)}},
    +
    484  reversed_names_1,
    +
    485  {},
    +
    486  std::move(result_names_1),
    +
    487  false,
    +
    488  {},
    +
    489  {},
    +
    490  {},
    +
    491  {},
    +
    492  {}
    +
    493  );
    +
    494  auto new_tensor_2 = tensor_2.edge_operator_implement(
    +
    495  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>{
    +
    496  {InternalName<Name>::QR_2, std::move(free_names_and_edges_2)}},
    +
    497  reversed_names_2,
    +
    498  {},
    +
    499  std::move(result_names_2),
    +
    500  false,
    +
    501  {},
    +
    502  use_qr_not_lq ? pmr::set<Name>{} : pmr::set<Name>{common_name_q},
    +
    503  {},
    +
    504  {},
    +
    505  {}
    +
    506  );
    +
    507  return {std::move(use_qr_not_lq ? new_tensor_1 : new_tensor_2), std::move(use_qr_not_lq ? new_tensor_2 : new_tensor_1)};
    +
    508  }
    +
    509 } // namespace TAT
    +
    510 #endif
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    qr_result qr(char free_names_direction, const std::unordered_set< Name > &free_names, const Name &common_name_q, const Name &common_name_r) const
    Calculate QR of the tensor.
    Definition: qr.hpp:310
    +
    Definition: edge.hpp:33
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    std::uint16_t Rank
    Tensor rank type.
    Definition: common_variable.hpp:149
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    For every Name type, some internal name is needed.
    Definition: name.hpp:112
    +
    QR result type.
    Definition: tensor.hpp:938
    +
    Definition: allocator.hpp:295
    +
    +
    + + + + diff --git a/resize.js b/resize.js new file mode 100644 index 000000000..e1ad0fe3b --- /dev/null +++ b/resize.js @@ -0,0 +1,140 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/scalar_8hpp.html b/scalar_8hpp.html new file mode 100644 index 000000000..cfdf653eb --- /dev/null +++ b/scalar_8hpp.html @@ -0,0 +1,335 @@ + + + + + + + +TAT: include/TAT/miscellaneous/scalar.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    scalar.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + +

    +Macros

    +#define TAT_SCALAR_HPP
     
    #define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL)
     
    +#define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL)
     
    #define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto TAT::operator+ (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto TAT::operator- (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto TAT::operator* (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename = std::enable_if_t< (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>>
    auto TAT::operator/ (const ScalarType1 &a, const ScalarType2 &b)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator+ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator+ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator+ (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator- (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator- (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator- (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator* (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator* (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator* (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator/ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator/ (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>>
    auto TAT::operator/ (const ScalarType1 &number_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator+= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator+= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator-= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator-= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator*= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator*= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator/= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2)
     
    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name , typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>>
    Tensor< ScalarType1, Symmetry, Name > & TAT::operator/= (Tensor< ScalarType1, Symmetry, Name > &tensor_1, const ScalarType2 &number_2)
     
    + + + + + +

    +Variables

    +timer TAT::scalar_outplace_guard ("scalar_outplace")
     
    +timer TAT::scalar_inplace_guard ("scalar_inplace")
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +

    Macro Definition Documentation

    + +

    ◆ TAT_DEFINE_SCALAR_OPERATOR [1/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define TAT_DEFINE_SCALAR_OPERATOR( OP,
     EVAL 
    )
    +
    +Value:
    template< \
    +
    typename ScalarType1, \
    +
    typename ScalarType2, \
    +
    typename = std::enable_if_t< \
    +
    (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>> \
    +
    inline auto OP(const ScalarType1& a, const ScalarType2& b) { \
    +
    using t = std::common_type_t<ScalarType1, ScalarType2>; \
    +
    return EVAL; \
    +
    }
    +
    +
    +
    + +

    ◆ TAT_DEFINE_SCALAR_OPERATOR [2/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define TAT_DEFINE_SCALAR_OPERATOR( OP,
     EVAL 
    )
    +
    +Value:
    template< \
    +
    typename ScalarType1, \
    +
    typename ScalarType2, \
    +
    typename Symmetry, \
    +
    typename Name, \
    +
    typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, \
    +
    typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>> \
    +
    Tensor<ScalarType1, Symmetry, Name>& OP(Tensor<ScalarType1, Symmetry, Name>& tensor_1, const Tensor<ScalarType2, Symmetry, Name>& tensor_2) { \
    +
    auto timer_guard = scalar_inplace_guard(); \
    +
    tensor_1.acquire_data_ownership("Inplace operator on tensor shared, copy happened here"); \
    +
    return tensor_1.zip_transform_(tensor_2, [](const auto& x, const auto& y) { return EVAL; }); \
    +
    } \
    +
    template< \
    +
    typename ScalarType1, \
    +
    typename ScalarType2, \
    +
    typename Symmetry, \
    +
    typename Name, \
    +
    typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, \
    +
    typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>> \
    +
    Tensor<ScalarType1, Symmetry, Name>& OP(Tensor<ScalarType1, Symmetry, Name>& tensor_1, const ScalarType2& number_2) { \
    +
    auto timer_guard = scalar_inplace_guard(); \
    +
    tensor_1.acquire_data_ownership("Inplace operator on tensor shared, copy happened here"); \
    +
    return tensor_1.transform_([&y = number_2](const auto& x) { return EVAL; }); \
    +
    }
    +
    +
    +
    +
    +
    + + + + diff --git a/scalar_8hpp.js b/scalar_8hpp.js new file mode 100644 index 000000000..2a583d393 --- /dev/null +++ b/scalar_8hpp.js @@ -0,0 +1,33 @@ +var scalar_8hpp = +[ + [ "TAT_DEFINE_SCALAR_OPERATOR", "scalar_8hpp.html#ae64c3fa26443a3b533479a2f7453b6b4", null ], + [ "TAT_DEFINE_SCALAR_OPERATOR", "scalar_8hpp.html#ae64c3fa26443a3b533479a2f7453b6b4", null ], + [ "TAT_DEFINE_SCALAR_OPERATOR", "scalar_8hpp.html#ae64c3fa26443a3b533479a2f7453b6b4", null ], + [ "TAT_SCALAR_HPP", "scalar_8hpp.html#ac9391767420d389856d1127737cbfc3d", null ], + [ "operator*", "scalar_8hpp.html#a7bd43b663870b5fa36f798e2a7e17562", null ], + [ "operator*", "scalar_8hpp.html#a9c240b61015114f3537bd895ecbf1508", null ], + [ "operator*", "scalar_8hpp.html#a558d05e485e6b20db81e4aae53ff40a0", null ], + [ "operator*", "scalar_8hpp.html#a87a9aaf5195f27693ccb882b655d1c8c", null ], + [ "operator*=", "scalar_8hpp.html#a053e5c0d7d761656ee833672f4f44ccf", null ], + [ "operator*=", "scalar_8hpp.html#aeb4638c3fc6c117de2516730445bed75", null ], + [ "operator+", "scalar_8hpp.html#adc4b0e1fca5c6d410977bd8d26556511", null ], + [ "operator+", "scalar_8hpp.html#ab99ec2d624e8a258c0805971759c7c20", null ], + [ "operator+", "scalar_8hpp.html#a7dd4828880a779ad810c1d8990aebc66", null ], + [ "operator+", "scalar_8hpp.html#a4099028f19ae940f54599d4223c78229", null ], + [ "operator+=", "scalar_8hpp.html#a69d0026cd4c2e7b14478c6544c0070cf", null ], + [ "operator+=", "scalar_8hpp.html#ad1665c8b30f00b96e586062ad5978f01", null ], + [ "operator-", "scalar_8hpp.html#a98cf9c52fd48921a7027a798f2a981c6", null ], + [ "operator-", "scalar_8hpp.html#a223cdc779ae84723dbb1f8dda141f7c7", null ], + [ "operator-", "scalar_8hpp.html#acefec6590aaea19299029cd8d328c20a", null ], + [ "operator-", "scalar_8hpp.html#a6845fb0497221873e74cc87c5b492624", null ], + [ "operator-=", "scalar_8hpp.html#ad720483d26ebca23a7b91a0c9165730e", null ], + [ "operator-=", "scalar_8hpp.html#a661c8243c69994b08ac04e3f2a884947", null ], + [ "operator/", "scalar_8hpp.html#a46fe0f012d83e497619d36a8e0358f3c", null ], + [ "operator/", "scalar_8hpp.html#a27618ca0abccaefce93b20933d77e71e", null ], + [ "operator/", "scalar_8hpp.html#ad40061b79237f5c0e63be06a3be101bf", null ], + [ "operator/", "scalar_8hpp.html#ad633334dea817fad6219ae6edeffc15a", null ], + [ "operator/=", "scalar_8hpp.html#a25fa76d2a6bc6f5c0a208241b8ff4696", null ], + [ "operator/=", "scalar_8hpp.html#aa713a95f8cae031632e5ec7582f49bdb", null ], + [ "scalar_inplace_guard", "scalar_8hpp.html#abc51e2d3cb81c712c8fff5d276dfba72", null ], + [ "scalar_outplace_guard", "scalar_8hpp.html#a569376608583a332cf2b98a6fabcf06c", null ] +]; \ No newline at end of file diff --git a/scalar_8hpp_source.html b/scalar_8hpp_source.html new file mode 100644 index 000000000..c1c71c085 --- /dev/null +++ b/scalar_8hpp_source.html @@ -0,0 +1,203 @@ + + + + + + + +TAT: include/TAT/miscellaneous/scalar.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    scalar.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SCALAR_HPP
    +
    22 #define TAT_SCALAR_HPP
    +
    23 
    +
    24 #include "../structure/tensor.hpp"
    +
    25 #include "../utility/timer.hpp"
    +
    26 
    +
    27 namespace TAT {
    +
    28 #define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL) \
    +
    29  template< \
    +
    30  typename ScalarType1, \
    +
    31  typename ScalarType2, \
    +
    32  typename = std::enable_if_t< \
    +
    33  (is_complex<ScalarType1> || is_complex<ScalarType2>)&&(!std::is_same_v<real_scalar<ScalarType1>, real_scalar<ScalarType2>>)>> \
    +
    34  inline auto OP(const ScalarType1& a, const ScalarType2& b) { \
    +
    35  using t = std::common_type_t<ScalarType1, ScalarType2>; \
    +
    36  return EVAL; \
    +
    37  }
    +
    38  TAT_DEFINE_SCALAR_OPERATOR(operator+, t(a) + t(b))
    +
    39  TAT_DEFINE_SCALAR_OPERATOR(operator-, t(a) - t(b))
    +
    40  TAT_DEFINE_SCALAR_OPERATOR(operator*, t(a) * t(b))
    +
    41  TAT_DEFINE_SCALAR_OPERATOR(operator/, t(a) / t(b))
    +
    42 #undef TAT_DEFINE_SCALAR_OPERATOR
    +
    43 
    +
    44  inline timer scalar_outplace_guard("scalar_outplace");
    +
    45 
    +
    46 #define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL) \
    +
    47  template< \
    +
    48  typename ScalarType1, \
    +
    49  typename ScalarType2, \
    +
    50  typename Symmetry, \
    +
    51  typename Name, \
    +
    52  typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>> \
    +
    53  [[nodiscard]] auto OP(const Tensor<ScalarType1, Symmetry, Name>& tensor_1, const Tensor<ScalarType2, Symmetry, Name>& tensor_2) { \
    +
    54  auto timer_guard = scalar_outplace_guard(); \
    +
    55  using ScalarType = std::common_type_t<ScalarType1, ScalarType2>; \
    +
    56  return tensor_1.template zip_map<ScalarType>(tensor_2, [](const auto& x, const auto& y) { return EVAL; }); \
    +
    57  } \
    +
    58  template< \
    +
    59  typename ScalarType1, \
    +
    60  typename ScalarType2, \
    +
    61  typename Symmetry, \
    +
    62  typename Name, \
    +
    63  typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>> \
    +
    64  [[nodiscard]] auto OP(const Tensor<ScalarType1, Symmetry, Name>& tensor_1, const ScalarType2& number_2) { \
    +
    65  auto timer_guard = scalar_outplace_guard(); \
    +
    66  using ScalarType = std::common_type_t<ScalarType1, ScalarType2>; \
    +
    67  return tensor_1.template map<ScalarType>([&y = number_2](const auto& x) { return EVAL; }); \
    +
    68  } \
    +
    69  template< \
    +
    70  typename ScalarType1, \
    +
    71  typename ScalarType2, \
    +
    72  typename Symmetry, \
    +
    73  typename Name, \
    +
    74  typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>> \
    +
    75  [[nodiscard]] auto OP(const ScalarType1& number_1, const Tensor<ScalarType2, Symmetry, Name>& tensor_2) { \
    +
    76  auto timer_guard = scalar_outplace_guard(); \
    +
    77  using ScalarType = std::common_type_t<ScalarType1, ScalarType2>; \
    +
    78  return tensor_2.template map<ScalarType>([&x = number_1](const auto& y) { return EVAL; }); \
    +
    79  }
    +
    80 
    +
    81  TAT_DEFINE_SCALAR_OPERATOR(operator+, x + y)
    +
    82  TAT_DEFINE_SCALAR_OPERATOR(operator-, x - y)
    +
    83  TAT_DEFINE_SCALAR_OPERATOR(operator*, x* y)
    +
    84  TAT_DEFINE_SCALAR_OPERATOR(operator/, x / y)
    +
    85 #undef TAT_DEFINE_SCALAR_OPERATOR
    +
    86 
    +
    87  inline timer scalar_inplace_guard("scalar_inplace");
    +
    88 
    +
    89 #define TAT_DEFINE_SCALAR_OPERATOR(OP, EVAL) \
    +
    90  template< \
    +
    91  typename ScalarType1, \
    +
    92  typename ScalarType2, \
    +
    93  typename Symmetry, \
    +
    94  typename Name, \
    +
    95  typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, \
    +
    96  typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>> \
    +
    97  Tensor<ScalarType1, Symmetry, Name>& OP(Tensor<ScalarType1, Symmetry, Name>& tensor_1, const Tensor<ScalarType2, Symmetry, Name>& tensor_2) { \
    +
    98  auto timer_guard = scalar_inplace_guard(); \
    +
    99  tensor_1.acquire_data_ownership("Inplace operator on tensor shared, copy happened here"); \
    +
    100  return tensor_1.zip_transform_(tensor_2, [](const auto& x, const auto& y) { return EVAL; }); \
    +
    101  } \
    +
    102  template< \
    +
    103  typename ScalarType1, \
    +
    104  typename ScalarType2, \
    +
    105  typename Symmetry, \
    +
    106  typename Name, \
    +
    107  typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2> && is_symmetry<Symmetry> && is_name<Name>>, \
    +
    108  typename = std::enable_if_t<is_complex<ScalarType1> || is_real<ScalarType2>>> \
    +
    109  Tensor<ScalarType1, Symmetry, Name>& OP(Tensor<ScalarType1, Symmetry, Name>& tensor_1, const ScalarType2& number_2) { \
    +
    110  auto timer_guard = scalar_inplace_guard(); \
    +
    111  tensor_1.acquire_data_ownership("Inplace operator on tensor shared, copy happened here"); \
    +
    112  return tensor_1.transform_([&y = number_2](const auto& x) { return EVAL; }); \
    +
    113  }
    +
    114  TAT_DEFINE_SCALAR_OPERATOR(operator+=, x + y)
    +
    115  TAT_DEFINE_SCALAR_OPERATOR(operator-=, x - y)
    +
    116  TAT_DEFINE_SCALAR_OPERATOR(operator*=, x* y)
    +
    117  TAT_DEFINE_SCALAR_OPERATOR(operator/=, x / y)
    +
    118 #undef TAT_DEFINE_SCALAR_OPERATOR
    +
    119 } // namespace TAT
    +
    120 #endif
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    +
    + + + + diff --git a/search/all_0.html b/search/all_0.html new file mode 100644 index 000000000..1ec5b2d59 --- /dev/null +++ b/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_0.js b/search/all_0.js new file mode 100644 index 000000000..f2a98ac8a --- /dev/null +++ b/search/all_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['_5f_5fbool_5f_5f_0',['__bool__',['../classlazy_1_1Node.html#a91eb47137cb177938cd6f9159a35ecba',1,'lazy::Node']]], + ['_5f_5fcall_5f_5f_1',['__call__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a662dadc370dbf1236fee5990e1a97ab3',1,'tetragono.sampling_lattice.observer.Observer.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a08dc5b51a621174d2daa89ed087c8d0e',1,'tetragono.sampling_lattice.sampling.Sampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a4dc433cbfc80e6b30085c24b34419225',1,'tetragono.sampling_lattice.sampling.SweepSampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a712b8f4a0170f858e3217628b48974ee',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a6226011ce4975ebff1549eacac24fcf8',1,'tetragono.sampling_lattice.sampling.DirectSampling.__call__()'],['../classlazy_1_1Copy.html#a24b2a418a8c00fc6fb8ed54b602733a7',1,'lazy.Copy.__call__()'],['../classlazy_1_1Node.html#aca3e678611aef27ad9b50b86c103a9ff',1,'lazy.Node.__call__(self)']]], + ['_5f_5fdel_5f_5f_2',['__del__',['../classlazy_1_1Node.html#a99d8242739e6786be31bf9b2f96e0ac3',1,'lazy::Node']]], + ['_5f_5fdelitem_5f_5f_3',['__delitem__',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4fe67d27dfd9853183ae9d38bb8e3d08',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['_5f_5fenter_5f_5f_4',['__enter__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#adedc59e57abe60fb94a14b6815172e4d',1,'tetragono::sampling_lattice::observer::Observer']]], + ['_5f_5fexit_5f_5f_5',['__exit__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a3c4de7e03f1d10ad16e02e160ff9af3b',1,'tetragono::sampling_lattice::observer::Observer']]], + ['_5f_5fgetitem_5f_5f_6',['__getitem__',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#a114cd456bc092078028bbc0a9fdec326',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__getitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58034254a765b7e82de474bc06e63af8',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__getitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2fe676b4d2a2391f01e81ecf91eeff48',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__getitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a33e33c11fb72f236c62476af5388abd1',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__getitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a2af731df5b07c3858a62a499cc2543ed',1,'tetragono.sampling_lattice.lattice.Configuration.__getitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#af276b6b7f597291dd75ad68f004bbd84',1,'tetragono.abstract_state.AbstractStateHamiltonian.__getitem__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a29e4b748ff1521fe85da1c03ad291d7b',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__getitem__()']]], + ['_5f_5finit_5f_5f_7',['__init__',['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a5cde2ef6661a20a2cabc1b9583aaccf2',1,'tetragono.abstract_state.AbstractStateHamiltonian.__init__()'],['../classlazy_1_1Node.html#ad2d70d07992ad7422c187d36e8f9541d',1,'lazy.Node.__init__()'],['../classlazy_1_1Copy.html#a8464af7791aa79499178a9b731265ba2',1,'lazy.Copy.__init__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a8a9f2fd840681f2b3ac41c6f6b562535',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__init__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a36f40369dd7c59e0f8598d3e8d751b98',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__init__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a3a20d7e33555bdec48c35df7d1f8a401',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.__init__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a850e41d47affeb0306e3ce536e6d0a84',1,'tetragono.sampling_lattice.sampling.Sampling.__init__()'],['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa59ed339af790d2350c5d1d5e290b963',1,'tetragono.sampling_lattice.observer.Observer.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a634c8d53e46e9a84b8df8d42ae929063',1,'tetragono.sampling_lattice.lattice.ConfigurationPool.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a3b38513fee73afb58d6630ae82ecb060',1,'tetragono.sampling_lattice.lattice.Configuration.__init__()'],['../classtetragono_1_1exact__state_1_1ExactState.html#a74cb58effb55227719a2ef0b5fc87a8d',1,'tetragono.exact_state.ExactState.__init__()'],['../classtetragono_1_1abstract__state_1_1AbstractState.html#addaa8c76d0a6ba0d4c36143f8640878d',1,'tetragono.abstract_state.AbstractState.__init__()'],['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#af1a3334c4c25a8b082f3be2edc4e908a',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__init__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a9be811ba1a386e01f2ba6c72aaba00ca',1,'tetragono.abstract_lattice.AbstractLattice.__init__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a292b1dcbccb969402ffe54c7338105c0',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#aa2d2822ed9057548bbd4e47a47bb9d1a',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__init__()']]], + ['_5f_5fiter_5f_5f_8',['__iter__',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ac1b9e4f95cb2126876f6ff807b8c1889',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__iter__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a44e0b087e55a4b63c5d73446b1b4d8f4',1,'tetragono.abstract_state.AbstractStateHamiltonian.__iter__()']]], + ['_5f_5fsetitem_5f_5f_9',['__setitem__',['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#ad47d5137056eafddadde5007bb806ae4',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__setitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ab137cf85d9b34c4813e8215919e432f0',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__setitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#ae2e051ad78978e745c4e5359c70e4606',1,'tetragono.abstract_state.AbstractStateHamiltonian.__setitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a6b756f4e93d5bc025da50be32b65567f',1,'tetragono.sampling_lattice.lattice.Configuration.__setitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a00d9ba01470fe063a7e6fcc906230334',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__setitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2df4906665e07f886349903daf2a0542',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__setitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58be3056ed6a8ba64747d20c476f3927',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__setitem__()']]] +]; diff --git a/search/all_1.html b/search/all_1.html new file mode 100644 index 000000000..9f80e9043 --- /dev/null +++ b/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_1.js b/search/all_1.js new file mode 100644 index 000000000..efa653b12 --- /dev/null +++ b/search/all_1.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['abstractlattice_10',['AbstractLattice',['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html',1,'tetragono::abstract_lattice']]], + ['abstractlatticevirtualbond_11',['AbstractLatticeVirtualBond',['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html',1,'tetragono::abstract_lattice']]], + ['abstractstate_12',['AbstractState',['../classtetragono_1_1abstract__state_1_1AbstractState.html',1,'tetragono::abstract_state']]], + ['abstractstatehamiltonian_13',['AbstractStateHamiltonian',['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html',1,'tetragono::abstract_state']]], + ['abstractstatephysicsedge_14',['AbstractStatePhysicsEdge',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html',1,'tetragono::abstract_state']]], + ['acquire_5fdata_5fownership_15',['acquire_data_ownership',['../classTAT_1_1Tensor.html#a524e78cb0007af1862eecb796fab2039',1,'TAT::Tensor']]], + ['add_16',['add',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a59bd03a95abc855ce8b31ee7d0a34231',1,'tetragono::sampling_lattice::lattice::ConfigurationPool']]], + ['add_5fenergy_17',['add_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#acfe813b4b57515c2edda7aeb2d818cd1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['add_5fobserver_18',['add_observer',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ac190aeb1a169ca230412f5955cb550ea',1,'tetragono::sampling_lattice::observer::Observer']]], + ['allocator_2ehpp_19',['allocator.hpp',['../allocator_8hpp.html',1,'']]], + ['apply_5fgradient_20',['apply_gradient',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#ac33e5b348b8fbc04d9ca8e10bcaf19a5',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['arrow_21',['Arrow',['../namespaceTAT.html#a78326bee7cc963cd2d165718de5c0465',1,'TAT']]], + ['autocmd_22',['AutoCmd',['../classtetragono_1_1shell_1_1AutoCmd.html',1,'tetragono::shell']]], + ['autocmdmeta_23',['AutoCmdMeta',['../classtetragono_1_1shell_1_1AutoCmdMeta.html',1,'tetragono::shell']]] +]; diff --git a/search/all_10.html b/search/all_10.html new file mode 100644 index 000000000..3bf11961f --- /dev/null +++ b/search/all_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_10.js b/search/all_10.js new file mode 100644 index 000000000..0a0aa7eb7 --- /dev/null +++ b/search/all_10.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['range_5f_145',['range_',['../classTAT_1_1Tensor.html#a30e8ff8d5766a8886c6a3f3a4c42a858',1,'TAT::Tensor']]], + ['rank_146',['Rank',['../namespaceTAT.html#a59fa5a93972a6b9079e60c4b8c237eeb',1,'TAT']]], + ['real_5fscalar_147',['real_scalar',['../namespaceTAT.html#ac116f771206a618203057bffa8074f5c',1,'TAT']]], + ['refresh_5fall_148',['refresh_all',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a2a4b02a05c41ac9a060dff64df5a1dcb',1,'tetragono.sampling_lattice.sampling.DirectSampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a1f409d256befcd0b24b1dea6cac6bc9c',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a61de64b6038599e05d9adedd0dddf009',1,'tetragono.sampling_lattice.sampling.SweepSampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#aae10aa761a54fee2aed73bbf017f86e6',1,'tetragono.sampling_lattice.sampling.Sampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4adf53a7494cd2aab1862ae5e7445f89',1,'tetragono.sampling_lattice.lattice.Configuration.refresh_all(self)']]], + ['refresh_5fsite_149',['refresh_site',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad52508aa961509227955d5079c7b119f',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['relativecut_150',['RelativeCut',['../structTAT_1_1RelativeCut.html',1,'TAT']]], + ['remaincut_151',['RemainCut',['../structTAT_1_1RemainCut.html',1,'TAT']]], + ['remove_5fcvref_152',['remove_cvref',['../structTAT_1_1remove__cvref.html',1,'TAT']]], + ['replace_153',['replace',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aa10dcad28ece36a404b112c5a27db0aa',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['reset_154',['reset',['../classlazy_1_1Node.html#a9bad86b4aca22463f6642a0c11072c69',1,'lazy::Node']]], + ['restrict_5fsubspace_155',['restrict_subspace',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ab5c5927e64f676a853288152d56844fc',1,'tetragono::sampling_lattice::observer::Observer']]], + ['result_156',['result',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#af5d570413871fd6c1036eee5bbd7be71',1,'tetragono::sampling_lattice::observer::Observer']]], + ['reverse_5fedge_157',['reverse_edge',['../classTAT_1_1Tensor.html#a9c2178813a02d94c2525f7f480d4b1e9',1,'TAT::Tensor']]] +]; diff --git a/search/all_11.html b/search/all_11.html new file mode 100644 index 000000000..c9f79d289 --- /dev/null +++ b/search/all_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_11.js b/search/all_11.js new file mode 100644 index 000000000..b988e1fe3 --- /dev/null +++ b/search/all_11.js @@ -0,0 +1,40 @@ +var searchData= +[ + ['same_5fshape_158',['same_shape',['../classTAT_1_1Tensor.html#a08a76703eeeb86723b091d46103ace7c',1,'TAT::Tensor']]], + ['sampling_159',['Sampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['samplinglattice_160',['SamplingLattice',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html',1,'tetragono::sampling_lattice::lattice']]], + ['scalar_2ehpp_161',['scalar.hpp',['../scalar_8hpp.html',1,'']]], + ['scope_5fresource_162',['scope_resource',['../structTAT_1_1scope__resource.html',1,'TAT']]], + ['seed_163',['seed',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a8ae3452f9a0d2524927a228682ca125a',1,'tetragono::shell::TetragonoCommandApp']]], + ['seeddiffer_164',['SeedDiffer',['../classtetragono_1_1utility_1_1SeedDiffer.html',1,'tetragono::utility']]], + ['set_5f_165',['set_',['../classTAT_1_1Tensor.html#a6cd159e8adeb70bae24ccf880969ef1b',1,'TAT::Tensor']]], + ['set_5fclassical_5fenergy_166',['set_classical_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a7ffaebc98e02b2ffb23ecf1db00e496e',1,'tetragono::sampling_lattice::observer::Observer']]], + ['shape_167',['shape',['../classTAT_1_1Tensor.html#a683101e09360c10b21dbef560e487972',1,'TAT::Tensor']]], + ['shared_5fptr_2ehpp_168',['shared_ptr.hpp',['../shared__ptr_8hpp.html',1,'']]], + ['shrink_169',['shrink',['../classTAT_1_1Tensor.html#aa4395331cdff9dc9c15a9951ca6d8f92',1,'TAT::Tensor']]], + ['shrink_5fand_5fexpand_2ehpp_170',['shrink_and_expand.hpp',['../shrink__and__expand_8hpp.html',1,'']]], + ['signalhandler_171',['SignalHandler',['../classtetragono_1_1utility_1_1SignalHandler.html',1,'tetragono::utility']]], + ['simpleupdatelattice_172',['SimpleUpdateLattice',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html',1,'tetragono::simple_update_lattice']]], + ['simpleupdatelatticeenvironment_173',['SimpleUpdateLatticeEnvironment',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html',1,'tetragono::simple_update_lattice']]], + ['singlelayerauxiliaries_174',['SingleLayerAuxiliaries',['../classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html',1,'tetragono::auxiliaries::single_layer_auxiliaries']]], + ['site_5fnumber_175',['site_number',['../classtetragono_1_1abstract__state_1_1AbstractState.html#ab3c4714de4db51d56490cee41b340e3e',1,'tetragono::abstract_state::AbstractState']]], + ['site_5fvalid_176',['site_valid',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#afca7bcd2612c863cc94110bf42189605',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['sites_177',['sites',['../classtetragono_1_1abstract__state_1_1AbstractState.html#aca5265b10f079ee2edfb21db662e121f',1,'tetragono::abstract_state::AbstractState']]], + ['size_178',['Size',['../namespaceTAT.html#a165aa7ea040b184dc85762582d2b5a9c',1,'TAT']]], + ['split_5fand_5fmerge_2ehpp_179',['split_and_merge.hpp',['../split__and__merge_8hpp.html',1,'']]], + ['split_5fedge_180',['split_edge',['../classTAT_1_1Tensor.html#a6d054dd1ae3acfcdb5b0a7def94bcaf4',1,'TAT::Tensor']]], + ['stability_181',['stability',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98317e982660eb498f2d0073d067eb71',1,'tetragono::sampling_lattice::observer::Observer']]], + ['su_5fcreate_182',['su_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a63c29980fe5e1a92fcd473d068c06e46',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fdump_183',['su_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a56e950281f1c26599912f2dc77e428a5',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fenergy_184',['su_energy',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa072452f5469a8600a27154e3e5b25ab',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fload_185',['su_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a71331c4009f3711ac27fc69f022f3aae',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fto_5fex_186',['su_to_ex',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ad12a9b392e57e977ff871f4ba3742eee',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fto_5fgm_187',['su_to_gm',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a664e6207504d9f2c1101b8bc1794c18b',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fupdate_188',['su_update',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a190270fabf8c99610c6c43970ec5ca5e',1,'tetragono::shell::TetragonoCommandApp']]], + ['svd_189',['svd',['../classTAT_1_1Tensor.html#a276a47e3b157dd1d62d07218acab669b',1,'TAT::Tensor']]], + ['svd_2ehpp_190',['svd.hpp',['../svd_8hpp.html',1,'']]], + ['svd_5fresult_191',['svd_result',['../structTAT_1_1Tensor_1_1svd__result.html',1,'TAT::Tensor']]], + ['sweepsampling_192',['SweepSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['symmetry_193',['Symmetry',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a2a054b0b40d58a71ac7ed39d9da2d032',1,'tetragono.abstract_state.AbstractState.Symmetry()'],['../structTAT_1_1Symmetry.html',1,'TAT::Symmetry< T >']]], + ['symmetry_2ehpp_194',['symmetry.hpp',['../symmetry_8hpp.html',1,'']]] +]; diff --git a/search/all_12.html b/search/all_12.html new file mode 100644 index 000000000..ab934722c --- /dev/null +++ b/search/all_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_12.js b/search/all_12.js new file mode 100644 index 000000000..6dcd8eb6c --- /dev/null +++ b/search/all_12.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['taildicttree_195',['TailDictTree',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html',1,'tetragono::sampling_lattice::lattice']]], + ['tat_196',['TAT',['../namespaceTAT.html',1,'']]], + ['tat_2ehpp_197',['TAT.hpp',['../TAT_8hpp.html',1,'']]], + ['tensor_198',['Tensor',['../classTAT_1_1Tensor.html',1,'TAT::Tensor< ScalarType, Symmetry, Name >'],['../classTAT_1_1Tensor.html#affe6d2033032b8bf34ca5e80bb984b92',1,'TAT::Tensor::Tensor(scalar_t number, std::vector< Name > input_names={}, const std::vector< symmetry_t > &edge_symmetry={}, const std::vector< Arrow > &edge_arrow={})'],['../classTAT_1_1Tensor.html#acabf96991d54768b5b5c44665bb54e56',1,'TAT::Tensor::Tensor(std::vector< Name > input_names, std::vector< Edge< Symmetry >> input_edges)']]], + ['tensor_2ehpp_199',['tensor.hpp',['../tensor_8hpp.html',1,'']]], + ['tensor_3c_20scalartype_2c_20tat_3a_3asymmetry_2c_20name_20_3e_200',['Tensor< ScalarType, TAT::Symmetry, Name >',['../classTAT_1_1Tensor.html',1,'TAT']]], + ['tensorshape_201',['TensorShape',['../structTAT_1_1TensorShape.html',1,'TAT']]], + ['tetragonocommandapp_202',['TetragonoCommandApp',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html',1,'tetragono::shell']]], + ['tetragonoscriptapp_203',['TetragonoScriptApp',['../classtetragono_1_1shell_1_1TetragonoScriptApp.html',1,'tetragono::shell']]], + ['threelineauxiliaries_204',['ThreeLineAuxiliaries',['../classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html',1,'tetragono::auxiliaries::three_line_auxiliaries']]], + ['timer_205',['timer',['../structTAT_1_1timer.html',1,'TAT']]], + ['timer_2ehpp_206',['timer.hpp',['../timer_8hpp.html',1,'']]], + ['timer_5fguard_207',['timer_guard',['../structTAT_1_1timer_1_1timer__guard.html',1,'TAT::timer']]], + ['to_208',['to',['../classTAT_1_1Tensor.html#ab102bd3898b58fff24b10ed07f3221e6',1,'TAT::Tensor']]], + ['to_5fconst_5fintegral_209',['to_const_integral',['../namespaceTAT.html#a310b619f23bfbff05a8bb9f0fe28b198',1,'TAT']]], + ['total_5fenergy_210',['total_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa65c05ddf03ffc9f539d6ba58aa3288d',1,'tetragono::sampling_lattice::observer::Observer']]], + ['total_5fsymmetry_211',['total_symmetry',['../classtetragono_1_1abstract__state_1_1AbstractState.html#adc1580b7934e23f31263162e9d7f23da',1,'tetragono.abstract_state.AbstractState.total_symmetry(self)'],['../classtetragono_1_1abstract__state_1_1AbstractState.html#af462d02d8833dd5e10ca87babeefb84c',1,'tetragono.abstract_state.AbstractState.total_symmetry(self, value)']]], + ['trace_212',['trace',['../classTAT_1_1Tensor.html#acb6ab0cdbad2209b90ead845d7a02290',1,'TAT::Tensor']]], + ['trace_2ehpp_213',['trace.hpp',['../trace_8hpp.html',1,'']]], + ['transform_5f_214',['transform_',['../classTAT_1_1Tensor.html#ae59e57302105c9f01913c5d192cd4b8a',1,'TAT::Tensor']]], + ['transpose_215',['transpose',['../classTAT_1_1Tensor.html#a31a18b6c3d6ff8c667dbde1338388163',1,'TAT::Tensor']]], + ['type_5fidentity_216',['type_identity',['../structTAT_1_1type__identity.html',1,'TAT']]] +]; diff --git a/search/all_13.html b/search/all_13.html new file mode 100644 index 000000000..51172c2f3 --- /dev/null +++ b/search/all_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_13.js b/search/all_13.js new file mode 100644 index 000000000..4ff6e32c9 --- /dev/null +++ b/search/all_13.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['u1_217',['U1',['../namespaceTAT.html#acaff1ad08de8cf21a6ad0d08d9f8f07a',1,'TAT']]], + ['unixcolorcode_218',['UnixColorCode',['../structTAT_1_1UnixColorCode.html',1,'TAT']]], + ['update_219',['update',['../classtetragono_1_1exact__state_1_1ExactState.html#a8d6029895d29dad6c97cf18bcfe28eba',1,'tetragono.exact_state.ExactState.update()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af167a2a89fb12d8e127a9d44ecc20cfe',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.update()']]] +]; diff --git a/search/all_14.html b/search/all_14.html new file mode 100644 index 000000000..afecf5634 --- /dev/null +++ b/search/all_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_14.js b/search/all_14.js new file mode 100644 index 000000000..02cf2fa4b --- /dev/null +++ b/search/all_14.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['valid_220',['valid',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad0499922274724e33eaa3cb021cb526b',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['vector_221',['vector',['../allocator_8hpp.html#a156f923af61f5648f2bc1852e50d7852',1,'TAT::no_initialize::pmr']]], + ['version_222',['version',['../namespaceTAT.html#a8c4989bfe390f6c51321f9353b638e23',1,'TAT']]], + ['virtual_5fbond_223',['virtual_bond',['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a409bd1d032f034066db21b15cbabc551',1,'tetragono::abstract_lattice::AbstractLattice']]] +]; diff --git a/search/all_15.html b/search/all_15.html new file mode 100644 index 000000000..69f382b31 --- /dev/null +++ b/search/all_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_15.js b/search/all_15.js new file mode 100644 index 000000000..98050391c --- /dev/null +++ b/search/all_15.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['warning_224',['warning',['../common__variable_8hpp.html#a7e782f1f68a68861d1e3c7b325e6729e',1,'TAT::detail']]], + ['whole_5fresult_225',['whole_result',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a465775ad0ac85da1f9f2763efc46b64a',1,'tetragono::sampling_lattice::observer::Observer']]], + ['wss_226',['wss',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#af6fa0081907c8f9434d601399a931f1f',1,'tetragono::sampling_lattice::lattice::ConfigurationPool']]] +]; diff --git a/search/all_16.html b/search/all_16.html new file mode 100644 index 000000000..b19867ad9 --- /dev/null +++ b/search/all_16.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_16.js b/search/all_16.js new file mode 100644 index 000000000..0a7044385 --- /dev/null +++ b/search/all_16.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['z2_227',['Z2',['../namespaceTAT.html#a9f0315e334e454cc7330c18d2cbd677b',1,'TAT']]], + ['zero_5f_228',['zero_',['../classTAT_1_1Tensor.html#ac33a91d33b50b4159ed21152ebf1feee',1,'TAT::Tensor']]] +]; diff --git a/search/all_2.html b/search/all_2.html new file mode 100644 index 000000000..02cfffc2e --- /dev/null +++ b/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_2.js b/search/all_2.js new file mode 100644 index 000000000..c80c7691b --- /dev/null +++ b/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bcast_5flattice_24',['bcast_lattice',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a3a96db0e6faf64e53a49a446cb7d8caa',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]] +]; diff --git a/search/all_3.html b/search/all_3.html new file mode 100644 index 000000000..39767b85b --- /dev/null +++ b/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_3.js b/search/all_3.js new file mode 100644 index 000000000..c006de206 --- /dev/null +++ b/search/all_3.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['cache_5fconfiguration_25',['cache_configuration',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98730f2a5c3b5066f2b54dc16d7dd872',1,'tetragono::sampling_lattice::observer::Observer']]], + ['cache_5fnatural_5fdelta_26',['cache_natural_delta',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae0d799fc50d80607d42d4d4eb8713142',1,'tetragono::sampling_lattice::observer::Observer']]], + ['clear_5fbose_5fsymmetry_27',['clear_bose_symmetry',['../classTAT_1_1Tensor.html#a37905938d21c150eba14bf9e5cedda2e',1,'TAT::Tensor']]], + ['clear_5ffermi_5fsymmetry_28',['clear_fermi_symmetry',['../classTAT_1_1Tensor.html#a5952fd6d1c8829c66920173c6cf908f9',1,'TAT::Tensor']]], + ['clear_5fsymmetry_29',['clear_symmetry',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a104933f247c75322ca13abdd8bcff5be',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['clear_5fsymmetry_2ehpp_30',['clear_symmetry.hpp',['../clear__symmetry_8hpp.html',1,'']]], + ['common_5fvariable_2ehpp_31',['common_variable.hpp',['../common__variable_8hpp.html',1,'']]], + ['config_32',['Config',['../classtetragono_1_1shell_1_1Config.html',1,'tetragono::shell']]], + ['configuration_33',['Configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html',1,'tetragono::sampling_lattice::lattice']]], + ['configurationpool_34',['ConfigurationPool',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html',1,'tetragono::sampling_lattice::lattice']]], + ['conjugate_35',['conjugate',['../classTAT_1_1Tensor.html#a2f0a15a569566bda7e0fdf1d67297f99',1,'TAT::Tensor']]], + ['conjugate_2ehpp_36',['conjugate.hpp',['../conjugate_8hpp.html',1,'']]], + ['const_5fintegral_2ehpp_37',['const_integral.hpp',['../const__integral_8hpp.html',1,'']]], + ['contract_38',['contract',['../classTAT_1_1Tensor.html#a033ac5c2f01b3e878ae9ff5415d4f80f',1,'TAT::Tensor']]], + ['contract_2ehpp_39',['contract.hpp',['../contract_8hpp.html',1,'']]], + ['copy_40',['copy',['../classTAT_1_1Tensor.html#a9d94cc5a258afdf3b256779df8a8bd9b',1,'TAT::Tensor::copy()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aee7d3b2e7b98f0d2f4a4c29b4782f9be',1,'tetragono.sampling_lattice.lattice.Configuration.copy()']]], + ['copy_41',['Copy',['../classlazy_1_1Copy.html',1,'lazy']]], + ['core_42',['Core',['../classTAT_1_1Core.html',1,'TAT']]], + ['core_2ehpp_43',['core.hpp',['../core_8hpp.html',1,'']]], + ['cut_44',['Cut',['../structTAT_1_1Cut.html',1,'TAT']]] +]; diff --git a/search/all_4.html b/search/all_4.html new file mode 100644 index 000000000..fc40463c8 --- /dev/null +++ b/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_4.js b/search/all_4.js new file mode 100644 index 000000000..8e3df013f --- /dev/null +++ b/search/all_4.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['debug_5fmode_45',['debug_mode',['../namespaceTAT.html#a6d44e6f53051ef6947a1906a0d5e7a2f',1,'TAT']]], + ['directsampling_46',['DirectSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['do_5feof_47',['do_EOF',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ab4e14ff6d40a3e2821f4c4473badc3c3',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fexit_48',['do_exit',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a21e15ef2581ed029c488442f4ffa20b3',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fquit_49',['do_quit',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aede8eff5c75a8fb8af49507ae511c7c2',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fshell_50',['do_shell',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#abd664cd29ef614a3ce77b56a98bd9881',1,'tetragono::shell::TetragonoCommandApp']]], + ['doublelayerauxiliaries_51',['DoubleLayerAuxiliaries',['../classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html',1,'tetragono::auxiliaries::double_layer_auxiliaries']]] +]; diff --git a/search/all_5.html b/search/all_5.html new file mode 100644 index 000000000..9dd9344b0 --- /dev/null +++ b/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_5.js b/search/all_5.js new file mode 100644 index 000000000..37dcb6eb7 --- /dev/null +++ b/search/all_5.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['edge_52',['Edge',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a2ddd4b1e290bd238d667e763a113dbad',1,'tetragono.abstract_state.AbstractState.Edge()'],['../classTAT_1_1Edge.html',1,'TAT::Edge< Symmetry, is_pointer >']]], + ['edge_2ehpp_53',['edge.hpp',['../edge_8hpp.html',1,'']]], + ['edge_5fbose_5farrow_5ft_54',['edge_bose_arrow_t',['../structTAT_1_1edge__bose__arrow__t.html',1,'TAT']]], + ['edge_5ffermi_5farrow_5ft_55',['edge_fermi_arrow_t',['../structTAT_1_1edge__fermi__arrow__t.html',1,'TAT']]], + ['edge_5foperator_56',['edge_operator',['../classTAT_1_1Tensor.html#a901355092a5934d891cf2d790a52928a',1,'TAT::Tensor']]], + ['edge_5foperator_2ehpp_57',['edge_operator.hpp',['../edge__operator_8hpp.html',1,'']]], + ['edge_5frename_58',['edge_rename',['../classTAT_1_1Tensor.html#a2dd30f5a2a819d1394faee8593c5bc07',1,'TAT::Tensor']]], + ['edge_5fsegments_5ft_59',['edge_segments_t',['../classTAT_1_1edge__segments__t.html#a27296e058ee16bb7cb1568a7dd59af08',1,'TAT::edge_segments_t::edge_segments_t(const Size dimension, const symmetry_t symmetry=symmetry_t())'],['../classTAT_1_1edge__segments__t.html#aab6178d4988af5ee6d59824e98f4091a',1,'TAT::edge_segments_t::edge_segments_t(const symlist_t &symmetries)'],['../classTAT_1_1edge__segments__t.html',1,'TAT::edge_segments_t< Symmetry, _is_pointer >']]], + ['edge_5fsegments_5ft_3c_20symmetry_2c_20false_20_3e_60',['edge_segments_t< Symmetry, false >',['../classTAT_1_1edge__segments__t.html',1,'TAT']]], + ['edgepointer_61',['EdgePointer',['../namespaceTAT.html#ae21b38ad84427829832b86083f28b8cc',1,'TAT']]], + ['empty_5flist_62',['empty_list',['../structTAT_1_1empty__list.html',1,'TAT']]], + ['enable_5fgradient_63',['enable_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#abe57b26bcd77ec88d49c932d43d0373a',1,'tetragono::sampling_lattice::observer::Observer']]], + ['enable_5fnatural_5fgradient_64',['enable_natural_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a8fe04b9cfe8183116cfca513a89826a1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['energy_65',['energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a73fc4732537a2a0bd270d7a34b244be1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['environment_66',['environment',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a2ad1f572debc5c79e4f966bf19065c0b',1,'tetragono::simple_update_lattice::SimpleUpdateLattice']]], + ['ergodicsampling_67',['ErgodicSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['error_68',['error',['../common__variable_8hpp.html#a701eeade9e0991be1161d1d77fffa1c1',1,'TAT::detail']]], + ['ex_5fcreate_69',['ex_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a4fa90d0eac5f9194a12d2df43630c945',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fdump_70',['ex_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a67f243ed364067d68a675d1c1356ed05',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fenergy_71',['ex_energy',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#af0492b0632ff20ebb0f0fa11679fddc2',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fload_72',['ex_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#adf1fae5cd1f485dac94b92b90631d94b',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fupdate_73',['ex_update',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a7b761bc3792405bdb1ad219daec8f6d0',1,'tetragono::shell::TetragonoCommandApp']]], + ['exactstate_74',['ExactState',['../classtetragono_1_1exact__state_1_1ExactState.html',1,'tetragono::exact_state']]], + ['expand_75',['expand',['../classTAT_1_1Tensor.html#abfe5e71bab16ac331796bede0e9cc3b7',1,'TAT::Tensor']]], + ['expand_5fdimension_76',['expand_dimension',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a90757cd7737645b3adb58587e7c6ef70',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['exponential_77',['exponential',['../classTAT_1_1Tensor.html#a359f958ae38a0fccf3b9ddb61e4fdf2e',1,'TAT::Tensor']]], + ['exponential_2ehpp_78',['exponential.hpp',['../exponential_8hpp.html',1,'']]], + ['export_5fconfiguration_79',['export_configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4216dd65372792477e7771b38db3d09c',1,'tetragono::sampling_lattice::lattice::Configuration']]] +]; diff --git a/search/all_6.html b/search/all_6.html new file mode 100644 index 000000000..f1e516d75 --- /dev/null +++ b/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_6.js b/search/all_6.js new file mode 100644 index 000000000..1b4425267 --- /dev/null +++ b/search/all_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['fakeedge_80',['FakeEdge',['../classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html',1,'tetragono::common_tensor::tensor_toolkit']]], + ['fastname_81',['FastName',['../classTAT_1_1FastName.html',1,'TAT']]], + ['fermi_82',['fermi',['../structTAT_1_1fermi.html',1,'TAT']]] +]; diff --git a/search/all_7.html b/search/all_7.html new file mode 100644 index 000000000..8ddbf6c8e --- /dev/null +++ b/search/all_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_7.js b/search/all_7.js new file mode 100644 index 000000000..d374e4fe5 --- /dev/null +++ b/search/all_7.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['gm_5fclear_5fsymmetry_83',['gm_clear_symmetry',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#af2e5f4bbe482127f38d58147e84d1906',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fcreate_84',['gm_conf_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1be9a2c1a86e7ce42ed6d73a42c393c2',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fdump_85',['gm_conf_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a3a9a286b8d416e5c06596351cd3060db',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5feq_86',['gm_conf_eq',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#adff7b4f6367215a1dcb70683ad99555c',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fload_87',['gm_conf_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1bc6b273c2248cc5b7db2f71906fcb3d',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fload_5fcompat_88',['gm_conf_load_compat',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ac0d7660885818916e0dff95f2a646eeb',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fcreate_89',['gm_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a08333a5ab973e3191f139b9aa5b808b9',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fdump_90',['gm_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ae6a0a3f322b0728804cdd80cd26baf07',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fexpand_91',['gm_expand',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a04a45748ad7f749aab863f10f2cce755',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fhamiltonian_92',['gm_hamiltonian',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a314b331d0edbc4cc7de5af1fbfa12a38',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fload_93',['gm_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa2883f8cbab52c84b0e66e9b18f02b11',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fto_5fex_94',['gm_to_ex',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aac2a4689442d01ff031c1802680c83af',1,'tetragono::shell::TetragonoCommandApp']]], + ['gradient_95',['gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae1c6035db5cb0d57dc7eb1eefb390023',1,'tetragono::sampling_lattice::observer::Observer']]] +]; diff --git a/search/all_8.html b/search/all_8.html new file mode 100644 index 000000000..83c55ae22 --- /dev/null +++ b/search/all_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_8.js b/search/all_8.js new file mode 100644 index 000000000..9409adde1 --- /dev/null +++ b/search/all_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['hamiltonians_96',['hamiltonians',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a07bb0672a9d404dcab63644695aa640f',1,'tetragono::abstract_state::AbstractState']]], + ['hash_3c_20pair_3c_20name_2c_20name_20_3e_20_3e_97',['hash< pair< Name, Name > >',['../structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html',1,'std']]], + ['hash_3c_20tat_3a_3afastname_20_3e_98',['hash< TAT::FastName >',['../structstd_1_1hash_3_01TAT_1_1FastName_01_4.html',1,'std']]], + ['hash_3c_20tat_3a_3asymmetry_3c_20t_2e_2e_2e_20_3e_20_3e_99',['hash< TAT::Symmetry< T... > >',['../structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html',1,'std']]], + ['holes_100',['holes',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#affd58dbd77dea0af17f93809bfc7340b',1,'tetragono::sampling_lattice::lattice::Configuration']]] +]; diff --git a/search/all_9.html b/search/all_9.html new file mode 100644 index 000000000..1e263c134 --- /dev/null +++ b/search/all_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_9.js b/search/all_9.js new file mode 100644 index 000000000..e939cdac9 --- /dev/null +++ b/search/all_9.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['identity_2ehpp_101',['identity.hpp',['../identity_8hpp.html',1,'']]], + ['identity_5f_102',['identity_',['../classTAT_1_1Tensor.html#a787430069374aa78d856c364774e550c',1,'TAT::Tensor']]], + ['import_5fconfiguration_103',['import_configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a13c15f4941fa89fbbf5e7ad73982f60a',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['information_104',['information',['../namespaceTAT.html#a4bd3f61e9cfc98419950be0791e15e1d',1,'TAT']]], + ['initialize_5fauxiliaries_105',['initialize_auxiliaries',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#aec3094a2cf04cf9c439bc177c79c2184',1,'tetragono::simple_update_lattice::SimpleUpdateLattice']]], + ['internalname_106',['InternalName',['../structTAT_1_1InternalName.html',1,'TAT']]], + ['io_2ehpp_107',['io.hpp',['../io_8hpp.html',1,'']]], + ['is_5fname_108',['is_name',['../namespaceTAT.html#abe997f7e8402883a5e89b0cbf3f60af2',1,'TAT']]], + ['is_5fsymmetry_109',['is_symmetry',['../namespaceTAT.html#aebd8b134e9b359acd653ad1aab1a37e1',1,'TAT']]], + ['iterator_5fgeneral_110',['iterator_general',['../structTAT_1_1mdspan_1_1iterator__general.html',1,'TAT::mdspan']]] +]; diff --git a/search/all_a.html b/search/all_a.html new file mode 100644 index 000000000..3a6cac108 --- /dev/null +++ b/search/all_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_a.js b/search/all_a.js new file mode 100644 index 000000000..742273bbd --- /dev/null +++ b/search/all_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lattice_5fdot_111',['lattice_dot',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a1b3fc2a54744b7b6c62da5ea2c0d80af',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['log_112',['log',['../common__variable_8hpp.html#a74538be91c8fa85b6f8ac2b5ac884ce2',1,'TAT::detail']]] +]; diff --git a/search/all_b.html b/search/all_b.html new file mode 100644 index 000000000..130deb4ed --- /dev/null +++ b/search/all_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_b.js b/search/all_b.js new file mode 100644 index 000000000..b70d68b01 --- /dev/null +++ b/search/all_b.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['map_113',['map',['../classTAT_1_1Tensor.html#a13e3ba161ed773635f263a9e7eec9866',1,'TAT::Tensor']]], + ['mdspan_114',['mdspan',['../classTAT_1_1mdspan.html',1,'TAT']]], + ['mdspan_3c_20std_3a_3aoptional_3c_20tat_3a_3amdspan_3c_20scalar_5ft_20_3e_20_3e_20_3e_115',['mdspan< std::optional< TAT::mdspan< scalar_t > > >',['../classTAT_1_1mdspan.html',1,'TAT']]], + ['merge_5fedge_116',['merge_edge',['../classTAT_1_1Tensor.html#a4f889adcfeef434b4dfa522396eba618',1,'TAT::Tensor']]], + ['mpi_2ehpp_117',['mpi.hpp',['../mpi_8hpp.html',1,'']]], + ['mpi_5fone_5foutput_5fstream_118',['mpi_one_output_stream',['../structTAT_1_1mpi__one__output__stream.html',1,'TAT']]], + ['mpi_5frank_5foutput_5fstream_119',['mpi_rank_output_stream',['../structTAT_1_1mpi__rank__output__stream.html',1,'TAT']]], + ['mpi_5ft_120',['mpi_t',['../structTAT_1_1mpi__t.html',1,'TAT']]], + ['multidimension_5fspan_2ehpp_121',['multidimension_span.hpp',['../multidimension__span_8hpp.html',1,'']]] +]; diff --git a/search/all_c.html b/search/all_c.html new file mode 100644 index 000000000..3dd5af06d --- /dev/null +++ b/search/all_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_c.js b/search/all_c.js new file mode 100644 index 000000000..468975b86 --- /dev/null +++ b/search/all_c.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['name_2ehpp_122',['name.hpp',['../name_8hpp.html',1,'']]], + ['nametraits_123',['NameTraits',['../structTAT_1_1NameTraits.html',1,'TAT']]], + ['nametraits_3c_20fastname_20_3e_124',['NameTraits< FastName >',['../structTAT_1_1NameTraits_3_01FastName_01_4.html',1,'TAT']]], + ['nametraits_3c_20std_3a_3astring_20_3e_125',['NameTraits< std::string >',['../structTAT_1_1NameTraits_3_01std_1_1string_01_4.html',1,'TAT']]], + ['natural_5fgradient_5fby_5fconjugate_5fgradient_126',['natural_gradient_by_conjugate_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a4c4ba912bfe0764f84a91c2951da518e',1,'tetragono::sampling_lattice::observer::Observer']]], + ['natural_5fgradient_5fby_5fdirect_5fpseudo_5finverse_127',['natural_gradient_by_direct_pseudo_inverse',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a35dc33bd71e1297d5ae5c51164ac18b8',1,'tetragono::sampling_lattice::observer::Observer']]], + ['nocut_128',['NoCut',['../structTAT_1_1NoCut.html',1,'TAT']]], + ['node_129',['Node',['../classlazy_1_1Node.html',1,'lazy']]], + ['norm_130',['norm',['../classTAT_1_1Tensor.html#a3f4c8d7b41f7742fe2f4a68d8df3aecd',1,'TAT::Tensor']]], + ['normalize_5flattice_131',['normalize_lattice',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a30ecbf1ca4f5757406228a89df6d4164',1,'tetragono::sampling_lattice::observer::Observer']]], + ['nothing_132',['nothing',['../common__variable_8hpp.html#afb968550316dbe2e1ebd9075c74928ad',1,'TAT::detail']]], + ['numpy_5fhamiltonian_133',['numpy_hamiltonian',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a996374358c3ac113376aed6da6e59f41',1,'tetragono.abstract_state.AbstractState.numpy_hamiltonian()'],['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#abe5ab99a0716d879976773b8f1d1b513',1,'tetragono.shell.TetragonoCommandApp.numpy_hamiltonian()']]], + ['nums_134',['Nums',['../namespaceTAT.html#a713d18eb8b9832d7eefc21eb22df52c4',1,'TAT']]] +]; diff --git a/search/all_d.html b/search/all_d.html new file mode 100644 index 000000000..af7f2f0f5 --- /dev/null +++ b/search/all_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_d.js b/search/all_d.js new file mode 100644 index 000000000..3c2f04a6e --- /dev/null +++ b/search/all_d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['observe_135',['observe',['../classtetragono_1_1exact__state_1_1ExactState.html#a54f90bd26eac86c6f8df78baf364bc09',1,'tetragono.exact_state.ExactState.observe()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a702d1531cc8fde01ed583493c85dcb37',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.observe()']]], + ['observe_5fenergy_136',['observe_energy',['../classtetragono_1_1exact__state_1_1ExactState.html#a70856ea49a4d149b61be482f1973a813',1,'tetragono.exact_state.ExactState.observe_energy()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af1ed1b0b1919959f69127b544efb8e8b',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.observe_energy()']]], + ['observer_137',['Observer',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html',1,'tetragono::sampling_lattice::observer']]], + ['operator_20scalar_5ft_138',['operator scalar_t',['../classTAT_1_1Tensor.html#af11438e704287b62eed5afd041f1271b',1,'TAT::Tensor']]], + ['overloaded_139',['overloaded',['../structTAT_1_1overloaded.html',1,'TAT']]] +]; diff --git a/search/all_e.html b/search/all_e.html new file mode 100644 index 000000000..e25df423a --- /dev/null +++ b/search/all_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_e.js b/search/all_e.js new file mode 100644 index 000000000..d7d575f48 --- /dev/null +++ b/search/all_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['parity_140',['parity',['../structTAT_1_1Symmetry.html#a9c4f85b0a733aa13de6d74b6cb5312c5',1,'TAT::Symmetry']]], + ['physics_5fedges_141',['physics_edges',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a7f9f81d4e7e7822fae97b04d4eda3849',1,'tetragono::abstract_state::AbstractState']]] +]; diff --git a/search/all_f.html b/search/all_f.html new file mode 100644 index 000000000..b23da6ce4 --- /dev/null +++ b/search/all_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_f.js b/search/all_f.js new file mode 100644 index 000000000..18bc17858 --- /dev/null +++ b/search/all_f.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['qr_142',['qr',['../classTAT_1_1Tensor.html#a4a821f80cf5e33664f34e47f22f432c0',1,'TAT::Tensor']]], + ['qr_2ehpp_143',['qr.hpp',['../qr_8hpp.html',1,'']]], + ['qr_5fresult_144',['qr_result',['../structTAT_1_1Tensor_1_1qr__result.html',1,'TAT::Tensor']]] +]; diff --git a/search/classes_0.html b/search/classes_0.html new file mode 100644 index 000000000..af8159ee6 --- /dev/null +++ b/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_0.js b/search/classes_0.js new file mode 100644 index 000000000..1313fb3ef --- /dev/null +++ b/search/classes_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['abstractlattice_229',['AbstractLattice',['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html',1,'tetragono::abstract_lattice']]], + ['abstractlatticevirtualbond_230',['AbstractLatticeVirtualBond',['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html',1,'tetragono::abstract_lattice']]], + ['abstractstate_231',['AbstractState',['../classtetragono_1_1abstract__state_1_1AbstractState.html',1,'tetragono::abstract_state']]], + ['abstractstatehamiltonian_232',['AbstractStateHamiltonian',['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html',1,'tetragono::abstract_state']]], + ['abstractstatephysicsedge_233',['AbstractStatePhysicsEdge',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html',1,'tetragono::abstract_state']]], + ['autocmd_234',['AutoCmd',['../classtetragono_1_1shell_1_1AutoCmd.html',1,'tetragono::shell']]], + ['autocmdmeta_235',['AutoCmdMeta',['../classtetragono_1_1shell_1_1AutoCmdMeta.html',1,'tetragono::shell']]] +]; diff --git a/search/classes_1.html b/search/classes_1.html new file mode 100644 index 000000000..576e91689 --- /dev/null +++ b/search/classes_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_1.js b/search/classes_1.js new file mode 100644 index 000000000..007ffd0c1 --- /dev/null +++ b/search/classes_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['config_236',['Config',['../classtetragono_1_1shell_1_1Config.html',1,'tetragono::shell']]], + ['configuration_237',['Configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html',1,'tetragono::sampling_lattice::lattice']]], + ['configurationpool_238',['ConfigurationPool',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html',1,'tetragono::sampling_lattice::lattice']]], + ['copy_239',['Copy',['../classlazy_1_1Copy.html',1,'lazy']]], + ['core_240',['Core',['../classTAT_1_1Core.html',1,'TAT']]], + ['cut_241',['Cut',['../structTAT_1_1Cut.html',1,'TAT']]] +]; diff --git a/search/classes_2.html b/search/classes_2.html new file mode 100644 index 000000000..956405e5a --- /dev/null +++ b/search/classes_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_2.js b/search/classes_2.js new file mode 100644 index 000000000..ee57c43c6 --- /dev/null +++ b/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['directsampling_242',['DirectSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['doublelayerauxiliaries_243',['DoubleLayerAuxiliaries',['../classtetragono_1_1auxiliaries_1_1double__layer__auxiliaries_1_1DoubleLayerAuxiliaries.html',1,'tetragono::auxiliaries::double_layer_auxiliaries']]] +]; diff --git a/search/classes_3.html b/search/classes_3.html new file mode 100644 index 000000000..d33343bc1 --- /dev/null +++ b/search/classes_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_3.js b/search/classes_3.js new file mode 100644 index 000000000..29414c27e --- /dev/null +++ b/search/classes_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['edge_244',['Edge',['../classTAT_1_1Edge.html',1,'TAT']]], + ['edge_5fbose_5farrow_5ft_245',['edge_bose_arrow_t',['../structTAT_1_1edge__bose__arrow__t.html',1,'TAT']]], + ['edge_5ffermi_5farrow_5ft_246',['edge_fermi_arrow_t',['../structTAT_1_1edge__fermi__arrow__t.html',1,'TAT']]], + ['edge_5fsegments_5ft_247',['edge_segments_t',['../classTAT_1_1edge__segments__t.html',1,'TAT']]], + ['edge_5fsegments_5ft_3c_20symmetry_2c_20false_20_3e_248',['edge_segments_t< Symmetry, false >',['../classTAT_1_1edge__segments__t.html',1,'TAT']]], + ['empty_5flist_249',['empty_list',['../structTAT_1_1empty__list.html',1,'TAT']]], + ['ergodicsampling_250',['ErgodicSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['exactstate_251',['ExactState',['../classtetragono_1_1exact__state_1_1ExactState.html',1,'tetragono::exact_state']]] +]; diff --git a/search/classes_4.html b/search/classes_4.html new file mode 100644 index 000000000..8430b07fe --- /dev/null +++ b/search/classes_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_4.js b/search/classes_4.js new file mode 100644 index 000000000..b8e3af5a9 --- /dev/null +++ b/search/classes_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['fakeedge_252',['FakeEdge',['../classtetragono_1_1common__tensor_1_1tensor__toolkit_1_1FakeEdge.html',1,'tetragono::common_tensor::tensor_toolkit']]], + ['fastname_253',['FastName',['../classTAT_1_1FastName.html',1,'TAT']]], + ['fermi_254',['fermi',['../structTAT_1_1fermi.html',1,'TAT']]] +]; diff --git a/search/classes_5.html b/search/classes_5.html new file mode 100644 index 000000000..c2f1b767b --- /dev/null +++ b/search/classes_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_5.js b/search/classes_5.js new file mode 100644 index 000000000..5f66fefcd --- /dev/null +++ b/search/classes_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['hash_3c_20pair_3c_20name_2c_20name_20_3e_20_3e_255',['hash< pair< Name, Name > >',['../structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html',1,'std']]], + ['hash_3c_20tat_3a_3afastname_20_3e_256',['hash< TAT::FastName >',['../structstd_1_1hash_3_01TAT_1_1FastName_01_4.html',1,'std']]], + ['hash_3c_20tat_3a_3asymmetry_3c_20t_2e_2e_2e_20_3e_20_3e_257',['hash< TAT::Symmetry< T... > >',['../structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html',1,'std']]] +]; diff --git a/search/classes_6.html b/search/classes_6.html new file mode 100644 index 000000000..e39847ce8 --- /dev/null +++ b/search/classes_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_6.js b/search/classes_6.js new file mode 100644 index 000000000..8b742221e --- /dev/null +++ b/search/classes_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['internalname_258',['InternalName',['../structTAT_1_1InternalName.html',1,'TAT']]], + ['iterator_5fgeneral_259',['iterator_general',['../structTAT_1_1mdspan_1_1iterator__general.html',1,'TAT::mdspan']]] +]; diff --git a/search/classes_7.html b/search/classes_7.html new file mode 100644 index 000000000..a2c4d1a39 --- /dev/null +++ b/search/classes_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_7.js b/search/classes_7.js new file mode 100644 index 000000000..824dbe281 --- /dev/null +++ b/search/classes_7.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mdspan_260',['mdspan',['../classTAT_1_1mdspan.html',1,'TAT']]], + ['mdspan_3c_20std_3a_3aoptional_3c_20tat_3a_3amdspan_3c_20scalar_5ft_20_3e_20_3e_20_3e_261',['mdspan< std::optional< TAT::mdspan< scalar_t > > >',['../classTAT_1_1mdspan.html',1,'TAT']]], + ['mpi_5fone_5foutput_5fstream_262',['mpi_one_output_stream',['../structTAT_1_1mpi__one__output__stream.html',1,'TAT']]], + ['mpi_5frank_5foutput_5fstream_263',['mpi_rank_output_stream',['../structTAT_1_1mpi__rank__output__stream.html',1,'TAT']]], + ['mpi_5ft_264',['mpi_t',['../structTAT_1_1mpi__t.html',1,'TAT']]] +]; diff --git a/search/classes_8.html b/search/classes_8.html new file mode 100644 index 000000000..17003e480 --- /dev/null +++ b/search/classes_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_8.js b/search/classes_8.js new file mode 100644 index 000000000..2ee6a0dfc --- /dev/null +++ b/search/classes_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['nametraits_265',['NameTraits',['../structTAT_1_1NameTraits.html',1,'TAT']]], + ['nametraits_3c_20fastname_20_3e_266',['NameTraits< FastName >',['../structTAT_1_1NameTraits_3_01FastName_01_4.html',1,'TAT']]], + ['nametraits_3c_20std_3a_3astring_20_3e_267',['NameTraits< std::string >',['../structTAT_1_1NameTraits_3_01std_1_1string_01_4.html',1,'TAT']]], + ['nocut_268',['NoCut',['../structTAT_1_1NoCut.html',1,'TAT']]], + ['node_269',['Node',['../classlazy_1_1Node.html',1,'lazy']]] +]; diff --git a/search/classes_9.html b/search/classes_9.html new file mode 100644 index 000000000..b8afa8cba --- /dev/null +++ b/search/classes_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_9.js b/search/classes_9.js new file mode 100644 index 000000000..9ffa9bd21 --- /dev/null +++ b/search/classes_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['observer_270',['Observer',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html',1,'tetragono::sampling_lattice::observer']]], + ['overloaded_271',['overloaded',['../structTAT_1_1overloaded.html',1,'TAT']]] +]; diff --git a/search/classes_a.html b/search/classes_a.html new file mode 100644 index 000000000..6788af270 --- /dev/null +++ b/search/classes_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_a.js b/search/classes_a.js new file mode 100644 index 000000000..7058d7e64 --- /dev/null +++ b/search/classes_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['qr_5fresult_272',['qr_result',['../structTAT_1_1Tensor_1_1qr__result.html',1,'TAT::Tensor']]] +]; diff --git a/search/classes_b.html b/search/classes_b.html new file mode 100644 index 000000000..3fcb49858 --- /dev/null +++ b/search/classes_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_b.js b/search/classes_b.js new file mode 100644 index 000000000..cbd7aecb9 --- /dev/null +++ b/search/classes_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['relativecut_273',['RelativeCut',['../structTAT_1_1RelativeCut.html',1,'TAT']]], + ['remaincut_274',['RemainCut',['../structTAT_1_1RemainCut.html',1,'TAT']]], + ['remove_5fcvref_275',['remove_cvref',['../structTAT_1_1remove__cvref.html',1,'TAT']]] +]; diff --git a/search/classes_c.html b/search/classes_c.html new file mode 100644 index 000000000..2f7b1f3da --- /dev/null +++ b/search/classes_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_c.js b/search/classes_c.js new file mode 100644 index 000000000..5b037ce82 --- /dev/null +++ b/search/classes_c.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['sampling_276',['Sampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['samplinglattice_277',['SamplingLattice',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html',1,'tetragono::sampling_lattice::lattice']]], + ['scope_5fresource_278',['scope_resource',['../structTAT_1_1scope__resource.html',1,'TAT']]], + ['seeddiffer_279',['SeedDiffer',['../classtetragono_1_1utility_1_1SeedDiffer.html',1,'tetragono::utility']]], + ['signalhandler_280',['SignalHandler',['../classtetragono_1_1utility_1_1SignalHandler.html',1,'tetragono::utility']]], + ['simpleupdatelattice_281',['SimpleUpdateLattice',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html',1,'tetragono::simple_update_lattice']]], + ['simpleupdatelatticeenvironment_282',['SimpleUpdateLatticeEnvironment',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html',1,'tetragono::simple_update_lattice']]], + ['singlelayerauxiliaries_283',['SingleLayerAuxiliaries',['../classtetragono_1_1auxiliaries_1_1single__layer__auxiliaries_1_1SingleLayerAuxiliaries.html',1,'tetragono::auxiliaries::single_layer_auxiliaries']]], + ['svd_5fresult_284',['svd_result',['../structTAT_1_1Tensor_1_1svd__result.html',1,'TAT::Tensor']]], + ['sweepsampling_285',['SweepSampling',['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html',1,'tetragono::sampling_lattice::sampling']]], + ['symmetry_286',['Symmetry',['../structTAT_1_1Symmetry.html',1,'TAT']]] +]; diff --git a/search/classes_d.html b/search/classes_d.html new file mode 100644 index 000000000..f9011e70f --- /dev/null +++ b/search/classes_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_d.js b/search/classes_d.js new file mode 100644 index 000000000..7a37b2747 --- /dev/null +++ b/search/classes_d.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['taildicttree_287',['TailDictTree',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1TailDictTree.html',1,'tetragono::sampling_lattice::lattice']]], + ['tensor_288',['Tensor',['../classTAT_1_1Tensor.html',1,'TAT']]], + ['tensor_3c_20scalartype_2c_20tat_3a_3asymmetry_2c_20name_20_3e_289',['Tensor< ScalarType, TAT::Symmetry, Name >',['../classTAT_1_1Tensor.html',1,'TAT']]], + ['tensorshape_290',['TensorShape',['../structTAT_1_1TensorShape.html',1,'TAT']]], + ['tetragonocommandapp_291',['TetragonoCommandApp',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html',1,'tetragono::shell']]], + ['tetragonoscriptapp_292',['TetragonoScriptApp',['../classtetragono_1_1shell_1_1TetragonoScriptApp.html',1,'tetragono::shell']]], + ['threelineauxiliaries_293',['ThreeLineAuxiliaries',['../classtetragono_1_1auxiliaries_1_1three__line__auxiliaries_1_1ThreeLineAuxiliaries.html',1,'tetragono::auxiliaries::three_line_auxiliaries']]], + ['timer_294',['timer',['../structTAT_1_1timer.html',1,'TAT']]], + ['timer_5fguard_295',['timer_guard',['../structTAT_1_1timer_1_1timer__guard.html',1,'TAT::timer']]], + ['type_5fidentity_296',['type_identity',['../structTAT_1_1type__identity.html',1,'TAT']]] +]; diff --git a/search/classes_e.html b/search/classes_e.html new file mode 100644 index 000000000..bb33dcfa5 --- /dev/null +++ b/search/classes_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_e.js b/search/classes_e.js new file mode 100644 index 000000000..fe25660d1 --- /dev/null +++ b/search/classes_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unixcolorcode_297',['UnixColorCode',['../structTAT_1_1UnixColorCode.html',1,'TAT']]] +]; diff --git a/search/close.svg b/search/close.svg new file mode 100644 index 000000000..a933eea1a --- /dev/null +++ b/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/search/files_0.html b/search/files_0.html new file mode 100644 index 000000000..9498842a6 --- /dev/null +++ b/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 000000000..2a49c638d --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['allocator_2ehpp_299',['allocator.hpp',['../allocator_8hpp.html',1,'']]] +]; diff --git a/search/files_1.html b/search/files_1.html new file mode 100644 index 000000000..7050ef48a --- /dev/null +++ b/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 000000000..9e36ff540 --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['clear_5fsymmetry_2ehpp_300',['clear_symmetry.hpp',['../clear__symmetry_8hpp.html',1,'']]], + ['common_5fvariable_2ehpp_301',['common_variable.hpp',['../common__variable_8hpp.html',1,'']]], + ['conjugate_2ehpp_302',['conjugate.hpp',['../conjugate_8hpp.html',1,'']]], + ['const_5fintegral_2ehpp_303',['const_integral.hpp',['../const__integral_8hpp.html',1,'']]], + ['contract_2ehpp_304',['contract.hpp',['../contract_8hpp.html',1,'']]], + ['core_2ehpp_305',['core.hpp',['../core_8hpp.html',1,'']]] +]; diff --git a/search/files_2.html b/search/files_2.html new file mode 100644 index 000000000..497cdf5c7 --- /dev/null +++ b/search/files_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_2.js b/search/files_2.js new file mode 100644 index 000000000..2f19d2b40 --- /dev/null +++ b/search/files_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['edge_2ehpp_306',['edge.hpp',['../edge_8hpp.html',1,'']]], + ['edge_5foperator_2ehpp_307',['edge_operator.hpp',['../edge__operator_8hpp.html',1,'']]], + ['exponential_2ehpp_308',['exponential.hpp',['../exponential_8hpp.html',1,'']]] +]; diff --git a/search/files_3.html b/search/files_3.html new file mode 100644 index 000000000..1ba106b2d --- /dev/null +++ b/search/files_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_3.js b/search/files_3.js new file mode 100644 index 000000000..dd32938f3 --- /dev/null +++ b/search/files_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['identity_2ehpp_309',['identity.hpp',['../identity_8hpp.html',1,'']]], + ['io_2ehpp_310',['io.hpp',['../io_8hpp.html',1,'']]] +]; diff --git a/search/files_4.html b/search/files_4.html new file mode 100644 index 000000000..753b7b109 --- /dev/null +++ b/search/files_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_4.js b/search/files_4.js new file mode 100644 index 000000000..fffaf4a8b --- /dev/null +++ b/search/files_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['mpi_2ehpp_311',['mpi.hpp',['../mpi_8hpp.html',1,'']]], + ['multidimension_5fspan_2ehpp_312',['multidimension_span.hpp',['../multidimension__span_8hpp.html',1,'']]] +]; diff --git a/search/files_5.html b/search/files_5.html new file mode 100644 index 000000000..7b6affd7f --- /dev/null +++ b/search/files_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_5.js b/search/files_5.js new file mode 100644 index 000000000..a4df63c0e --- /dev/null +++ b/search/files_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['name_2ehpp_313',['name.hpp',['../name_8hpp.html',1,'']]] +]; diff --git a/search/files_6.html b/search/files_6.html new file mode 100644 index 000000000..802ebf715 --- /dev/null +++ b/search/files_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_6.js b/search/files_6.js new file mode 100644 index 000000000..351060bbe --- /dev/null +++ b/search/files_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['qr_2ehpp_314',['qr.hpp',['../qr_8hpp.html',1,'']]] +]; diff --git a/search/files_7.html b/search/files_7.html new file mode 100644 index 000000000..365e6484f --- /dev/null +++ b/search/files_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_7.js b/search/files_7.js new file mode 100644 index 000000000..e5f16b26f --- /dev/null +++ b/search/files_7.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['scalar_2ehpp_315',['scalar.hpp',['../scalar_8hpp.html',1,'']]], + ['shared_5fptr_2ehpp_316',['shared_ptr.hpp',['../shared__ptr_8hpp.html',1,'']]], + ['shrink_5fand_5fexpand_2ehpp_317',['shrink_and_expand.hpp',['../shrink__and__expand_8hpp.html',1,'']]], + ['split_5fand_5fmerge_2ehpp_318',['split_and_merge.hpp',['../split__and__merge_8hpp.html',1,'']]], + ['svd_2ehpp_319',['svd.hpp',['../svd_8hpp.html',1,'']]], + ['symmetry_2ehpp_320',['symmetry.hpp',['../symmetry_8hpp.html',1,'']]] +]; diff --git a/search/files_8.html b/search/files_8.html new file mode 100644 index 000000000..3df0f2fae --- /dev/null +++ b/search/files_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_8.js b/search/files_8.js new file mode 100644 index 000000000..ed774cae9 --- /dev/null +++ b/search/files_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['tat_2ehpp_321',['TAT.hpp',['../TAT_8hpp.html',1,'']]], + ['tensor_2ehpp_322',['tensor.hpp',['../tensor_8hpp.html',1,'']]], + ['timer_2ehpp_323',['timer.hpp',['../timer_8hpp.html',1,'']]], + ['trace_2ehpp_324',['trace.hpp',['../trace_8hpp.html',1,'']]] +]; diff --git a/search/functions_0.html b/search/functions_0.html new file mode 100644 index 000000000..eb4c5014c --- /dev/null +++ b/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 000000000..9716bcf75 --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['_5f_5fbool_5f_5f_325',['__bool__',['../classlazy_1_1Node.html#a91eb47137cb177938cd6f9159a35ecba',1,'lazy::Node']]], + ['_5f_5fcall_5f_5f_326',['__call__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a662dadc370dbf1236fee5990e1a97ab3',1,'tetragono.sampling_lattice.observer.Observer.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a08dc5b51a621174d2daa89ed087c8d0e',1,'tetragono.sampling_lattice.sampling.Sampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a4dc433cbfc80e6b30085c24b34419225',1,'tetragono.sampling_lattice.sampling.SweepSampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a712b8f4a0170f858e3217628b48974ee',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.__call__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a6226011ce4975ebff1549eacac24fcf8',1,'tetragono.sampling_lattice.sampling.DirectSampling.__call__()'],['../classlazy_1_1Copy.html#a24b2a418a8c00fc6fb8ed54b602733a7',1,'lazy.Copy.__call__()'],['../classlazy_1_1Node.html#aca3e678611aef27ad9b50b86c103a9ff',1,'lazy.Node.__call__(self)']]], + ['_5f_5fdel_5f_5f_327',['__del__',['../classlazy_1_1Node.html#a99d8242739e6786be31bf9b2f96e0ac3',1,'lazy::Node']]], + ['_5f_5fdelitem_5f_5f_328',['__delitem__',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4fe67d27dfd9853183ae9d38bb8e3d08',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['_5f_5fenter_5f_5f_329',['__enter__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#adedc59e57abe60fb94a14b6815172e4d',1,'tetragono::sampling_lattice::observer::Observer']]], + ['_5f_5fexit_5f_5f_330',['__exit__',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a3c4de7e03f1d10ad16e02e160ff9af3b',1,'tetragono::sampling_lattice::observer::Observer']]], + ['_5f_5fgetitem_5f_5f_331',['__getitem__',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#a114cd456bc092078028bbc0a9fdec326',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__getitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58034254a765b7e82de474bc06e63af8',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__getitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2fe676b4d2a2391f01e81ecf91eeff48',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__getitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a33e33c11fb72f236c62476af5388abd1',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__getitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a2af731df5b07c3858a62a499cc2543ed',1,'tetragono.sampling_lattice.lattice.Configuration.__getitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#af276b6b7f597291dd75ad68f004bbd84',1,'tetragono.abstract_state.AbstractStateHamiltonian.__getitem__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a29e4b748ff1521fe85da1c03ad291d7b',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__getitem__()']]], + ['_5f_5finit_5f_5f_332',['__init__',['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a5cde2ef6661a20a2cabc1b9583aaccf2',1,'tetragono.abstract_state.AbstractStateHamiltonian.__init__()'],['../classlazy_1_1Node.html#ad2d70d07992ad7422c187d36e8f9541d',1,'lazy.Node.__init__()'],['../classlazy_1_1Copy.html#a8464af7791aa79499178a9b731265ba2',1,'lazy.Copy.__init__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a8a9f2fd840681f2b3ac41c6f6b562535',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__init__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a36f40369dd7c59e0f8598d3e8d751b98',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__init__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a3a20d7e33555bdec48c35df7d1f8a401',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.__init__()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#a850e41d47affeb0306e3ce536e6d0a84',1,'tetragono.sampling_lattice.sampling.Sampling.__init__()'],['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa59ed339af790d2350c5d1d5e290b963',1,'tetragono.sampling_lattice.observer.Observer.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a634c8d53e46e9a84b8df8d42ae929063',1,'tetragono.sampling_lattice.lattice.ConfigurationPool.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a3b38513fee73afb58d6630ae82ecb060',1,'tetragono.sampling_lattice.lattice.Configuration.__init__()'],['../classtetragono_1_1exact__state_1_1ExactState.html#a74cb58effb55227719a2ef0b5fc87a8d',1,'tetragono.exact_state.ExactState.__init__()'],['../classtetragono_1_1abstract__state_1_1AbstractState.html#addaa8c76d0a6ba0d4c36143f8640878d',1,'tetragono.abstract_state.AbstractState.__init__()'],['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#af1a3334c4c25a8b082f3be2edc4e908a',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__init__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a9be811ba1a386e01f2ba6c72aaba00ca',1,'tetragono.abstract_lattice.AbstractLattice.__init__()'],['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#a292b1dcbccb969402ffe54c7338105c0',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__init__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#aa2d2822ed9057548bbd4e47a47bb9d1a',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__init__()']]], + ['_5f_5fiter_5f_5f_333',['__iter__',['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ac1b9e4f95cb2126876f6ff807b8c1889',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__iter__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#a44e0b087e55a4b63c5d73446b1b4d8f4',1,'tetragono.abstract_state.AbstractStateHamiltonian.__iter__()']]], + ['_5f_5fsetitem_5f_5f_334',['__setitem__',['../classtetragono_1_1abstract__lattice_1_1AbstractLatticeVirtualBond.html#ad47d5137056eafddadde5007bb806ae4',1,'tetragono.abstract_lattice.AbstractLatticeVirtualBond.__setitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStatePhysicsEdge.html#ab137cf85d9b34c4813e8215919e432f0',1,'tetragono.abstract_state.AbstractStatePhysicsEdge.__setitem__()'],['../classtetragono_1_1abstract__state_1_1AbstractStateHamiltonian.html#ae2e051ad78978e745c4e5359c70e4606',1,'tetragono.abstract_state.AbstractStateHamiltonian.__setitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a6b756f4e93d5bc025da50be32b65567f',1,'tetragono.sampling_lattice.lattice.Configuration.__setitem__()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a00d9ba01470fe063a7e6fcc906230334',1,'tetragono.sampling_lattice.lattice.SamplingLattice.__setitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLatticeEnvironment.html#a2df4906665e07f886349903daf2a0542',1,'tetragono.simple_update_lattice.SimpleUpdateLatticeEnvironment.__setitem__()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a58be3056ed6a8ba64747d20c476f3927',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.__setitem__()']]] +]; diff --git a/search/functions_1.html b/search/functions_1.html new file mode 100644 index 000000000..ef4088b89 --- /dev/null +++ b/search/functions_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_1.js b/search/functions_1.js new file mode 100644 index 000000000..bb2cad2fa --- /dev/null +++ b/search/functions_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['acquire_5fdata_5fownership_335',['acquire_data_ownership',['../classTAT_1_1Tensor.html#a524e78cb0007af1862eecb796fab2039',1,'TAT::Tensor']]], + ['add_336',['add',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#a59bd03a95abc855ce8b31ee7d0a34231',1,'tetragono::sampling_lattice::lattice::ConfigurationPool']]], + ['add_5fenergy_337',['add_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#acfe813b4b57515c2edda7aeb2d818cd1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['add_5fobserver_338',['add_observer',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ac190aeb1a169ca230412f5955cb550ea',1,'tetragono::sampling_lattice::observer::Observer']]], + ['apply_5fgradient_339',['apply_gradient',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#ac33e5b348b8fbc04d9ca8e10bcaf19a5',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]] +]; diff --git a/search/functions_10.html b/search/functions_10.html new file mode 100644 index 000000000..1bdc12572 --- /dev/null +++ b/search/functions_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_10.js b/search/functions_10.js new file mode 100644 index 000000000..e53550718 --- /dev/null +++ b/search/functions_10.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['same_5fshape_413',['same_shape',['../classTAT_1_1Tensor.html#a08a76703eeeb86723b091d46103ace7c',1,'TAT::Tensor']]], + ['seed_414',['seed',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a8ae3452f9a0d2524927a228682ca125a',1,'tetragono::shell::TetragonoCommandApp']]], + ['set_5f_415',['set_',['../classTAT_1_1Tensor.html#a6cd159e8adeb70bae24ccf880969ef1b',1,'TAT::Tensor']]], + ['set_5fclassical_5fenergy_416',['set_classical_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a7ffaebc98e02b2ffb23ecf1db00e496e',1,'tetragono::sampling_lattice::observer::Observer']]], + ['shape_417',['shape',['../classTAT_1_1Tensor.html#a683101e09360c10b21dbef560e487972',1,'TAT::Tensor']]], + ['shrink_418',['shrink',['../classTAT_1_1Tensor.html#aa4395331cdff9dc9c15a9951ca6d8f92',1,'TAT::Tensor']]], + ['site_5fnumber_419',['site_number',['../classtetragono_1_1abstract__state_1_1AbstractState.html#ab3c4714de4db51d56490cee41b340e3e',1,'tetragono::abstract_state::AbstractState']]], + ['site_5fvalid_420',['site_valid',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#afca7bcd2612c863cc94110bf42189605',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['sites_421',['sites',['../classtetragono_1_1abstract__state_1_1AbstractState.html#aca5265b10f079ee2edfb21db662e121f',1,'tetragono::abstract_state::AbstractState']]], + ['split_5fedge_422',['split_edge',['../classTAT_1_1Tensor.html#a6d054dd1ae3acfcdb5b0a7def94bcaf4',1,'TAT::Tensor']]], + ['stability_423',['stability',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98317e982660eb498f2d0073d067eb71',1,'tetragono::sampling_lattice::observer::Observer']]], + ['su_5fcreate_424',['su_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a63c29980fe5e1a92fcd473d068c06e46',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fdump_425',['su_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a56e950281f1c26599912f2dc77e428a5',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fenergy_426',['su_energy',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa072452f5469a8600a27154e3e5b25ab',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fload_427',['su_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a71331c4009f3711ac27fc69f022f3aae',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fto_5fex_428',['su_to_ex',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ad12a9b392e57e977ff871f4ba3742eee',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fto_5fgm_429',['su_to_gm',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a664e6207504d9f2c1101b8bc1794c18b',1,'tetragono::shell::TetragonoCommandApp']]], + ['su_5fupdate_430',['su_update',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a190270fabf8c99610c6c43970ec5ca5e',1,'tetragono::shell::TetragonoCommandApp']]], + ['svd_431',['svd',['../classTAT_1_1Tensor.html#a276a47e3b157dd1d62d07218acab669b',1,'TAT::Tensor']]], + ['symmetry_432',['Symmetry',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a2a054b0b40d58a71ac7ed39d9da2d032',1,'tetragono::abstract_state::AbstractState']]] +]; diff --git a/search/functions_11.html b/search/functions_11.html new file mode 100644 index 000000000..188076ef2 --- /dev/null +++ b/search/functions_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_11.js b/search/functions_11.js new file mode 100644 index 000000000..ea091ee50 --- /dev/null +++ b/search/functions_11.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['tensor_433',['Tensor',['../classTAT_1_1Tensor.html#acabf96991d54768b5b5c44665bb54e56',1,'TAT::Tensor::Tensor(std::vector< Name > input_names, std::vector< Edge< Symmetry >> input_edges)'],['../classTAT_1_1Tensor.html#affe6d2033032b8bf34ca5e80bb984b92',1,'TAT::Tensor::Tensor(scalar_t number, std::vector< Name > input_names={}, const std::vector< symmetry_t > &edge_symmetry={}, const std::vector< Arrow > &edge_arrow={})']]], + ['to_434',['to',['../classTAT_1_1Tensor.html#ab102bd3898b58fff24b10ed07f3221e6',1,'TAT::Tensor']]], + ['to_5fconst_5fintegral_435',['to_const_integral',['../namespaceTAT.html#a310b619f23bfbff05a8bb9f0fe28b198',1,'TAT']]], + ['total_5fenergy_436',['total_energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#aa65c05ddf03ffc9f539d6ba58aa3288d',1,'tetragono::sampling_lattice::observer::Observer']]], + ['total_5fsymmetry_437',['total_symmetry',['../classtetragono_1_1abstract__state_1_1AbstractState.html#adc1580b7934e23f31263162e9d7f23da',1,'tetragono.abstract_state.AbstractState.total_symmetry(self)'],['../classtetragono_1_1abstract__state_1_1AbstractState.html#af462d02d8833dd5e10ca87babeefb84c',1,'tetragono.abstract_state.AbstractState.total_symmetry(self, value)']]], + ['trace_438',['trace',['../classTAT_1_1Tensor.html#acb6ab0cdbad2209b90ead845d7a02290',1,'TAT::Tensor']]], + ['transform_5f_439',['transform_',['../classTAT_1_1Tensor.html#ae59e57302105c9f01913c5d192cd4b8a',1,'TAT::Tensor']]], + ['transpose_440',['transpose',['../classTAT_1_1Tensor.html#a31a18b6c3d6ff8c667dbde1338388163',1,'TAT::Tensor']]] +]; diff --git a/search/functions_12.html b/search/functions_12.html new file mode 100644 index 000000000..eb29d8f9a --- /dev/null +++ b/search/functions_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_12.js b/search/functions_12.js new file mode 100644 index 000000000..dba7448b2 --- /dev/null +++ b/search/functions_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['update_441',['update',['../classtetragono_1_1exact__state_1_1ExactState.html#a8d6029895d29dad6c97cf18bcfe28eba',1,'tetragono.exact_state.ExactState.update()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af167a2a89fb12d8e127a9d44ecc20cfe',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.update()']]] +]; diff --git a/search/functions_13.html b/search/functions_13.html new file mode 100644 index 000000000..3da2ea69c --- /dev/null +++ b/search/functions_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_13.js b/search/functions_13.js new file mode 100644 index 000000000..5dc1ced9d --- /dev/null +++ b/search/functions_13.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['valid_442',['valid',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad0499922274724e33eaa3cb021cb526b',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['virtual_5fbond_443',['virtual_bond',['../classtetragono_1_1abstract__lattice_1_1AbstractLattice.html#a409bd1d032f034066db21b15cbabc551',1,'tetragono::abstract_lattice::AbstractLattice']]] +]; diff --git a/search/functions_14.html b/search/functions_14.html new file mode 100644 index 000000000..29237b44c --- /dev/null +++ b/search/functions_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_14.js b/search/functions_14.js new file mode 100644 index 000000000..3f065af0b --- /dev/null +++ b/search/functions_14.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['warning_444',['warning',['../common__variable_8hpp.html#a7e782f1f68a68861d1e3c7b325e6729e',1,'TAT::detail']]], + ['whole_5fresult_445',['whole_result',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a465775ad0ac85da1f9f2763efc46b64a',1,'tetragono::sampling_lattice::observer::Observer']]], + ['wss_446',['wss',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1ConfigurationPool.html#af6fa0081907c8f9434d601399a931f1f',1,'tetragono::sampling_lattice::lattice::ConfigurationPool']]] +]; diff --git a/search/functions_15.html b/search/functions_15.html new file mode 100644 index 000000000..6d5decd70 --- /dev/null +++ b/search/functions_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_15.js b/search/functions_15.js new file mode 100644 index 000000000..df3bc58c6 --- /dev/null +++ b/search/functions_15.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero_5f_447',['zero_',['../classTAT_1_1Tensor.html#ac33a91d33b50b4159ed21152ebf1feee',1,'TAT::Tensor']]] +]; diff --git a/search/functions_2.html b/search/functions_2.html new file mode 100644 index 000000000..ca5aa10e6 --- /dev/null +++ b/search/functions_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_2.js b/search/functions_2.js new file mode 100644 index 000000000..908a369b6 --- /dev/null +++ b/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bcast_5flattice_340',['bcast_lattice',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a3a96db0e6faf64e53a49a446cb7d8caa',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]] +]; diff --git a/search/functions_3.html b/search/functions_3.html new file mode 100644 index 000000000..d79f55b8e --- /dev/null +++ b/search/functions_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_3.js b/search/functions_3.js new file mode 100644 index 000000000..c361037b9 --- /dev/null +++ b/search/functions_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['cache_5fconfiguration_341',['cache_configuration',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a98730f2a5c3b5066f2b54dc16d7dd872',1,'tetragono::sampling_lattice::observer::Observer']]], + ['cache_5fnatural_5fdelta_342',['cache_natural_delta',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae0d799fc50d80607d42d4d4eb8713142',1,'tetragono::sampling_lattice::observer::Observer']]], + ['clear_5fbose_5fsymmetry_343',['clear_bose_symmetry',['../classTAT_1_1Tensor.html#a37905938d21c150eba14bf9e5cedda2e',1,'TAT::Tensor']]], + ['clear_5ffermi_5fsymmetry_344',['clear_fermi_symmetry',['../classTAT_1_1Tensor.html#a5952fd6d1c8829c66920173c6cf908f9',1,'TAT::Tensor']]], + ['clear_5fsymmetry_345',['clear_symmetry',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a104933f247c75322ca13abdd8bcff5be',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['conjugate_346',['conjugate',['../classTAT_1_1Tensor.html#a2f0a15a569566bda7e0fdf1d67297f99',1,'TAT::Tensor']]], + ['contract_347',['contract',['../classTAT_1_1Tensor.html#a033ac5c2f01b3e878ae9ff5415d4f80f',1,'TAT::Tensor']]], + ['copy_348',['copy',['../classTAT_1_1Tensor.html#a9d94cc5a258afdf3b256779df8a8bd9b',1,'TAT::Tensor::copy()'],['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aee7d3b2e7b98f0d2f4a4c29b4782f9be',1,'tetragono.sampling_lattice.lattice.Configuration.copy()']]] +]; diff --git a/search/functions_4.html b/search/functions_4.html new file mode 100644 index 000000000..1657cad0d --- /dev/null +++ b/search/functions_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_4.js b/search/functions_4.js new file mode 100644 index 000000000..ff3282fef --- /dev/null +++ b/search/functions_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['do_5feof_349',['do_EOF',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ab4e14ff6d40a3e2821f4c4473badc3c3',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fexit_350',['do_exit',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a21e15ef2581ed029c488442f4ffa20b3',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fquit_351',['do_quit',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aede8eff5c75a8fb8af49507ae511c7c2',1,'tetragono::shell::TetragonoCommandApp']]], + ['do_5fshell_352',['do_shell',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#abd664cd29ef614a3ce77b56a98bd9881',1,'tetragono::shell::TetragonoCommandApp']]] +]; diff --git a/search/functions_5.html b/search/functions_5.html new file mode 100644 index 000000000..9301d6b9c --- /dev/null +++ b/search/functions_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_5.js b/search/functions_5.js new file mode 100644 index 000000000..4226ecd0a --- /dev/null +++ b/search/functions_5.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['edge_353',['Edge',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a2ddd4b1e290bd238d667e763a113dbad',1,'tetragono::abstract_state::AbstractState']]], + ['edge_5foperator_354',['edge_operator',['../classTAT_1_1Tensor.html#a901355092a5934d891cf2d790a52928a',1,'TAT::Tensor']]], + ['edge_5frename_355',['edge_rename',['../classTAT_1_1Tensor.html#a2dd30f5a2a819d1394faee8593c5bc07',1,'TAT::Tensor']]], + ['edge_5fsegments_5ft_356',['edge_segments_t',['../classTAT_1_1edge__segments__t.html#aab6178d4988af5ee6d59824e98f4091a',1,'TAT::edge_segments_t::edge_segments_t(const symlist_t &symmetries)'],['../classTAT_1_1edge__segments__t.html#a27296e058ee16bb7cb1568a7dd59af08',1,'TAT::edge_segments_t::edge_segments_t(const Size dimension, const symmetry_t symmetry=symmetry_t())']]], + ['enable_5fgradient_357',['enable_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#abe57b26bcd77ec88d49c932d43d0373a',1,'tetragono::sampling_lattice::observer::Observer']]], + ['enable_5fnatural_5fgradient_358',['enable_natural_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a8fe04b9cfe8183116cfca513a89826a1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['energy_359',['energy',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a73fc4732537a2a0bd270d7a34b244be1',1,'tetragono::sampling_lattice::observer::Observer']]], + ['environment_360',['environment',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a2ad1f572debc5c79e4f966bf19065c0b',1,'tetragono::simple_update_lattice::SimpleUpdateLattice']]], + ['error_361',['error',['../common__variable_8hpp.html#a701eeade9e0991be1161d1d77fffa1c1',1,'TAT::detail']]], + ['ex_5fcreate_362',['ex_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a4fa90d0eac5f9194a12d2df43630c945',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fdump_363',['ex_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a67f243ed364067d68a675d1c1356ed05',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fenergy_364',['ex_energy',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#af0492b0632ff20ebb0f0fa11679fddc2',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fload_365',['ex_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#adf1fae5cd1f485dac94b92b90631d94b',1,'tetragono::shell::TetragonoCommandApp']]], + ['ex_5fupdate_366',['ex_update',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a7b761bc3792405bdb1ad219daec8f6d0',1,'tetragono::shell::TetragonoCommandApp']]], + ['expand_367',['expand',['../classTAT_1_1Tensor.html#abfe5e71bab16ac331796bede0e9cc3b7',1,'TAT::Tensor']]], + ['expand_5fdimension_368',['expand_dimension',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a90757cd7737645b3adb58587e7c6ef70',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['exponential_369',['exponential',['../classTAT_1_1Tensor.html#a359f958ae38a0fccf3b9ddb61e4fdf2e',1,'TAT::Tensor']]], + ['export_5fconfiguration_370',['export_configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4216dd65372792477e7771b38db3d09c',1,'tetragono::sampling_lattice::lattice::Configuration']]] +]; diff --git a/search/functions_6.html b/search/functions_6.html new file mode 100644 index 000000000..9c4f5fc65 --- /dev/null +++ b/search/functions_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_6.js b/search/functions_6.js new file mode 100644 index 000000000..eb1100e5b --- /dev/null +++ b/search/functions_6.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['gm_5fclear_5fsymmetry_371',['gm_clear_symmetry',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#af2e5f4bbe482127f38d58147e84d1906',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fcreate_372',['gm_conf_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1be9a2c1a86e7ce42ed6d73a42c393c2',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fdump_373',['gm_conf_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a3a9a286b8d416e5c06596351cd3060db',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5feq_374',['gm_conf_eq',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#adff7b4f6367215a1dcb70683ad99555c',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fload_375',['gm_conf_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a1bc6b273c2248cc5b7db2f71906fcb3d',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fconf_5fload_5fcompat_376',['gm_conf_load_compat',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ac0d7660885818916e0dff95f2a646eeb',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fcreate_377',['gm_create',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a08333a5ab973e3191f139b9aa5b808b9',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fdump_378',['gm_dump',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#ae6a0a3f322b0728804cdd80cd26baf07',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fexpand_379',['gm_expand',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a04a45748ad7f749aab863f10f2cce755',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fhamiltonian_380',['gm_hamiltonian',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#a314b331d0edbc4cc7de5af1fbfa12a38',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fload_381',['gm_load',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aa2883f8cbab52c84b0e66e9b18f02b11',1,'tetragono::shell::TetragonoCommandApp']]], + ['gm_5fto_5fex_382',['gm_to_ex',['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#aac2a4689442d01ff031c1802680c83af',1,'tetragono::shell::TetragonoCommandApp']]], + ['gradient_383',['gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ae1c6035db5cb0d57dc7eb1eefb390023',1,'tetragono::sampling_lattice::observer::Observer']]] +]; diff --git a/search/functions_7.html b/search/functions_7.html new file mode 100644 index 000000000..46b5c0f61 --- /dev/null +++ b/search/functions_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_7.js b/search/functions_7.js new file mode 100644 index 000000000..e7028979a --- /dev/null +++ b/search/functions_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['hamiltonians_384',['hamiltonians',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a07bb0672a9d404dcab63644695aa640f',1,'tetragono::abstract_state::AbstractState']]], + ['holes_385',['holes',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#affd58dbd77dea0af17f93809bfc7340b',1,'tetragono::sampling_lattice::lattice::Configuration']]] +]; diff --git a/search/functions_8.html b/search/functions_8.html new file mode 100644 index 000000000..31a1d9503 --- /dev/null +++ b/search/functions_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_8.js b/search/functions_8.js new file mode 100644 index 000000000..7d32905ed --- /dev/null +++ b/search/functions_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['identity_5f_386',['identity_',['../classTAT_1_1Tensor.html#a787430069374aa78d856c364774e550c',1,'TAT::Tensor']]], + ['import_5fconfiguration_387',['import_configuration',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a13c15f4941fa89fbbf5e7ad73982f60a',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['initialize_5fauxiliaries_388',['initialize_auxiliaries',['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#aec3094a2cf04cf9c439bc177c79c2184',1,'tetragono::simple_update_lattice::SimpleUpdateLattice']]] +]; diff --git a/search/functions_9.html b/search/functions_9.html new file mode 100644 index 000000000..9a8e4290c --- /dev/null +++ b/search/functions_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_9.js b/search/functions_9.js new file mode 100644 index 000000000..c3a22235d --- /dev/null +++ b/search/functions_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lattice_5fdot_389',['lattice_dot',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1SamplingLattice.html#a1b3fc2a54744b7b6c62da5ea2c0d80af',1,'tetragono::sampling_lattice::lattice::SamplingLattice']]], + ['log_390',['log',['../common__variable_8hpp.html#a74538be91c8fa85b6f8ac2b5ac884ce2',1,'TAT::detail']]] +]; diff --git a/search/functions_a.html b/search/functions_a.html new file mode 100644 index 000000000..5ecc152ca --- /dev/null +++ b/search/functions_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_a.js b/search/functions_a.js new file mode 100644 index 000000000..c44c7166f --- /dev/null +++ b/search/functions_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['map_391',['map',['../classTAT_1_1Tensor.html#a13e3ba161ed773635f263a9e7eec9866',1,'TAT::Tensor']]], + ['merge_5fedge_392',['merge_edge',['../classTAT_1_1Tensor.html#a4f889adcfeef434b4dfa522396eba618',1,'TAT::Tensor']]] +]; diff --git a/search/functions_b.html b/search/functions_b.html new file mode 100644 index 000000000..e301fedd7 --- /dev/null +++ b/search/functions_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_b.js b/search/functions_b.js new file mode 100644 index 000000000..ccb632768 --- /dev/null +++ b/search/functions_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['natural_5fgradient_5fby_5fconjugate_5fgradient_393',['natural_gradient_by_conjugate_gradient',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a4c4ba912bfe0764f84a91c2951da518e',1,'tetragono::sampling_lattice::observer::Observer']]], + ['natural_5fgradient_5fby_5fdirect_5fpseudo_5finverse_394',['natural_gradient_by_direct_pseudo_inverse',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a35dc33bd71e1297d5ae5c51164ac18b8',1,'tetragono::sampling_lattice::observer::Observer']]], + ['norm_395',['norm',['../classTAT_1_1Tensor.html#a3f4c8d7b41f7742fe2f4a68d8df3aecd',1,'TAT::Tensor']]], + ['normalize_5flattice_396',['normalize_lattice',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#a30ecbf1ca4f5757406228a89df6d4164',1,'tetragono::sampling_lattice::observer::Observer']]], + ['nothing_397',['nothing',['../common__variable_8hpp.html#afb968550316dbe2e1ebd9075c74928ad',1,'TAT::detail']]], + ['numpy_5fhamiltonian_398',['numpy_hamiltonian',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a996374358c3ac113376aed6da6e59f41',1,'tetragono.abstract_state.AbstractState.numpy_hamiltonian()'],['../classtetragono_1_1shell_1_1TetragonoCommandApp.html#abe5ab99a0716d879976773b8f1d1b513',1,'tetragono.shell.TetragonoCommandApp.numpy_hamiltonian()']]] +]; diff --git a/search/functions_c.html b/search/functions_c.html new file mode 100644 index 000000000..c4f326877 --- /dev/null +++ b/search/functions_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_c.js b/search/functions_c.js new file mode 100644 index 000000000..266b51b8e --- /dev/null +++ b/search/functions_c.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['observe_399',['observe',['../classtetragono_1_1exact__state_1_1ExactState.html#a54f90bd26eac86c6f8df78baf364bc09',1,'tetragono.exact_state.ExactState.observe()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#a702d1531cc8fde01ed583493c85dcb37',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.observe()']]], + ['observe_5fenergy_400',['observe_energy',['../classtetragono_1_1exact__state_1_1ExactState.html#a70856ea49a4d149b61be482f1973a813',1,'tetragono.exact_state.ExactState.observe_energy()'],['../classtetragono_1_1simple__update__lattice_1_1SimpleUpdateLattice.html#af1ed1b0b1919959f69127b544efb8e8b',1,'tetragono.simple_update_lattice.SimpleUpdateLattice.observe_energy()']]], + ['operator_20scalar_5ft_401',['operator scalar_t',['../classTAT_1_1Tensor.html#af11438e704287b62eed5afd041f1271b',1,'TAT::Tensor']]] +]; diff --git a/search/functions_d.html b/search/functions_d.html new file mode 100644 index 000000000..7a1ed065d --- /dev/null +++ b/search/functions_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_d.js b/search/functions_d.js new file mode 100644 index 000000000..29ebc649a --- /dev/null +++ b/search/functions_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['parity_402',['parity',['../structTAT_1_1Symmetry.html#a9c4f85b0a733aa13de6d74b6cb5312c5',1,'TAT::Symmetry']]], + ['physics_5fedges_403',['physics_edges',['../classtetragono_1_1abstract__state_1_1AbstractState.html#a7f9f81d4e7e7822fae97b04d4eda3849',1,'tetragono::abstract_state::AbstractState']]] +]; diff --git a/search/functions_e.html b/search/functions_e.html new file mode 100644 index 000000000..22d2a6bf5 --- /dev/null +++ b/search/functions_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_e.js b/search/functions_e.js new file mode 100644 index 000000000..48bec342f --- /dev/null +++ b/search/functions_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['qr_404',['qr',['../classTAT_1_1Tensor.html#a4a821f80cf5e33664f34e47f22f432c0',1,'TAT::Tensor']]] +]; diff --git a/search/functions_f.html b/search/functions_f.html new file mode 100644 index 000000000..54b7dee08 --- /dev/null +++ b/search/functions_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_f.js b/search/functions_f.js new file mode 100644 index 000000000..f18de39fa --- /dev/null +++ b/search/functions_f.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['range_5f_405',['range_',['../classTAT_1_1Tensor.html#a30e8ff8d5766a8886c6a3f3a4c42a858',1,'TAT::Tensor']]], + ['refresh_5fall_406',['refresh_all',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#a4adf53a7494cd2aab1862ae5e7445f89',1,'tetragono.sampling_lattice.lattice.Configuration.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1Sampling.html#aae10aa761a54fee2aed73bbf017f86e6',1,'tetragono.sampling_lattice.sampling.Sampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1SweepSampling.html#a61de64b6038599e05d9adedd0dddf009',1,'tetragono.sampling_lattice.sampling.SweepSampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1ErgodicSampling.html#a1f409d256befcd0b24b1dea6cac6bc9c',1,'tetragono.sampling_lattice.sampling.ErgodicSampling.refresh_all()'],['../classtetragono_1_1sampling__lattice_1_1sampling_1_1DirectSampling.html#a2a4b02a05c41ac9a060dff64df5a1dcb',1,'tetragono.sampling_lattice.sampling.DirectSampling.refresh_all()']]], + ['refresh_5fsite_407',['refresh_site',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#ad52508aa961509227955d5079c7b119f',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['replace_408',['replace',['../classtetragono_1_1sampling__lattice_1_1lattice_1_1Configuration.html#aa10dcad28ece36a404b112c5a27db0aa',1,'tetragono::sampling_lattice::lattice::Configuration']]], + ['reset_409',['reset',['../classlazy_1_1Node.html#a9bad86b4aca22463f6642a0c11072c69',1,'lazy::Node']]], + ['restrict_5fsubspace_410',['restrict_subspace',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#ab5c5927e64f676a853288152d56844fc',1,'tetragono::sampling_lattice::observer::Observer']]], + ['result_411',['result',['../classtetragono_1_1sampling__lattice_1_1observer_1_1Observer.html#af5d570413871fd6c1036eee5bbd7be71',1,'tetragono::sampling_lattice::observer::Observer']]], + ['reverse_5fedge_412',['reverse_edge',['../classTAT_1_1Tensor.html#a9c2178813a02d94c2525f7f480d4b1e9',1,'TAT::Tensor']]] +]; diff --git a/search/mag_sel.svg b/search/mag_sel.svg new file mode 100644 index 000000000..03626f64a --- /dev/null +++ b/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/search/namespaces_0.html b/search/namespaces_0.html new file mode 100644 index 000000000..21db2c3a5 --- /dev/null +++ b/search/namespaces_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/namespaces_0.js b/search/namespaces_0.js new file mode 100644 index 000000000..33b863584 --- /dev/null +++ b/search/namespaces_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tat_298',['TAT',['../namespaceTAT.html',1,'']]] +]; diff --git a/search/nomatches.html b/search/nomatches.html new file mode 100644 index 000000000..2b9360b6b --- /dev/null +++ b/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/search/search.css b/search/search.css new file mode 100644 index 000000000..9074198f8 --- /dev/null +++ b/search/search.css @@ -0,0 +1,257 @@ +/*---------------- Search Box */ + +#MSearchBox { + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + height: 1.4em; + padding: 0 0 0 0.3em; + margin: 0; +} + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 1.1em; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial, Verdana, sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial, Verdana, sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/search/search.js b/search/search.js new file mode 100644 index 000000000..fb226f734 --- /dev/null +++ b/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline-block'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e(R!W8j_r#qQ#gnr4kAxdU#F0+OBry$Z+ z_0PMi;P|#{d%mw(dnw=jM%@$onTJa%@6Nm3`;2S#nwtVFJI#`U@2Q@@JCCctagvF- z8H=anvo~dTmJ2YA%wA6IHRv%{vxvUm|R)kgZeo zmX%Zb;mpflGZdXCTAgit`||AFzkI#z&(3d4(htA?U2FOL4WF6wY&TB#n3n*I4+hl| z*NBpo#FA92vEu822WQ%mvv4FO#qs` BFGc_W literal 0 HcmV?d00001 diff --git a/search/search_r.png b/search/search_r.png new file mode 100644 index 0000000000000000000000000000000000000000..1af5d21ee13e070d7600f1c4657fde843b953a69 GIT binary patch literal 553 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9c!2%@BXHTsJQY`6?zK#qG8~eHcB(ehe3dtTp zz6=bxGZ+|(`xqD=STHa&U1eaXVrO7DwS|Gf*oA>XrmV$GYcEhOQT(QLuS{~ooZ2P@v=Xc@RKW@Irliv8_;wroU0*)0O?temdsA~70jrdux+`@W7 z-N(<(C)L?hOO?KV{>8(jC{hpKsws)#Fh zvsO>IB+gb@b+rGWaO&!a9Z{!U+fV*s7TS>fdt&j$L%^U@Epd$~Nl7e8wMs5Z1yT$~ z28I^8hDN#u<{^fLRz?<9hUVG^237_Jy7tbuQ8eV{r(~v8;?@w8^gA7>fx*+&&t;uc GLK6VEQpiUD literal 0 HcmV?d00001 diff --git a/search/searchdata.js b/search/searchdata.js new file mode 100644 index 000000000..399f6ed3d --- /dev/null +++ b/search/searchdata.js @@ -0,0 +1,33 @@ +var indexSectionsWithContent = +{ + 0: "_abcdefghilmnopqrstuvwz", + 1: "acdefhimnoqrstu", + 2: "t", + 3: "aceimnqst", + 4: "_abcdeghilmnopqrstuvwz", + 5: "div", + 6: "aenrsuvz" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "namespaces", + 3: "files", + 4: "functions", + 5: "variables", + 6: "typedefs" +}; + +var indexSectionLabels = +{ + 0: "All", + 1: "Classes", + 2: "Namespaces", + 3: "Files", + 4: "Functions", + 5: "Variables", + 6: "Typedefs" +}; + diff --git a/search/typedefs_0.html b/search/typedefs_0.html new file mode 100644 index 000000000..a4684c4ad --- /dev/null +++ b/search/typedefs_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_0.js b/search/typedefs_0.js new file mode 100644 index 000000000..6abc8d774 --- /dev/null +++ b/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['arrow_453',['Arrow',['../namespaceTAT.html#a78326bee7cc963cd2d165718de5c0465',1,'TAT']]] +]; diff --git a/search/typedefs_1.html b/search/typedefs_1.html new file mode 100644 index 000000000..46cf01e62 --- /dev/null +++ b/search/typedefs_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_1.js b/search/typedefs_1.js new file mode 100644 index 000000000..b96862882 --- /dev/null +++ b/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['edgepointer_454',['EdgePointer',['../namespaceTAT.html#ae21b38ad84427829832b86083f28b8cc',1,'TAT']]] +]; diff --git a/search/typedefs_2.html b/search/typedefs_2.html new file mode 100644 index 000000000..6835ee65b --- /dev/null +++ b/search/typedefs_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_2.js b/search/typedefs_2.js new file mode 100644 index 000000000..f814f11ed --- /dev/null +++ b/search/typedefs_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['nums_455',['Nums',['../namespaceTAT.html#a713d18eb8b9832d7eefc21eb22df52c4',1,'TAT']]] +]; diff --git a/search/typedefs_3.html b/search/typedefs_3.html new file mode 100644 index 000000000..017004765 --- /dev/null +++ b/search/typedefs_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_3.js b/search/typedefs_3.js new file mode 100644 index 000000000..0a3ca1c40 --- /dev/null +++ b/search/typedefs_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['rank_456',['Rank',['../namespaceTAT.html#a59fa5a93972a6b9079e60c4b8c237eeb',1,'TAT']]], + ['real_5fscalar_457',['real_scalar',['../namespaceTAT.html#ac116f771206a618203057bffa8074f5c',1,'TAT']]] +]; diff --git a/search/typedefs_4.html b/search/typedefs_4.html new file mode 100644 index 000000000..81466a5d2 --- /dev/null +++ b/search/typedefs_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_4.js b/search/typedefs_4.js new file mode 100644 index 000000000..187e4bec9 --- /dev/null +++ b/search/typedefs_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['size_458',['Size',['../namespaceTAT.html#a165aa7ea040b184dc85762582d2b5a9c',1,'TAT']]] +]; diff --git a/search/typedefs_5.html b/search/typedefs_5.html new file mode 100644 index 000000000..43fbec1fe --- /dev/null +++ b/search/typedefs_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_5.js b/search/typedefs_5.js new file mode 100644 index 000000000..1a6c62239 --- /dev/null +++ b/search/typedefs_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['u1_459',['U1',['../namespaceTAT.html#acaff1ad08de8cf21a6ad0d08d9f8f07a',1,'TAT']]] +]; diff --git a/search/typedefs_6.html b/search/typedefs_6.html new file mode 100644 index 000000000..99479c2d5 --- /dev/null +++ b/search/typedefs_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_6.js b/search/typedefs_6.js new file mode 100644 index 000000000..b8e0a35a7 --- /dev/null +++ b/search/typedefs_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vector_460',['vector',['../allocator_8hpp.html#a156f923af61f5648f2bc1852e50d7852',1,'TAT::no_initialize::pmr']]] +]; diff --git a/search/typedefs_7.html b/search/typedefs_7.html new file mode 100644 index 000000000..9a825e0a2 --- /dev/null +++ b/search/typedefs_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_7.js b/search/typedefs_7.js new file mode 100644 index 000000000..a25ce33cc --- /dev/null +++ b/search/typedefs_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['z2_461',['Z2',['../namespaceTAT.html#a9f0315e334e454cc7330c18d2cbd677b',1,'TAT']]] +]; diff --git a/search/variables_0.html b/search/variables_0.html new file mode 100644 index 000000000..1e477c08c --- /dev/null +++ b/search/variables_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_0.js b/search/variables_0.js new file mode 100644 index 000000000..87ac9c7fd --- /dev/null +++ b/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['debug_5fmode_448',['debug_mode',['../namespaceTAT.html#a6d44e6f53051ef6947a1906a0d5e7a2f',1,'TAT']]] +]; diff --git a/search/variables_1.html b/search/variables_1.html new file mode 100644 index 000000000..ea73d9a49 --- /dev/null +++ b/search/variables_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_1.js b/search/variables_1.js new file mode 100644 index 000000000..aa70c482e --- /dev/null +++ b/search/variables_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['information_449',['information',['../namespaceTAT.html#a4bd3f61e9cfc98419950be0791e15e1d',1,'TAT']]], + ['is_5fname_450',['is_name',['../namespaceTAT.html#abe997f7e8402883a5e89b0cbf3f60af2',1,'TAT']]], + ['is_5fsymmetry_451',['is_symmetry',['../namespaceTAT.html#aebd8b134e9b359acd653ad1aab1a37e1',1,'TAT']]] +]; diff --git a/search/variables_2.html b/search/variables_2.html new file mode 100644 index 000000000..0580462e9 --- /dev/null +++ b/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_2.js b/search/variables_2.js new file mode 100644 index 000000000..f59f5143a --- /dev/null +++ b/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['version_452',['version',['../namespaceTAT.html#a8c4989bfe390f6c51321f9353b638e23',1,'TAT']]] +]; diff --git a/shared__ptr_8hpp.html b/shared__ptr_8hpp.html new file mode 100644 index 000000000..468476aa1 --- /dev/null +++ b/shared__ptr_8hpp.html @@ -0,0 +1,121 @@ + + + + + + + +TAT: include/TAT/utility/shared_ptr.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    shared_ptr.hpp File Reference
    +
    +
    + +

    Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <memory>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    +

    Detailed Description

    +

    Copyright (C) 2021-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/shared__ptr_8hpp.js b/shared__ptr_8hpp.js new file mode 100644 index 000000000..2ce2fd5a8 --- /dev/null +++ b/shared__ptr_8hpp.js @@ -0,0 +1,4 @@ +var shared__ptr_8hpp = +[ + [ "TAT_SHARED_PTR_HPP", "shared__ptr_8hpp.html#a9020b22cf614027e14a8751a388f82e8", null ] +]; \ No newline at end of file diff --git a/shared__ptr_8hpp_source.html b/shared__ptr_8hpp_source.html new file mode 100644 index 000000000..001e73b0c --- /dev/null +++ b/shared__ptr_8hpp_source.html @@ -0,0 +1,212 @@ + + + + + + + +TAT: include/TAT/utility/shared_ptr.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    shared_ptr.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SHARED_PTR_HPP
    +
    22 #define TAT_SHARED_PTR_HPP
    +
    23 
    +
    24 #include <memory>
    +
    25 
    +
    26 namespace TAT {
    +
    27  namespace detail {
    +
    28  template<typename T>
    +
    29  struct shared_ptr_helper {
    +
    30  T m_object;
    +
    31  long m_count;
    +
    32  template<typename... Args>
    +
    33  shared_ptr_helper(Args&&... args) : m_object(std::forward<Args>(args)...), m_count(1) { }
    +
    34  };
    +
    35 
    +
    41  template<typename T>
    +
    42  struct shared_ptr {
    +
    43  shared_ptr_helper<T>* m_pointer;
    +
    44 
    +
    45  // see https://zh.cppreference.com/w/cpp/memory/shared_ptr
    +
    46 
    +
    47  // (1)
    +
    48  // modified by myself
    +
    49  shared_ptr(shared_ptr_helper<T>* pointer = nullptr) : m_pointer(pointer) { }
    +
    50  // (2)
    +
    51  // deleted by myself
    +
    52  // shared_ptr(std::nullptr_t) : m_pointer(nullptr) {}
    +
    53  // (3-7) without polymorphism, deleter and allocator
    +
    54  // deleted by myself
    +
    55  // shared_ptr(T* ptr) : m_pointer(ptr ? new shared_ptr_helper<T>{ptr, 1} : nullptr) {}
    +
    56  // (8) no such constructor
    +
    57  // (9) without polymorphism
    +
    58  shared_ptr(const shared_ptr<T>& other) : m_pointer(other.m_pointer) {
    +
    59  if (m_pointer) {
    +
    60  m_pointer->m_count++;
    +
    61  }
    +
    62  }
    +
    63  // (10) without polymorphism
    +
    64  shared_ptr(shared_ptr<T>&& other) : m_pointer(other.m_pointer) {
    +
    65  other.m_pointer = nullptr;
    +
    66  }
    +
    67  // (11-13) no such constructor
    +
    68 
    +
    69  ~shared_ptr() {
    +
    70  if (m_pointer) {
    +
    71  m_pointer->m_count--;
    +
    72  if (m_pointer->m_count == 0) {
    +
    73  // delete m_pointer->m_object;
    +
    74  delete m_pointer;
    +
    75  }
    +
    76  }
    +
    77  }
    +
    78 
    +
    79  // (1)
    +
    80  shared_ptr<T>& operator=(const shared_ptr<T>& other) {
    +
    81  this->~shared_ptr();
    +
    82  new (this) shared_ptr<T>(other);
    +
    83  return *this;
    +
    84  }
    +
    85  // (2)
    +
    86  shared_ptr<T>& operator=(shared_ptr<T>&& other) {
    +
    87  if (this != &other) {
    +
    88  this->~shared_ptr();
    +
    89  new (this) shared_ptr<T>(std::move(other));
    +
    90  }
    +
    91  return *this;
    +
    92  }
    +
    93  // (3-4) no such operator=
    +
    94 
    +
    95  // reset, swap I do not use it
    +
    96 
    +
    97  const T* get() const {
    +
    98  return &(m_pointer->m_object);
    +
    99  }
    +
    100  T* get() {
    +
    101  return &(m_pointer->m_object);
    +
    102  }
    +
    103  const T& operator*() const {
    +
    104  return *get();
    +
    105  }
    +
    106  T& operator*() {
    +
    107  return *get();
    +
    108  }
    +
    109  const T* operator->() const {
    +
    110  return get();
    +
    111  }
    +
    112  T* operator->() {
    +
    113  return get();
    +
    114  }
    +
    115 
    +
    116  long use_count() const {
    +
    117  if (m_pointer) {
    +
    118  return m_pointer->m_count;
    +
    119  } else {
    +
    120  return 0;
    +
    121  }
    +
    122  }
    +
    123 
    +
    124  template<typename... Args>
    +
    125  static shared_ptr<T> make(Args&&... args) {
    +
    126  // T* object = new T(std::forward<Args>(args)...);
    +
    127  // return shared_ptr<T>(object);
    +
    128  auto pointer = new shared_ptr_helper<T>(std::forward<Args>(args)...);
    +
    129  return shared_ptr<T>(pointer);
    +
    130  }
    +
    131  };
    +
    132  } // namespace detail
    +
    133 } // namespace TAT
    +
    134 #endif
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    +
    + + + + diff --git a/shrink__and__expand_8hpp.html b/shrink__and__expand_8hpp.html new file mode 100644 index 000000000..01f09162d --- /dev/null +++ b/shrink__and__expand_8hpp.html @@ -0,0 +1,132 @@ + + + + + + + +TAT: include/TAT/implement/shrink_and_expand.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    shrink_and_expand.hpp File Reference
    +
    +
    + +

    Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + +

    +Variables

    +timer TAT::expand_guard ("expand")
     
    +timer TAT::shrink_guard ("shrink")
     
    +

    Detailed Description

    +

    Copyright (C) 2020-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/shrink__and__expand_8hpp.js b/shrink__and__expand_8hpp.js new file mode 100644 index 000000000..d33f391e0 --- /dev/null +++ b/shrink__and__expand_8hpp.js @@ -0,0 +1,6 @@ +var shrink__and__expand_8hpp = +[ + [ "TAT_SHRINK_AND_EXPAND_HPP", "shrink__and__expand_8hpp.html#a105b39b5c4a8d279536a8b4de5624d76", null ], + [ "expand_guard", "shrink__and__expand_8hpp.html#a976ff40ebd1f82de3e181ffaec939fb6", null ], + [ "shrink_guard", "shrink__and__expand_8hpp.html#a427acc06f47984c8afe06d006e815c69", null ] +]; \ No newline at end of file diff --git a/shrink__and__expand_8hpp_source.html b/shrink__and__expand_8hpp_source.html new file mode 100644 index 000000000..eb76b3cc0 --- /dev/null +++ b/shrink__and__expand_8hpp_source.html @@ -0,0 +1,243 @@ + + + + + + + +TAT: include/TAT/implement/shrink_and_expand.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    shrink_and_expand.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SHRINK_AND_EXPAND_HPP
    +
    22 #define TAT_SHRINK_AND_EXPAND_HPP
    +
    23 
    +
    24 #include "../structure/tensor.hpp"
    +
    25 #include "../utility/timer.hpp"
    +
    26 
    +
    27 namespace TAT {
    +
    28  inline timer expand_guard("expand");
    +
    29 
    +
    30  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    32  const std::unordered_map<Name, std::pair<Size, Edge<Symmetry>>>& configure,
    +
    33  const Name& old_name
    +
    34  ) const {
    +
    35  auto pmr_guard = scope_resource(default_buffer_size);
    +
    36  auto timer_guard = expand_guard();
    +
    37  constexpr bool is_no_symmetry = Symmetry::length == 0;
    +
    38  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
    +
    39  if constexpr (is_fermi) {
    +
    40  detail::warning("expand edge of fermi tensor is dangerous, please contract helper tensor manually");
    +
    41  }
    +
    42 
    +
    43  // generator helper tensor names and edges
    +
    44  auto new_names = std::vector<Name>();
    +
    45  auto new_edges = std::vector<Edge<Symmetry>>();
    +
    46  auto reserve_size = configure.size() + 1;
    +
    47  new_names.reserve(reserve_size);
    +
    48  new_edges.reserve(reserve_size);
    +
    49 
    +
    50  auto points = pmr::unordered_map<Name, std::pair<Symmetry, Size>>(unordered_parameter * configure.size());
    +
    51  auto total_symmetry = Symmetry();
    +
    52  auto contract_pairs = std::unordered_set<std::pair<Name, Name>>(unordered_parameter * configure.size());
    +
    53 
    +
    54  for (const auto& [name, information] : configure) {
    +
    55  const auto& [index, edge] = information;
    +
    56  const auto& point = edge.point_by_index(index);
    +
    57  auto symmetry = point.first;
    +
    58 
    +
    59  new_names.push_back(name);
    +
    60  new_edges.push_back(edge);
    +
    61  points[name] = point;
    +
    62  total_symmetry += symmetry;
    +
    63  }
    +
    64  if (old_name != InternalName<Name>::No_Old_Name) {
    +
    65  const auto& old_edge = edges(old_name);
    +
    66  if constexpr (debug_mode) {
    +
    67  if (old_edge.total_dimension() != 1) {
    +
    68  detail::error("Cannot Expand a Edge which dimension is not one");
    +
    69  }
    +
    70  }
    +
    71 
    +
    72  new_names.push_back(InternalName<Name>::No_Old_Name);
    +
    73  new_edges.push_back({{{-total_symmetry, 1}}, !old_edge.arrow()});
    +
    74  points[InternalName<Name>::No_Old_Name] = std::pair<Symmetry, Size>{-total_symmetry, 0};
    +
    75  contract_pairs.insert({old_name, InternalName<Name>::No_Old_Name});
    +
    76  } else {
    +
    77  if constexpr (debug_mode) {
    +
    78  if constexpr (!is_no_symmetry) {
    +
    79  if (total_symmetry != Symmetry()) {
    +
    80  detail::error("Cannot Expand to such Edges whose total Symmetry is not zero");
    +
    81  }
    +
    82  }
    +
    83  }
    +
    84  }
    +
    85  auto helper = Tensor<ScalarType, Symmetry, Name>(std::move(new_names), std::move(new_edges)).zero_();
    +
    86  helper.at(points) = 1;
    +
    87  return contract(helper, contract_pairs);
    +
    88  }
    +
    89 
    +
    90  inline timer shrink_guard("shrink");
    +
    91 
    +
    92  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    94  Tensor<ScalarType, Symmetry, Name>::shrink(const std::unordered_map<Name, Size>& configure, const Name& new_name, Arrow arrow) const {
    +
    95  auto pmr_guard = scope_resource(default_buffer_size);
    +
    96  auto timer_guard = shrink_guard();
    +
    97  constexpr bool is_no_symmetry = Symmetry::length == 0;
    +
    98  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
    +
    99  if constexpr (is_fermi) {
    +
    100  detail::warning("shrink edge of fermi tensor is dangerous, please contract helper tensor manually");
    +
    101  }
    +
    102 
    +
    103  auto new_names = std::vector<Name>();
    +
    104  auto new_edges = std::vector<Edge<Symmetry>>();
    +
    105  auto reserve_size = configure.size() + 1;
    +
    106  new_names.reserve(reserve_size);
    +
    107  new_edges.reserve(reserve_size);
    +
    108 
    +
    109  auto points = pmr::unordered_map<Name, std::pair<Symmetry, Size>>(unordered_parameter * configure.size());
    +
    110  auto total_symmetry = Symmetry();
    +
    111  auto contract_pairs = std::unordered_set<std::pair<Name, Name>>(unordered_parameter * configure.size());
    +
    112 
    +
    113  for (auto i = 0; i < rank(); i++) {
    +
    114  const auto& name = names(i);
    +
    115  if (auto found = configure.find(name); found != configure.end()) {
    +
    116  // shrinking
    +
    117  const auto& edge = edges(i);
    +
    118  const auto& index = found->second;
    +
    119  auto point = edge.point_by_index(index);
    +
    120  auto symmetry = point.first;
    +
    121 
    +
    122  new_names.push_back(name);
    +
    123  new_edges.push_back(edge.conjugate());
    +
    124  points[name] = point;
    +
    125  total_symmetry += symmetry;
    +
    126  contract_pairs.insert({name, name});
    +
    127  }
    +
    128  }
    +
    129  if (new_name != InternalName<Name>::No_New_Name) {
    +
    130  new_names.push_back(new_name);
    +
    131  new_edges.push_back({{{total_symmetry, 1}}, arrow});
    +
    132  points[new_name] = std::pair<Symmetry, Size>{total_symmetry, 0};
    +
    133  } else {
    +
    134  if constexpr (debug_mode) {
    +
    135  if constexpr (!is_no_symmetry) {
    +
    136  if (total_symmetry != Symmetry()) {
    +
    137  detail::error("Need to Create a New Edge but Name not set in Slice");
    +
    138  }
    +
    139  }
    +
    140  }
    +
    141  }
    +
    142  auto helper = Tensor<ScalarType, Symmetry, Name>(std::move(new_names), std::move(new_edges)).zero_();
    +
    143  helper.at(points) = 1;
    +
    144  return contract(helper, contract_pairs);
    +
    145  }
    +
    146 } // namespace TAT
    +
    147 #endif
    +
    The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like li...
    Definition: edge.hpp:252
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    Tensor< ScalarType, Symmetry, Name > shrink(const std::unordered_map< Name, Size > &configure, const Name &new_name=InternalName< Name >::No_New_Name, Arrow arrow=false) const
    Shrink several edge of a tensor to a one dimensional edge.
    Definition: shrink_and_expand.hpp:94
    +
    Tensor< ScalarType, Symmetry, Name > expand(const std::unordered_map< Name, std::pair< Size, Edge< Symmetry >>> &configure, const Name &old_name=InternalName< Name >::No_Old_Name) const
    Expand a one dimensional edge of a tensor to several wider edge.
    Definition: shrink_and_expand.hpp:31
    +
    Tensor< ScalarType, Symmetry, Name > & zero_() &
    Set all the value of the tensor to zero.
    Definition: tensor.hpp:566
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    const char * information
    TAT informations about compiler and license.
    Definition: common_variable.hpp:61
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    bool Arrow
    Fermi arrow type.
    Definition: common_variable.hpp:166
    +
    For every Name type, some internal name is needed.
    Definition: name.hpp:112
    +
    General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
    Definition: symmetry.hpp:95
    +
    Definition: allocator.hpp:295
    +
    Definition: timer.hpp:124
    +
    +
    + + + + diff --git a/split__and__merge_8hpp.html b/split__and__merge_8hpp.html new file mode 100644 index 000000000..d3c927df9 --- /dev/null +++ b/split__and__merge_8hpp.html @@ -0,0 +1,121 @@ + + + + + + + +TAT: include/TAT/implement/split_and_merge.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    split_and_merge.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/split__and__merge_8hpp.js b/split__and__merge_8hpp.js new file mode 100644 index 000000000..da368076f --- /dev/null +++ b/split__and__merge_8hpp.js @@ -0,0 +1,4 @@ +var split__and__merge_8hpp = +[ + [ "TAT_SPLIT_AND_MERGE_HPP", "split__and__merge_8hpp.html#a277d6f9ecc5fba731b3901cce1b9674a", null ] +]; \ No newline at end of file diff --git a/split__and__merge_8hpp_source.html b/split__and__merge_8hpp_source.html new file mode 100644 index 000000000..1f155640f --- /dev/null +++ b/split__and__merge_8hpp_source.html @@ -0,0 +1,207 @@ + + + + + + + +TAT: include/TAT/implement/split_and_merge.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    split_and_merge.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SPLIT_AND_MERGE_HPP
    +
    22 #define TAT_SPLIT_AND_MERGE_HPP
    +
    23 
    +
    24 #include "../structure/tensor.hpp"
    +
    25 
    +
    26 namespace TAT {
    +
    27  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    29  const std::unordered_map<Name, std::vector<std::pair<Name, edge_segments_t<Symmetry>>>>& split,
    +
    30  bool apply_parity,
    +
    31  const std::unordered_set<Name>& parity_exclude_names_split
    +
    32  ) const {
    +
    33  auto pmr_guard = scope_resource(default_buffer_size);
    +
    34  if constexpr (debug_mode) {
    +
    35  for (const auto& [old_name, new_names_edges] : split) {
    +
    36  if (auto found = find_by_name(old_name); found == names().end()) {
    +
    37  detail ::error("No such edge in split map");
    +
    38  }
    +
    39  }
    +
    40  }
    +
    41  // generate target_name
    +
    42  std::vector<Name> target_name;
    +
    43  target_name.reserve(rank()); // not enough but it is ok to reduce realloc time
    +
    44  for (const auto& name : names()) {
    +
    45  if (auto found = split.find(name); found != split.end()) {
    +
    46  for (const auto& [new_name, segments] : found->second) {
    +
    47  target_name.push_back(new_name);
    +
    48  }
    +
    49  } else {
    +
    50  target_name.push_back(name);
    +
    51  }
    +
    52  }
    +
    53  return edge_operator_implement(split, {}, {}, std::move(target_name), apply_parity, parity_exclude_names_split, {}, {}, {}, {});
    +
    54  }
    +
    55 
    +
    56  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    58  const std::unordered_map<Name, std::vector<Name>>& merge,
    +
    59  bool apply_parity,
    +
    60  const std::unordered_set<Name>& parity_exclude_names_merge,
    +
    61  const std::unordered_set<Name>& parity_exclude_names_reverse
    +
    62  ) const {
    +
    63  auto pmr_guard = scope_resource(default_buffer_size);
    +
    64  if constexpr (debug_mode) {
    +
    65  // check if the edge not exist in merge map
    +
    66  for (const auto& [new_name, old_names] : merge) {
    +
    67  for (const auto& old_name : old_names) {
    +
    68  if (auto found = find_by_name(old_name); found == names().end()) {
    +
    69  detail ::error("No such edge in merge map");
    +
    70  }
    +
    71  }
    +
    72  }
    +
    73  }
    +
    74  std::vector<Name> target_name;
    +
    75  target_name.reserve(rank());
    +
    76  for (auto index = rank(); index-- > 0;) {
    +
    77  const auto& name = names(index);
    +
    78  // find and it is last -> add new merge list
    +
    79  // find but not last -> do nothing
    +
    80  // not found -> add this single edge
    +
    81  auto found_in_merge = false;
    +
    82  for (const auto& [name_after_merge, names_before_merge] : merge) {
    +
    83  if (auto position_in_group = std::find(names_before_merge.begin(), names_before_merge.end(), name);
    +
    84  position_in_group != names_before_merge.end()) {
    +
    85  if (name == names_before_merge.back()) {
    +
    86  target_name.push_back(name_after_merge);
    +
    87  }
    +
    88  found_in_merge = true;
    +
    89  break;
    +
    90  }
    +
    91  }
    +
    92  if (!found_in_merge) {
    +
    93  target_name.push_back(name);
    +
    94  }
    +
    95  }
    +
    96  // and empty merge edge
    +
    97  for (const auto& [name_after_merge, names_before_merge] : merge) {
    +
    98  if (names_before_merge.empty()) {
    +
    99  target_name.push_back(name_after_merge);
    +
    100  }
    +
    101  }
    +
    102  // reverse target name
    +
    103  std::reverse(target_name.begin(), target_name.end());
    +
    104  return edge_operator_implement(
    +
    105  {},
    +
    106  {},
    +
    107  merge,
    +
    108  std::move(target_name),
    +
    109  apply_parity,
    +
    110  {},
    +
    111  {},
    +
    112  parity_exclude_names_reverse,
    +
    113  parity_exclude_names_merge,
    +
    114  {}
    +
    115  );
    +
    116  }
    +
    117 } // namespace TAT
    +
    118 #endif
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    Tensor< ScalarType, Symmetry, Name > merge_edge(const std::unordered_map< Name, std::vector< Name >> &merge, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_merge={}, const std::unordered_set< Name > &parity_exclude_names_reverse={}) const
    Merge some edge of a tensor.
    Definition: split_and_merge.hpp:57
    +
    Tensor< ScalarType, Symmetry, Name > split_edge(const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}) const
    Split some edge of a tensor.
    Definition: split_and_merge.hpp:28
    +
    Definition: edge.hpp:33
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    Definition: allocator.hpp:295
    +
    +
    + + + + diff --git a/splitbar.png b/splitbar.png new file mode 100644 index 0000000000000000000000000000000000000000..fe895f2c58179b471a22d8320b39a4bd7312ec8e GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T literal 0 HcmV?d00001 diff --git a/structTAT_1_1Cut-members.html b/structTAT_1_1Cut-members.html new file mode 100644 index 000000000..ebc79e802 --- /dev/null +++ b/structTAT_1_1Cut-members.html @@ -0,0 +1,112 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::Cut Member List
    +
    +
    + +

    This is the complete list of members for TAT::Cut, including all inherited members.

    + + + + + + + + + + + +
    Cut(Size i, double f) (defined in TAT::Cut)TAT::Cutinline
    Cut(double f, Size i) (defined in TAT::Cut)TAT::Cutinline
    Cut() (defined in TAT::Cut)TAT::Cutinline
    Cut(Size i) (defined in TAT::Cut)TAT::Cutinline
    Cut(double f) (defined in TAT::Cut)TAT::Cutinline
    Cut(NoCut) (defined in TAT::Cut)TAT::Cutinline
    Cut(RelativeCut c) (defined in TAT::Cut)TAT::Cutinline
    Cut(RemainCut c) (defined in TAT::Cut)TAT::Cutinline
    relative_cut (defined in TAT::Cut)TAT::Cut
    remain_cut (defined in TAT::Cut)TAT::Cut
    +
    + + + + diff --git a/structTAT_1_1Cut.html b/structTAT_1_1Cut.html new file mode 100644 index 000000000..bad38b371 --- /dev/null +++ b/structTAT_1_1Cut.html @@ -0,0 +1,148 @@ + + + + + + + +TAT: TAT::Cut Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::Cut Struct Reference
    +
    +
    + +

    Used to describle how to cut when doing svd to a tensor. + More...

    + +

    #include <tensor.hpp>

    + + + + + + + + + + + + + + + + +

    +Public Member Functions

    Cut (Size i, double f)
     
    Cut (double f, Size i)
     
    Cut (Size i)
     
    Cut (double f)
     
    Cut (NoCut)
     
    Cut (RelativeCut c)
     
    Cut (RemainCut c)
     
    + + + + + +

    +Public Attributes

    +Size remain_cut
     
    +double relative_cut
     
    +

    Detailed Description

    +

    Used to describle how to cut when doing svd to a tensor.

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1Cut.js b/structTAT_1_1Cut.js new file mode 100644 index 000000000..a9a5f3c91 --- /dev/null +++ b/structTAT_1_1Cut.js @@ -0,0 +1,13 @@ +var structTAT_1_1Cut = +[ + [ "Cut", "structTAT_1_1Cut.html#a26fff2a460161c0eb9c091a5a287fae9", null ], + [ "Cut", "structTAT_1_1Cut.html#a516986ca30b1b9cf3b1fe4fd9f191925", null ], + [ "Cut", "structTAT_1_1Cut.html#a976e9f8edd154f2e85a1682e49bd5494", null ], + [ "Cut", "structTAT_1_1Cut.html#ac2b00177a100ca9d2dc13446fc1fe503", null ], + [ "Cut", "structTAT_1_1Cut.html#ab46c953ab4a8b660caf44a4324d71494", null ], + [ "Cut", "structTAT_1_1Cut.html#a26512e5784d07fc01d6f2e4ddc15ad30", null ], + [ "Cut", "structTAT_1_1Cut.html#a2891380039964ca4012b182433ad4593", null ], + [ "Cut", "structTAT_1_1Cut.html#aa23f22d6f0eeb21b1cd4125a7f0d9db4", null ], + [ "relative_cut", "structTAT_1_1Cut.html#ad094ddec3beabaaa8bb4378032618927", null ], + [ "remain_cut", "structTAT_1_1Cut.html#a30d5bef64f1e9b7f35e0823650d91d40", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1InternalName-members.html b/structTAT_1_1InternalName-members.html new file mode 100644 index 000000000..a02813891 --- /dev/null +++ b/structTAT_1_1InternalName-members.html @@ -0,0 +1,155 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::InternalName< Name > Member List
    +
    +
    + +

    This is the complete list of members for TAT::InternalName< Name >, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Contract_0 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Contract_0 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Contract_0 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Contract_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Contract_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Contract_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Contract_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Contract_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Contract_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Default_0 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Default_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Default_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Default_3 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Default_4 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Exp_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Exp_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Exp_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Exp_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Exp_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Exp_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    No_New_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    No_New_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    No_New_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    No_Old_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    No_Old_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    No_Old_Name (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    QR_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    QR_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    QR_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    QR_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    QR_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    QR_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    SVD_U (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    SVD_U (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    SVD_U (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    SVD_V (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    SVD_V (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    SVD_V (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Trace_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_1 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Trace_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_2 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_3 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Trace_3 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_3 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_4 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Trace_4 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_4 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_5 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >static
    Trace_5 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    Trace_5 (defined in TAT::InternalName< Name >)TAT::InternalName< Name >inline
    +
    + + + + diff --git a/structTAT_1_1InternalName.html b/structTAT_1_1InternalName.html new file mode 100644 index 000000000..ac8509a6f --- /dev/null +++ b/structTAT_1_1InternalName.html @@ -0,0 +1,284 @@ + + + + + + + +TAT: TAT::InternalName< Name > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::InternalName< Name > Struct Template Reference
    +
    +
    + +

    For every Name type, some internal name is needed. + More...

    + +

    #include <name.hpp>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    +const FastNameContract_0
     
    +const std::string & Contract_0
     
    +const FastNameContract_1
     
    +const std::string & Contract_1
     
    +const FastNameContract_2
     
    +const std::string & Contract_2
     
    +const FastNameSVD_U
     
    +const std::string & SVD_U
     
    +const FastNameSVD_V
     
    +const std::string & SVD_V
     
    +const FastNameQR_1
     
    +const std::string & QR_1
     
    +const FastNameQR_2
     
    +const std::string & QR_2
     
    +const FastNameTrace_1
     
    +const std::string & Trace_1
     
    +const FastNameTrace_2
     
    +const std::string & Trace_2
     
    +const FastNameTrace_3
     
    +const std::string & Trace_3
     
    +const FastNameTrace_4
     
    +const std::string & Trace_4
     
    +const FastNameTrace_5
     
    +const std::string & Trace_5
     
    +const FastNameNo_Old_Name
     
    +const std::string & No_Old_Name
     
    +const FastNameNo_New_Name
     
    +const std::string & No_New_Name
     
    +const FastNameExp_1
     
    +const std::string & Exp_1
     
    +const FastNameExp_2
     
    +const std::string & Exp_2
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Static Public Attributes

    +static const Name Default_0
     
    +static const Name Default_1
     
    +static const Name Default_2
     
    +static const Name Default_3
     
    +static const Name Default_4
     
    +static const Name & Contract_0 = InternalName<Name>::Default_0
     
    +static const Name & Contract_1 = InternalName<Name>::Default_1
     
    +static const Name & Contract_2 = InternalName<Name>::Default_2
     
    +static const Name & SVD_U = InternalName<Name>::Default_1
     
    +static const Name & SVD_V = InternalName<Name>::Default_2
     
    +static const Name & QR_1 = InternalName<Name>::Default_1
     
    +static const Name & QR_2 = InternalName<Name>::Default_2
     
    +static const Name & Trace_1 = InternalName<Name>::Default_0
     
    +static const Name & Trace_2 = InternalName<Name>::Default_1
     
    +static const Name & Trace_3 = InternalName<Name>::Default_2
     
    +static const Name & Trace_4 = InternalName<Name>::Default_3
     
    +static const Name & Trace_5 = InternalName<Name>::Default_4
     
    +static const Name & No_Old_Name = InternalName<Name>::Default_0
     
    +static const Name & No_New_Name = InternalName<Name>::Default_0
     
    +static const Name & Exp_1 = InternalName<Name>::Default_1
     
    +static const Name & Exp_2 = InternalName<Name>::Default_2
     
    +

    Detailed Description

    +

    template<typename Name>
    +struct TAT::InternalName< Name >

    + +

    For every Name type, some internal name is needed.

    +

    It would be better to define all name to get better debug experience. You can also define only three Default_x

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1InternalName.js b/structTAT_1_1InternalName.js new file mode 100644 index 000000000..7e1fb5555 --- /dev/null +++ b/structTAT_1_1InternalName.js @@ -0,0 +1,56 @@ +var structTAT_1_1InternalName = +[ + [ "Contract_0", "structTAT_1_1InternalName.html#aa1d40657b07f3a0b70ed9119a72eaa7f", null ], + [ "Contract_0", "structTAT_1_1InternalName.html#a7d783c1d662ed3a260db33b7db8ab7e5", null ], + [ "Contract_1", "structTAT_1_1InternalName.html#ae03680285c347c73a06d799dc838e3ec", null ], + [ "Contract_1", "structTAT_1_1InternalName.html#aebf3d2be90574ea01838e6fdb53ff071", null ], + [ "Contract_2", "structTAT_1_1InternalName.html#aba051fe1cc2da19609cc2e0fec60ec60", null ], + [ "Contract_2", "structTAT_1_1InternalName.html#ae118b79aae8865208ad2af04d665f2c4", null ], + [ "Exp_1", "structTAT_1_1InternalName.html#a270c39086556b308c73ed42dc0354f95", null ], + [ "Exp_1", "structTAT_1_1InternalName.html#a0161f4b4762e3cdd69b1d80de7c31da7", null ], + [ "Exp_2", "structTAT_1_1InternalName.html#af4e9857bc0d8f836ca31785542b45912", null ], + [ "Exp_2", "structTAT_1_1InternalName.html#a3bbe6748df761f5b56b603f004fb820e", null ], + [ "No_New_Name", "structTAT_1_1InternalName.html#a2123c479d89c33d83681ef76e7cd661a", null ], + [ "No_New_Name", "structTAT_1_1InternalName.html#a76e5aba314a683e968f441f6c4f1a426", null ], + [ "No_Old_Name", "structTAT_1_1InternalName.html#a3ad52d1510805019f997eba70bb386f5", null ], + [ "No_Old_Name", "structTAT_1_1InternalName.html#a03088e6a1ca1e05e975b07f0966627ec", null ], + [ "QR_1", "structTAT_1_1InternalName.html#abebc0443dee82999ba60a7ec502c95bd", null ], + [ "QR_1", "structTAT_1_1InternalName.html#a12d654faff6b138bd231495a64a70905", null ], + [ "QR_2", "structTAT_1_1InternalName.html#a296254eab6f0aab0cedc22cb291c2670", null ], + [ "QR_2", "structTAT_1_1InternalName.html#a12d6b8ac44daceaa4e4364441b6842aa", null ], + [ "SVD_U", "structTAT_1_1InternalName.html#a83663b75117ef87beeb53ea56c5841f3", null ], + [ "SVD_U", "structTAT_1_1InternalName.html#a25d7fb37fe8ceec24688afd32bb11f6b", null ], + [ "SVD_V", "structTAT_1_1InternalName.html#a43cdc18f9a9f83c33402acbd69bb469f", null ], + [ "SVD_V", "structTAT_1_1InternalName.html#a25c4db76111447f64a398f4c007e356a", null ], + [ "Trace_1", "structTAT_1_1InternalName.html#ad00c373f6534574c8012eea7b50b6168", null ], + [ "Trace_1", "structTAT_1_1InternalName.html#ae9f18d83e0d62227af592490953dea85", null ], + [ "Trace_2", "structTAT_1_1InternalName.html#a2b5b2098eb3c26ab8baa48c775ba6dad", null ], + [ "Trace_2", "structTAT_1_1InternalName.html#aea88e9b258ae031d720c42473d5f8e41", null ], + [ "Trace_3", "structTAT_1_1InternalName.html#ad5af50312400f3bf02bf3d9cb5770910", null ], + [ "Trace_3", "structTAT_1_1InternalName.html#aa9aa990ee099fdce7aab500b384bcc31", null ], + [ "Trace_4", "structTAT_1_1InternalName.html#a64bde77daf33faa02b2a87bd79dc1883", null ], + [ "Trace_4", "structTAT_1_1InternalName.html#aa49a830aaae0f1f5b2ee3fec1436cd21", null ], + [ "Trace_5", "structTAT_1_1InternalName.html#a87fe5e7f177dca903c57fe30ecc74ef0", null ], + [ "Trace_5", "structTAT_1_1InternalName.html#af18b4623ca42222a12636cb0ca49b054", null ], + [ "Contract_0", "structTAT_1_1InternalName.html#aae0c7188443d3579a84639fe20730112", null ], + [ "Contract_1", "structTAT_1_1InternalName.html#a681062fa462b35ff87d5cc55d89a4058", null ], + [ "Contract_2", "structTAT_1_1InternalName.html#a485a4751bc46f6f9dda67b18d27a9577", null ], + [ "Default_0", "structTAT_1_1InternalName.html#a7e5cbc187f0b2d0e1abff37f17d43fba", null ], + [ "Default_1", "structTAT_1_1InternalName.html#acc9d801f4121265654e4f1ba68264f60", null ], + [ "Default_2", "structTAT_1_1InternalName.html#a1e4012bda50c54efd6c4aee518a2ceb5", null ], + [ "Default_3", "structTAT_1_1InternalName.html#a6130b89ad288d4fa5cc2b4d18605efcd", null ], + [ "Default_4", "structTAT_1_1InternalName.html#a5e5e68f34acf5b3cc9e02ac0fc990ead", null ], + [ "Exp_1", "structTAT_1_1InternalName.html#a3b9573806dad77b3f912e3bc4ffa0f21", null ], + [ "Exp_2", "structTAT_1_1InternalName.html#afe653fd6601f6701405e17934ccd2e0b", null ], + [ "No_New_Name", "structTAT_1_1InternalName.html#a176974242ac051f373d7dab2ac4d723d", null ], + [ "No_Old_Name", "structTAT_1_1InternalName.html#a5e90184ea0e772d3bebf4ab12c96b7d6", null ], + [ "QR_1", "structTAT_1_1InternalName.html#afbff29d6949f30a8e6532fff23cd8701", null ], + [ "QR_2", "structTAT_1_1InternalName.html#ac94dbe6fd30034d791cd46dc3a1f7534", null ], + [ "SVD_U", "structTAT_1_1InternalName.html#a351a694e333ba792334dd623d236c56f", null ], + [ "SVD_V", "structTAT_1_1InternalName.html#a2586d71e04ac50da129bae7946862b35", null ], + [ "Trace_1", "structTAT_1_1InternalName.html#a5638f25198ea59184354057b073c6e9c", null ], + [ "Trace_2", "structTAT_1_1InternalName.html#a3c7042ffba893cf4cf8cf59c8c4bc24b", null ], + [ "Trace_3", "structTAT_1_1InternalName.html#aa68d42f9a3f026d7672b929a0345ffdc", null ], + [ "Trace_4", "structTAT_1_1InternalName.html#ae7dd5802b70dbfd7de8f09b4e805631c", null ], + [ "Trace_5", "structTAT_1_1InternalName.html#a2613b3f606b7765a491c794aa855202b", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1NameTraits.html b/structTAT_1_1NameTraits.html new file mode 100644 index 000000000..a2b4037b0 --- /dev/null +++ b/structTAT_1_1NameTraits.html @@ -0,0 +1,114 @@ + + + + + + + +TAT: TAT::NameTraits< Name > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::NameTraits< Name > Struct Template Reference
    +
    +
    + +

    Name type also need input and output method. + More...

    + +

    #include <name.hpp>

    +

    Detailed Description

    +

    template<typename Name>
    +struct TAT::NameTraits< Name >

    + +

    Name type also need input and output method.

    +

    Specialize NameTraits to define write, read, print, scan Their type are out_operator_t<Name> and in_operator_t<Name>

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1NameTraits_3_01FastName_01_4-members.html b/structTAT_1_1NameTraits_3_01FastName_01_4-members.html new file mode 100644 index 000000000..6a5e497b2 --- /dev/null +++ b/structTAT_1_1NameTraits_3_01FastName_01_4-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::NameTraits< FastName > Member List
    +
    +
    + +

    This is the complete list of members for TAT::NameTraits< FastName >, including all inherited members.

    + + + + + +
    print (defined in TAT::NameTraits< FastName >)TAT::NameTraits< FastName >static
    read (defined in TAT::NameTraits< FastName >)TAT::NameTraits< FastName >static
    scan (defined in TAT::NameTraits< FastName >)TAT::NameTraits< FastName >static
    write (defined in TAT::NameTraits< FastName >)TAT::NameTraits< FastName >static
    +
    + + + + diff --git a/structTAT_1_1NameTraits_3_01FastName_01_4.html b/structTAT_1_1NameTraits_3_01FastName_01_4.html new file mode 100644 index 000000000..d9a31a0db --- /dev/null +++ b/structTAT_1_1NameTraits_3_01FastName_01_4.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: TAT::NameTraits< FastName > Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::NameTraits< FastName > Struct Reference
    +
    +
    + + + + + + + + + + +

    +Static Public Attributes

    +static constexpr out_operator_t< FastNamewrite = write_fastname_for_name
     
    +static constexpr in_operator_t< FastNameread = read_fastname_for_name
     
    +static constexpr out_operator_t< FastNameprint = print_fastname_for_name
     
    +static constexpr in_operator_t< FastNamescan = scan_fastname_for_name
     
    +
    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/io.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1NameTraits_3_01FastName_01_4.js b/structTAT_1_1NameTraits_3_01FastName_01_4.js new file mode 100644 index 000000000..411b4a448 --- /dev/null +++ b/structTAT_1_1NameTraits_3_01FastName_01_4.js @@ -0,0 +1,7 @@ +var structTAT_1_1NameTraits_3_01FastName_01_4 = +[ + [ "print", "structTAT_1_1NameTraits_3_01FastName_01_4.html#a148ca68b02b17b03ef53973aacd53dd1", null ], + [ "read", "structTAT_1_1NameTraits_3_01FastName_01_4.html#a98d9df40490a94732eaaad5fb0e3c115", null ], + [ "scan", "structTAT_1_1NameTraits_3_01FastName_01_4.html#ab4b3dec6368112f4265648ffb0057bbc", null ], + [ "write", "structTAT_1_1NameTraits_3_01FastName_01_4.html#a87211afb80d66a08491231e4662b5d56", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1NameTraits_3_01std_1_1string_01_4-members.html b/structTAT_1_1NameTraits_3_01std_1_1string_01_4-members.html new file mode 100644 index 000000000..10d5bd08c --- /dev/null +++ b/structTAT_1_1NameTraits_3_01std_1_1string_01_4-members.html @@ -0,0 +1,106 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::NameTraits< std::string > Member List
    +
    +
    + +

    This is the complete list of members for TAT::NameTraits< std::string >, including all inherited members.

    + + + + + +
    print (defined in TAT::NameTraits< std::string >)TAT::NameTraits< std::string >static
    read (defined in TAT::NameTraits< std::string >)TAT::NameTraits< std::string >static
    scan (defined in TAT::NameTraits< std::string >)TAT::NameTraits< std::string >static
    write (defined in TAT::NameTraits< std::string >)TAT::NameTraits< std::string >static
    +
    + + + + diff --git a/structTAT_1_1NameTraits_3_01std_1_1string_01_4.html b/structTAT_1_1NameTraits_3_01std_1_1string_01_4.html new file mode 100644 index 000000000..fe89b3136 --- /dev/null +++ b/structTAT_1_1NameTraits_3_01std_1_1string_01_4.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: TAT::NameTraits< std::string > Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::NameTraits< std::string > Struct Reference
    +
    +
    + + + + + + + + + + +

    +Static Public Attributes

    +static constexpr out_operator_t< std::string > write = write_string_for_name
     
    +static constexpr in_operator_t< std::string > read = read_string_for_name
     
    +static constexpr out_operator_t< std::string > print = print_string_for_name
     
    +static constexpr in_operator_t< std::string > scan = scan_string_for_name
     
    +
    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/io.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1NameTraits_3_01std_1_1string_01_4.js b/structTAT_1_1NameTraits_3_01std_1_1string_01_4.js new file mode 100644 index 000000000..9d9f20430 --- /dev/null +++ b/structTAT_1_1NameTraits_3_01std_1_1string_01_4.js @@ -0,0 +1,7 @@ +var structTAT_1_1NameTraits_3_01std_1_1string_01_4 = +[ + [ "print", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html#adf66ecd486cca1c65e5ac227651a9495", null ], + [ "read", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html#a65b06b6dd5ab563b7829ad0a2b9d8677", null ], + [ "scan", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html#a171eabfbc3de5ca57a3e2bcd98ded95d", null ], + [ "write", "structTAT_1_1NameTraits_3_01std_1_1string_01_4.html#af527f7afde315144e609d8f61d6c869e", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1NoCut.html b/structTAT_1_1NoCut.html new file mode 100644 index 000000000..c37c25d32 --- /dev/null +++ b/structTAT_1_1NoCut.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: TAT::NoCut Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::NoCut Struct Reference
    +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1RelativeCut-members.html b/structTAT_1_1RelativeCut-members.html new file mode 100644 index 000000000..2547f348b --- /dev/null +++ b/structTAT_1_1RelativeCut-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::RelativeCut Member List
    +
    +
    + +

    This is the complete list of members for TAT::RelativeCut, including all inherited members.

    + + + +
    RelativeCut(double v) (defined in TAT::RelativeCut)TAT::RelativeCutinlineexplicit
    value (defined in TAT::RelativeCut)TAT::RelativeCut
    +
    + + + + diff --git a/structTAT_1_1RelativeCut.html b/structTAT_1_1RelativeCut.html new file mode 100644 index 000000000..48e68f47a --- /dev/null +++ b/structTAT_1_1RelativeCut.html @@ -0,0 +1,120 @@ + + + + + + + +TAT: TAT::RelativeCut Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::RelativeCut Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    RelativeCut (double v)
     
    + + + +

    +Public Attributes

    +double value
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1RelativeCut.js b/structTAT_1_1RelativeCut.js new file mode 100644 index 000000000..86b462772 --- /dev/null +++ b/structTAT_1_1RelativeCut.js @@ -0,0 +1,5 @@ +var structTAT_1_1RelativeCut = +[ + [ "RelativeCut", "structTAT_1_1RelativeCut.html#af5884fdda699e8352cb748acefc6dcaa", null ], + [ "value", "structTAT_1_1RelativeCut.html#a94b105d1bfaaf6a8fd3166cfc7512b33", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1RemainCut-members.html b/structTAT_1_1RemainCut-members.html new file mode 100644 index 000000000..0bd165175 --- /dev/null +++ b/structTAT_1_1RemainCut-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::RemainCut Member List
    +
    +
    + +

    This is the complete list of members for TAT::RemainCut, including all inherited members.

    + + + +
    RemainCut(Size v) (defined in TAT::RemainCut)TAT::RemainCutinlineexplicit
    value (defined in TAT::RemainCut)TAT::RemainCut
    +
    + + + + diff --git a/structTAT_1_1RemainCut.html b/structTAT_1_1RemainCut.html new file mode 100644 index 000000000..24d8affda --- /dev/null +++ b/structTAT_1_1RemainCut.html @@ -0,0 +1,120 @@ + + + + + + + +TAT: TAT::RemainCut Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::RemainCut Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    RemainCut (Size v)
     
    + + + +

    +Public Attributes

    +Size value
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1RemainCut.js b/structTAT_1_1RemainCut.js new file mode 100644 index 000000000..fac7bec37 --- /dev/null +++ b/structTAT_1_1RemainCut.js @@ -0,0 +1,5 @@ +var structTAT_1_1RemainCut = +[ + [ "RemainCut", "structTAT_1_1RemainCut.html#af57afa311a01125c2fb35f94108fed7d", null ], + [ "value", "structTAT_1_1RemainCut.html#a0614d86a0c53c0a67695d5669e33549d", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1Symmetry-members.html b/structTAT_1_1Symmetry-members.html new file mode 100644 index 000000000..707e2ac73 --- /dev/null +++ b/structTAT_1_1Symmetry-members.html @@ -0,0 +1,116 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::Symmetry< T > Member List
    +
    +
    + +

    This is the complete list of members for TAT::Symmetry< T >, including all inherited members.

    + + + + + + + + + + + + + + + +
    base_tuple_t typedef (defined in TAT::Symmetry< T >)TAT::Symmetry< T >
    hash() const (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    index_sequence_t typedef (defined in TAT::Symmetry< T >)TAT::Symmetry< T >
    is_fermi_item (defined in TAT::Symmetry< T >)TAT::Symmetry< T >static
    is_fermi_symmetry (defined in TAT::Symmetry< T >)TAT::Symmetry< T >static
    length (defined in TAT::Symmetry< T >)TAT::Symmetry< T >static
    operator+(const self_t &other_symmetry) const & (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    operator+=(const self_t &other_symmetry) & (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    operator-(const self_t &other_symmetry) const & (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    operator-() const & (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    operator-=(const self_t &other_symmetry) & (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    parity() constTAT::Symmetry< T >inline
    self_t typedef (defined in TAT::Symmetry< T >)TAT::Symmetry< T >
    Symmetry(const Args &... args) (defined in TAT::Symmetry< T >)TAT::Symmetry< T >inline
    +
    + + + + diff --git a/structTAT_1_1Symmetry.html b/structTAT_1_1Symmetry.html new file mode 100644 index 000000000..775a72012 --- /dev/null +++ b/structTAT_1_1Symmetry.html @@ -0,0 +1,215 @@ + + + + + + + +TAT: TAT::Symmetry< T > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::Symmetry< T > Struct Template Reference
    +
    +
    + +

    General symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied. + More...

    + +

    #include <symmetry.hpp>

    +
    +Inheritance diagram for TAT::Symmetry< T >:
    +
    +
    + +
    + + + + + + + + +

    +Public Types

    +using self_t = Symmetry< T... >
     
    +using base_tuple_t = std::tuple< detail::symmetry_unwrap< T >... >
     
    +using index_sequence_t = std::index_sequence_for< T... >
     
    + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    +template<typename... Args, typename = std::enable_if_t<(sizeof...(Args) <= length) && (std::is_integral_v<Args> && ...)>>
     Symmetry (const Args &... args)
     
    +self_toperator+= (const self_t &other_symmetry) &
     
    +self_toperator-= (const self_t &other_symmetry) &
     
    +self_t operator+ (const self_t &other_symmetry) const &
     
    +self_t operator- (const self_t &other_symmetry) const &
     
    +self_t operator- () const &
     
    +std::size_t hash () const
     
    bool parity () const
     Get the total parity, whether fermion or boson. More...
     
    + + + + + + + +

    +Static Public Attributes

    +static constexpr int length = sizeof...(T)
     
    +static constexpr std::array< bool, length > is_fermi_item = {detail::is_fermi<T>...}
     
    +static constexpr bool is_fermi_symmetry = (detail::is_fermi<T> || ...)
     
    +

    Detailed Description

    +

    template<typename... T>
    +struct TAT::Symmetry< T >

    + +

    General symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied.

    +

    For example, Symmetry<int> is U1 symmetry and Symmetry<bool> is Z2 symmetry. While Symmetry<int, femri_wrap<int>> represent the conservation of particle number of two particle, one is boson and the other is fermion.

    +

    A symmetry have a bool property to represent its parity.

    +
    Parameters
    + + +
    Tintegral type, such as bool or int, or use fermi<...> to mark the fermi symmetry
    +
    +
    +

    Member Function Documentation

    + +

    ◆ parity()

    + +
    +
    +
    +template<typename... T>
    + + + + + +
    + + + + + + + +
    bool TAT::Symmetry< T >::parity () const
    +
    +inline
    +
    + +

    Get the total parity, whether fermion or boson.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1Symmetry.js b/structTAT_1_1Symmetry.js new file mode 100644 index 000000000..e196bcda7 --- /dev/null +++ b/structTAT_1_1Symmetry.js @@ -0,0 +1,17 @@ +var structTAT_1_1Symmetry = +[ + [ "base_tuple_t", "structTAT_1_1Symmetry.html#a0f53133a69d367215b096c34d1d2191f", null ], + [ "index_sequence_t", "structTAT_1_1Symmetry.html#ac47e8af0afb62af604ab1a51428bba8f", null ], + [ "self_t", "structTAT_1_1Symmetry.html#a07f579ee6bea0a7ce6059684f140836d", null ], + [ "Symmetry", "structTAT_1_1Symmetry.html#a7de55db72e61406c824fbe11756987aa", null ], + [ "hash", "structTAT_1_1Symmetry.html#ad29bdc1f4daab793b6eaf577e30a67dc", null ], + [ "operator+", "structTAT_1_1Symmetry.html#a1d4f6414011a55f82ab795a321d3a83c", null ], + [ "operator+=", "structTAT_1_1Symmetry.html#a1c032616cf98131ee505c53bc62339ab", null ], + [ "operator-", "structTAT_1_1Symmetry.html#ab974c81d0a4b136d03baa90a54b4b718", null ], + [ "operator-", "structTAT_1_1Symmetry.html#abec896a0d068fbd12f865b5abb697212", null ], + [ "operator-=", "structTAT_1_1Symmetry.html#a71d42e756df2379c601e23da151668f8", null ], + [ "parity", "structTAT_1_1Symmetry.html#a9c4f85b0a733aa13de6d74b6cb5312c5", null ], + [ "is_fermi_item", "structTAT_1_1Symmetry.html#aa63c3e376215bd6ad6eb88e5f2d06176", null ], + [ "is_fermi_symmetry", "structTAT_1_1Symmetry.html#ae05e61ce83afbf57415b4d8a4430cb0b", null ], + [ "length", "structTAT_1_1Symmetry.html#a87c272b80b0d1b5d62719f6e1f553537", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1Symmetry.png b/structTAT_1_1Symmetry.png new file mode 100644 index 0000000000000000000000000000000000000000..ba8e98250f6988e3e9cb3d6faedfdbe33c1ad3bc GIT binary patch literal 822 zcmeAS@N?(olHy`uVBq!ia0y~yU<9!PIGBOtwer*VfRsdlPl)UP|Nnu^7jM3n_8*!6 zWP$O40|!_;@5lqW93?@1!3;n}AaM0mh!Fz=(@{?s$B+ufw{!1K+ibw$YHnV9?|-j- zwkhMHxn-;V{uI;mlb$*u#ruSATH4ant)4-iS|Y7ZlNNEgE}XDrMN87o%=2u1zaRXX zeW7Z?mqz(COL3K#dULxUecUQLdojQ3YYn|WX&sY)ZO*R#x6AlJr1Gn)=UFrV&N+Xn zzHi&MaQW-sf0-Q2EtWW>(`YXAAYa4hRobNO4{sW|N$=V3KUYOM=i|OhuY3K@tv6p3 z5k6n->Fm6)!{rl}sJwp@u;b*Cv-`H5u}LZ6y;sOEbDJ*9{c~I==X`y0cTVV;uK2_w zyhZX|J0*CXx0$~V^VImnpvGEU+ul?y-1>gTwb}3T4u423Ub1(#sC4Iy%Zll)#kYNV z#52F%c6_+n({K6n&4-rcaUKow`5&b%w4hexVYIr4W@^}S9mPlK@Ik4aSLNl|S{r>5TD>{zEcz-X7p0xSB zb77F*9+6g+zxR=Yk+XGXWaci0d+X&Jf);Y9)OEQoWZ2`Y0-`vy1X`ICRt1P~HLP$7 z)L;MwJVOUiGtq+bZHLaRDcNbzaA}Hg>!JV#7SS#zMuAd|uB}4n3m^Zj;{MS6tv1M} zfw{CKOy^=$g!o=%rW@CNrwbSVxT-Pjzvt%DTlbpi#n=9gRN|TZ+e)NXG+XP8|Dn?_ z-zDu6jE$XO=YHL4)+z6RBQL*;N~;vt$J)7N$lHDm4%qT)+T!P~(j~jUdF>GLS#W!y zfuEz`_hTPcO=WCOQCvE0XKiViP2-{K9dXtBw}+*OtQGqen>^u7RmGM`J1b*qE^;z` zSp81+)7Ic>_OA0PANfS&y&l<0vpo15qQS-L5VBB1gdtFv%XssplE2Km=FE&_+By9c QFp)EOy85}Sb4q9e04K$6tN;K2 literal 0 HcmV?d00001 diff --git a/structTAT_1_1TensorShape-members.html b/structTAT_1_1TensorShape-members.html new file mode 100644 index 000000000..312ab3647 --- /dev/null +++ b/structTAT_1_1TensorShape-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::TensorShape< ScalarType, Symmetry, Name > Member List
    +
    +
    + +

    This is the complete list of members for TAT::TensorShape< ScalarType, Symmetry, Name >, including all inherited members.

    + + +
    owner (defined in TAT::TensorShape< ScalarType, Symmetry, Name >)TAT::TensorShape< ScalarType, Symmetry, Name >
    +
    + + + + diff --git a/structTAT_1_1TensorShape.html b/structTAT_1_1TensorShape.html new file mode 100644 index 000000000..0adf380ea --- /dev/null +++ b/structTAT_1_1TensorShape.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: TAT::TensorShape< ScalarType, Symmetry, Name > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::TensorShape< ScalarType, Symmetry, Name > Struct Template Reference
    +
    +
    + + + + +

    +Public Attributes

    +const Tensor< ScalarType, Symmetry, Name > * owner
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1TensorShape.js b/structTAT_1_1TensorShape.js new file mode 100644 index 000000000..7bfb19cb1 --- /dev/null +++ b/structTAT_1_1TensorShape.js @@ -0,0 +1,4 @@ +var structTAT_1_1TensorShape = +[ + [ "owner", "structTAT_1_1TensorShape.html#a67fa5a57175854756f5873a8af69bed0", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1Tensor_1_1qr__result-members.html b/structTAT_1_1Tensor_1_1qr__result-members.html new file mode 100644 index 000000000..67529736f --- /dev/null +++ b/structTAT_1_1Tensor_1_1qr__result-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::Tensor< ScalarType, Symmetry, Name >::qr_result Member List
    +
    + +
    + + + + diff --git a/structTAT_1_1Tensor_1_1qr__result.html b/structTAT_1_1Tensor_1_1qr__result.html new file mode 100644 index 000000000..e5d852928 --- /dev/null +++ b/structTAT_1_1Tensor_1_1qr__result.html @@ -0,0 +1,126 @@ + + + + + + + +TAT: TAT::Tensor< ScalarType, Symmetry, Name >::qr_result Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::Tensor< ScalarType, Symmetry, Name >::qr_result Struct Reference
    +
    +
    + +

    QR result type. + More...

    + +

    #include <tensor.hpp>

    + + + + + + +

    +Public Attributes

    +Tensor< ScalarType, Symmetry, Name > Q
     
    +Tensor< ScalarType, Symmetry, Name > R
     
    +

    Detailed Description

    +

    template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
    +struct TAT::Tensor< ScalarType, Symmetry, Name >::qr_result

    + +

    QR result type.

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1Tensor_1_1qr__result.js b/structTAT_1_1Tensor_1_1qr__result.js new file mode 100644 index 000000000..1a65331bc --- /dev/null +++ b/structTAT_1_1Tensor_1_1qr__result.js @@ -0,0 +1,5 @@ +var structTAT_1_1Tensor_1_1qr__result = +[ + [ "Q", "structTAT_1_1Tensor_1_1qr__result.html#aa9f51c7bc41beea03c94dc62fd1f085c", null ], + [ "R", "structTAT_1_1Tensor_1_1qr__result.html#a821277cf48976ebc7d7204a725cb4056", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1Tensor_1_1svd__result-members.html b/structTAT_1_1Tensor_1_1svd__result-members.html new file mode 100644 index 000000000..aadaa9dc6 --- /dev/null +++ b/structTAT_1_1Tensor_1_1svd__result-members.html @@ -0,0 +1,105 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/structTAT_1_1Tensor_1_1svd__result.html b/structTAT_1_1Tensor_1_1svd__result.html new file mode 100644 index 000000000..d4995e54f --- /dev/null +++ b/structTAT_1_1Tensor_1_1svd__result.html @@ -0,0 +1,129 @@ + + + + + + + +TAT: TAT::Tensor< ScalarType, Symmetry, Name >::svd_result Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::Tensor< ScalarType, Symmetry, Name >::svd_result Struct Reference
    +
    +
    + +

    SVD result type. + More...

    + +

    #include <tensor.hpp>

    + + + + + + + + +

    +Public Attributes

    +Tensor< ScalarType, Symmetry, Name > U
     
    +Tensor< ScalarType, Symmetry, Name > S
     
    +Tensor< ScalarType, Symmetry, Name > V
     
    +

    Detailed Description

    +

    template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
    +struct TAT::Tensor< ScalarType, Symmetry, Name >::svd_result

    + +

    SVD result type.

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1Tensor_1_1svd__result.js b/structTAT_1_1Tensor_1_1svd__result.js new file mode 100644 index 000000000..a14356ede --- /dev/null +++ b/structTAT_1_1Tensor_1_1svd__result.js @@ -0,0 +1,6 @@ +var structTAT_1_1Tensor_1_1svd__result = +[ + [ "S", "structTAT_1_1Tensor_1_1svd__result.html#afedbdb36a9634f8ad6537f4808748bce", null ], + [ "U", "structTAT_1_1Tensor_1_1svd__result.html#af065d89636ad3faf3dfdf1a50fd21027", null ], + [ "V", "structTAT_1_1Tensor_1_1svd__result.html#a4645d1561dd1e20f86c04b78a59ab71f", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1UnixColorCode-members.html b/structTAT_1_1UnixColorCode-members.html new file mode 100644 index 000000000..7bc01d9a2 --- /dev/null +++ b/structTAT_1_1UnixColorCode-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::UnixColorCode Member List
    +
    +
    + +

    This is the complete list of members for TAT::UnixColorCode, including all inherited members.

    + + + +
    color_code (defined in TAT::UnixColorCode)TAT::UnixColorCode
    UnixColorCode(const char *code) (defined in TAT::UnixColorCode)TAT::UnixColorCodeinline
    +
    + + + + diff --git a/structTAT_1_1UnixColorCode.html b/structTAT_1_1UnixColorCode.html new file mode 100644 index 000000000..b7fcf9baa --- /dev/null +++ b/structTAT_1_1UnixColorCode.html @@ -0,0 +1,127 @@ + + + + + + + +TAT: TAT::UnixColorCode Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::UnixColorCode Struct Reference
    +
    +
    + +

    A type control console color. + More...

    + +

    #include <io.hpp>

    + + + + +

    +Public Member Functions

    UnixColorCode (const char *code)
     
    + + + +

    +Public Attributes

    +std::string color_code
     
    +

    Detailed Description

    +

    A type control console color.

    +

    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/io.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1UnixColorCode.js b/structTAT_1_1UnixColorCode.js new file mode 100644 index 000000000..2aeffb143 --- /dev/null +++ b/structTAT_1_1UnixColorCode.js @@ -0,0 +1,5 @@ +var structTAT_1_1UnixColorCode = +[ + [ "UnixColorCode", "structTAT_1_1UnixColorCode.html#ac7a787753bc5d8eb788f8d5d170ff708", null ], + [ "color_code", "structTAT_1_1UnixColorCode.html#a494718a6745d6ad07c630406a030e4bd", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1edge__bose__arrow__t-members.html b/structTAT_1_1edge__bose__arrow__t-members.html new file mode 100644 index 000000000..a272860af --- /dev/null +++ b/structTAT_1_1edge__bose__arrow__t-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::edge_bose_arrow_t Member List
    +
    +
    + +

    This is the complete list of members for TAT::edge_bose_arrow_t, including all inherited members.

    + + + + + + +
    arrow() (defined in TAT::edge_bose_arrow_t)TAT::edge_bose_arrow_tinlinestatic
    edge_bose_arrow_t() (defined in TAT::edge_bose_arrow_t)TAT::edge_bose_arrow_tinline
    edge_bose_arrow_t(Arrow) (defined in TAT::edge_bose_arrow_t)TAT::edge_bose_arrow_tinline
    reverse_arrow() (defined in TAT::edge_bose_arrow_t)TAT::edge_bose_arrow_tinlinestatic
    set_arrow(Arrow) (defined in TAT::edge_bose_arrow_t)TAT::edge_bose_arrow_tinlinestatic
    +
    + + + + diff --git a/structTAT_1_1edge__bose__arrow__t.html b/structTAT_1_1edge__bose__arrow__t.html new file mode 100644 index 000000000..7c2b91316 --- /dev/null +++ b/structTAT_1_1edge__bose__arrow__t.html @@ -0,0 +1,126 @@ + + + + + + + +TAT: TAT::edge_bose_arrow_t Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::edge_bose_arrow_t Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    edge_bose_arrow_t (Arrow)
     
    + + + + + + + +

    +Static Public Member Functions

    +static constexpr Arrow arrow ()
     
    +static void set_arrow (Arrow)
     
    +static void reverse_arrow ()
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1edge__bose__arrow__t.js b/structTAT_1_1edge__bose__arrow__t.js new file mode 100644 index 000000000..ca734cb36 --- /dev/null +++ b/structTAT_1_1edge__bose__arrow__t.js @@ -0,0 +1,8 @@ +var structTAT_1_1edge__bose__arrow__t = +[ + [ "edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html#adf2e8a5fdecb988c5b4a0c0d1cd762db", null ], + [ "edge_bose_arrow_t", "structTAT_1_1edge__bose__arrow__t.html#a79bdf2b2e9a956132c8b8fe8fc03390a", null ], + [ "arrow", "structTAT_1_1edge__bose__arrow__t.html#aa81a40cc59381176009ae1c10fede2e6", null ], + [ "reverse_arrow", "structTAT_1_1edge__bose__arrow__t.html#afc9388d6ff20f34d2afbbefe87cd8043", null ], + [ "set_arrow", "structTAT_1_1edge__bose__arrow__t.html#acec03dea7b2f86119872a608437b5fc5", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1edge__fermi__arrow__t-members.html b/structTAT_1_1edge__fermi__arrow__t-members.html new file mode 100644 index 000000000..f80fc2bcf --- /dev/null +++ b/structTAT_1_1edge__fermi__arrow__t-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::edge_fermi_arrow_t Member List
    +
    +
    + +

    This is the complete list of members for TAT::edge_fermi_arrow_t, including all inherited members.

    + + + + + + +
    arrow() const (defined in TAT::edge_fermi_arrow_t)TAT::edge_fermi_arrow_tinline
    edge_fermi_arrow_t() (defined in TAT::edge_fermi_arrow_t)TAT::edge_fermi_arrow_tinline
    edge_fermi_arrow_t(Arrow arrow) (defined in TAT::edge_fermi_arrow_t)TAT::edge_fermi_arrow_tinline
    reverse_arrow() (defined in TAT::edge_fermi_arrow_t)TAT::edge_fermi_arrow_tinline
    set_arrow(Arrow arrow) (defined in TAT::edge_fermi_arrow_t)TAT::edge_fermi_arrow_tinline
    +
    + + + + diff --git a/structTAT_1_1edge__fermi__arrow__t.html b/structTAT_1_1edge__fermi__arrow__t.html new file mode 100644 index 000000000..e3a71f640 --- /dev/null +++ b/structTAT_1_1edge__fermi__arrow__t.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: TAT::edge_fermi_arrow_t Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::edge_fermi_arrow_t Struct Reference
    +
    +
    + + + + + + + + + + +

    +Public Member Functions

    edge_fermi_arrow_t (Arrow arrow)
     
    +Arrow arrow () const
     
    +void set_arrow (Arrow arrow)
     
    +void reverse_arrow ()
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1edge__fermi__arrow__t.js b/structTAT_1_1edge__fermi__arrow__t.js new file mode 100644 index 000000000..977d6fb8f --- /dev/null +++ b/structTAT_1_1edge__fermi__arrow__t.js @@ -0,0 +1,8 @@ +var structTAT_1_1edge__fermi__arrow__t = +[ + [ "edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html#aeed7555c72f10ec995975c51a5087dfa", null ], + [ "edge_fermi_arrow_t", "structTAT_1_1edge__fermi__arrow__t.html#a232e6933640ca5ee948989f5fcaabc6a", null ], + [ "arrow", "structTAT_1_1edge__fermi__arrow__t.html#abcba6a9ccd65edc65997d3d8b1c20021", null ], + [ "reverse_arrow", "structTAT_1_1edge__fermi__arrow__t.html#a15d82c86921077e660b3ef9ac530705a", null ], + [ "set_arrow", "structTAT_1_1edge__fermi__arrow__t.html#aac97acb91e724c50a4876f90b439d23e", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1empty__list-members.html b/structTAT_1_1empty__list-members.html new file mode 100644 index 000000000..c456e0a9a --- /dev/null +++ b/structTAT_1_1empty__list-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::empty_list< T > Member List
    +
    +
    + +

    This is the complete list of members for TAT::empty_list< T >, including all inherited members.

    + + +
    find(const U &) const (defined in TAT::empty_list< T >)TAT::empty_list< T >inline
    +
    + + + + diff --git a/structTAT_1_1empty__list.html b/structTAT_1_1empty__list.html new file mode 100644 index 000000000..94e131bd6 --- /dev/null +++ b/structTAT_1_1empty__list.html @@ -0,0 +1,120 @@ + + + + + + + +TAT: TAT::empty_list< T > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::empty_list< T > Struct Template Reference
    +
    +
    +
    +Inheritance diagram for TAT::empty_list< T >:
    +
    +
    + +
    + + + + + +

    +Public Member Functions

    +template<typename U >
    auto find (const U &) const
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1empty__list.js b/structTAT_1_1empty__list.js new file mode 100644 index 000000000..1ce0931cc --- /dev/null +++ b/structTAT_1_1empty__list.js @@ -0,0 +1,4 @@ +var structTAT_1_1empty__list = +[ + [ "find", "structTAT_1_1empty__list.html#aa801008616a5a015e659d70eecac4e1e", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1empty__list.png b/structTAT_1_1empty__list.png new file mode 100644 index 0000000000000000000000000000000000000000..4e3bfe73843480ddceed038d6eda82dd784869e6 GIT binary patch literal 548 zcmV+<0^9wGP)vTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d0005ANkl>*CaKeN43K9pT?5tk|aT!vxrExxGcQBH#HpJ>Rziz3hYgPj=g z+t6*G6s^f?W&K?S!}|C9*i)Gw47pCr^>1J9`>!r}6(sSqVm7~8zo_Q1%>Ui~7cCZ> zJ#O$l%k`hNc50#b=U-KIP1COz!*23-@tgepyTk84=c}q(>EMfq*a=`q9{@uc^FJTk z1dRCy-ZTMg{(s;9&Id4*^8xJSd;mK+AHYt|2e6a#0qo>_06RG!U_&AzhC%?$Ilx$*`!FP1?VQCc)*l~|vt4Vyy9Vzz^Pszb<{( z8Xdnrz~$oKt$)rJ$fHc7U_nZ2E+y4NIdOYU<%i89z|62ld+U4)w m9)ABhAHYiIKZ%Hlnf?Lj^-EGt#qm@C0000=IW1 literal 0 HcmV?d00001 diff --git a/structTAT_1_1fermi.html b/structTAT_1_1fermi.html new file mode 100644 index 000000000..581c8ec21 --- /dev/null +++ b/structTAT_1_1fermi.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: TAT::fermi< T > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::fermi< T > Struct Template Reference
    +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1mdspan_1_1iterator__general-members.html b/structTAT_1_1mdspan_1_1iterator__general-members.html new file mode 100644 index 000000000..03a468a9d --- /dev/null +++ b/structTAT_1_1mdspan_1_1iterator__general-members.html @@ -0,0 +1,112 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::mdspan< T, U >::iterator_general< is_const > Member List
    +
    +
    + +

    This is the complete list of members for TAT::mdspan< T, U >::iterator_general< is_const >, including all inherited members.

    + + + + + + + + + + + +
    indices (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >
    iterator_general(maybe_const< self_t > *owner, Size offset, bool valid, vector_t indices) (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    offset (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >
    operator!=(const iterator_general< is_const > &other) const (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    operator*() const (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    operator++() (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    operator->() const (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    operator==(const iterator_general< is_const > &other) const (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >inline
    owner (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >
    valid (defined in TAT::mdspan< T, U >::iterator_general< is_const >)TAT::mdspan< T, U >::iterator_general< is_const >
    +
    + + + + diff --git a/structTAT_1_1mdspan_1_1iterator__general.html b/structTAT_1_1mdspan_1_1iterator__general.html new file mode 100644 index 000000000..e5cb26963 --- /dev/null +++ b/structTAT_1_1mdspan_1_1iterator__general.html @@ -0,0 +1,144 @@ + + + + + + + +TAT: TAT::mdspan< T, U >::iterator_general< is_const > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::mdspan< T, U >::iterator_general< is_const > Struct Template Reference
    +
    +
    + + + + + + + + + + + + + + +

    +Public Member Functions

    iterator_general (maybe_const< self_t > *owner, Size offset, bool valid, vector_t indices)
     
    +maybe_const< T > & operator* () const
     
    +maybe_const< T > * operator-> () const
     
    +iterator_generaloperator++ ()
     
    +bool operator== (const iterator_general< is_const > &other) const
     
    +bool operator!= (const iterator_general< is_const > &other) const
     
    + + + + + + + + + +

    +Public Attributes

    +maybe_const< self_t > * owner
     
    +Size offset
     
    +bool valid
     
    +vector_t indices
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1mdspan_1_1iterator__general.js b/structTAT_1_1mdspan_1_1iterator__general.js new file mode 100644 index 000000000..2c9e51933 --- /dev/null +++ b/structTAT_1_1mdspan_1_1iterator__general.js @@ -0,0 +1,13 @@ +var structTAT_1_1mdspan_1_1iterator__general = +[ + [ "iterator_general", "structTAT_1_1mdspan_1_1iterator__general.html#a6184b04e5959336f1702a5c6ac53f5ba", null ], + [ "operator!=", "structTAT_1_1mdspan_1_1iterator__general.html#ab425956ff519fc69ea29eea5fe427e83", null ], + [ "operator*", "structTAT_1_1mdspan_1_1iterator__general.html#a1f6d8ccb3bff48efd86257dc9a2c48fc", null ], + [ "operator++", "structTAT_1_1mdspan_1_1iterator__general.html#ac569612588a09da47b633c687b4d486a", null ], + [ "operator->", "structTAT_1_1mdspan_1_1iterator__general.html#a839ad7b3b0d0b9303c419ff59b6e60a2", null ], + [ "operator==", "structTAT_1_1mdspan_1_1iterator__general.html#a9c9f0840d4947cd617288c191c2cd92a", null ], + [ "indices", "structTAT_1_1mdspan_1_1iterator__general.html#a32feec78529b00ef6a79740bcb469908", null ], + [ "offset", "structTAT_1_1mdspan_1_1iterator__general.html#a83d0985972256d662560332ed09b1426", null ], + [ "owner", "structTAT_1_1mdspan_1_1iterator__general.html#ac93c810cfe1a47bc938e850f84464739", null ], + [ "valid", "structTAT_1_1mdspan_1_1iterator__general.html#a7f4ca3e2676b21ab533047c89743ea4c", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1mpi__one__output__stream-members.html b/structTAT_1_1mpi__one__output__stream-members.html new file mode 100644 index 000000000..bdb38abc0 --- /dev/null +++ b/structTAT_1_1mpi__one__output__stream-members.html @@ -0,0 +1,109 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::mpi_one_output_stream Member List
    +
    +
    + +

    This is the complete list of members for TAT::mpi_one_output_stream, including all inherited members.

    + + + + + + + + +
    mpi_one_output_stream(std::ostream &out, bool valid) (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_streaminline
    operator<<(const Type &value) & (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_streaminline
    operator<<(const Type &value) && (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_streaminline
    out (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_stream
    string (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_stream
    valid (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_stream
    ~mpi_one_output_stream() (defined in TAT::mpi_one_output_stream)TAT::mpi_one_output_streaminline
    +
    + + + + diff --git a/structTAT_1_1mpi__one__output__stream.html b/structTAT_1_1mpi__one__output__stream.html new file mode 100644 index 000000000..b37cc9073 --- /dev/null +++ b/structTAT_1_1mpi__one__output__stream.html @@ -0,0 +1,141 @@ + + + + + + + +TAT: TAT::mpi_one_output_stream Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::mpi_one_output_stream Struct Reference
    +
    +
    + +

    Wrapper for ostream, the stream will only output in the rank which is specified when creating. + More...

    + +

    #include <mpi.hpp>

    + + + + + + + + + + +

    +Public Member Functions

    mpi_one_output_stream (std::ostream &out, bool valid)
     
    +template<typename Type >
    mpi_one_output_streamoperator<< (const Type &value) &
     
    +template<typename Type >
    mpi_one_output_stream && operator<< (const Type &value) &&
     
    + + + + + + + +

    +Public Attributes

    +std::ostream & out
     
    +bool valid
     
    +std::ostringstream string
     
    +

    Detailed Description

    +

    Wrapper for ostream, the stream will only output in the rank which is specified when creating.

    +

    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/mpi.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1mpi__one__output__stream.js b/structTAT_1_1mpi__one__output__stream.js new file mode 100644 index 000000000..975892b6b --- /dev/null +++ b/structTAT_1_1mpi__one__output__stream.js @@ -0,0 +1,10 @@ +var structTAT_1_1mpi__one__output__stream = +[ + [ "~mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html#a85fc5ce8eedb448901da1f51e8fcccbf", null ], + [ "mpi_one_output_stream", "structTAT_1_1mpi__one__output__stream.html#a529930fee0a0397aec90721eddf57e34", null ], + [ "operator<<", "structTAT_1_1mpi__one__output__stream.html#aa6dfb74a98a7da3a6d490aa5984717fb", null ], + [ "operator<<", "structTAT_1_1mpi__one__output__stream.html#a2de25d92b8f2630d5d5c28173e9f532e", null ], + [ "out", "structTAT_1_1mpi__one__output__stream.html#abd063d64b4205b68b16b80262462b008", null ], + [ "string", "structTAT_1_1mpi__one__output__stream.html#a94f573d99110b1ad808e9a1e20fa312b", null ], + [ "valid", "structTAT_1_1mpi__one__output__stream.html#ad652e66fdad439222f6956066328c686", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1mpi__rank__output__stream-members.html b/structTAT_1_1mpi__rank__output__stream-members.html new file mode 100644 index 000000000..396a5243c --- /dev/null +++ b/structTAT_1_1mpi__rank__output__stream-members.html @@ -0,0 +1,108 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::mpi_rank_output_stream Member List
    +
    +
    + +

    This is the complete list of members for TAT::mpi_rank_output_stream, including all inherited members.

    + + + + + + + +
    mpi_rank_output_stream(std::ostream &out, int rank) (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_streaminline
    operator<<(const Type &value) & (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_streaminline
    operator<<(const Type &value) && (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_streaminline
    out (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_stream
    string (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_stream
    ~mpi_rank_output_stream() (defined in TAT::mpi_rank_output_stream)TAT::mpi_rank_output_streaminline
    +
    + + + + diff --git a/structTAT_1_1mpi__rank__output__stream.html b/structTAT_1_1mpi__rank__output__stream.html new file mode 100644 index 000000000..ee39adbc3 --- /dev/null +++ b/structTAT_1_1mpi__rank__output__stream.html @@ -0,0 +1,138 @@ + + + + + + + +TAT: TAT::mpi_rank_output_stream Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::mpi_rank_output_stream Struct Reference
    +
    +
    + +

    Wrapper for ostream, the stream will output the rank which is psecified when creating. + More...

    + +

    #include <mpi.hpp>

    + + + + + + + + + + +

    +Public Member Functions

    mpi_rank_output_stream (std::ostream &out, int rank)
     
    +template<typename Type >
    mpi_rank_output_streamoperator<< (const Type &value) &
     
    +template<typename Type >
    mpi_rank_output_stream && operator<< (const Type &value) &&
     
    + + + + + +

    +Public Attributes

    +std::ostream & out
     
    +std::ostringstream string
     
    +

    Detailed Description

    +

    Wrapper for ostream, the stream will output the rank which is psecified when creating.

    +

    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/mpi.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1mpi__rank__output__stream.js b/structTAT_1_1mpi__rank__output__stream.js new file mode 100644 index 000000000..c79535736 --- /dev/null +++ b/structTAT_1_1mpi__rank__output__stream.js @@ -0,0 +1,9 @@ +var structTAT_1_1mpi__rank__output__stream = +[ + [ "~mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html#a6bf90dd7295dbd0f55a6378a2bddacf6", null ], + [ "mpi_rank_output_stream", "structTAT_1_1mpi__rank__output__stream.html#a39986f518b6c9bf2a481e84b097e403b", null ], + [ "operator<<", "structTAT_1_1mpi__rank__output__stream.html#a0eefb6d8478c408f66879e5ca7c1bf2c", null ], + [ "operator<<", "structTAT_1_1mpi__rank__output__stream.html#a29fc681783fa6de8299e3b3953e0a7f1", null ], + [ "out", "structTAT_1_1mpi__rank__output__stream.html#a6d345133112c7efa97f3a40f0854a7f8", null ], + [ "string", "structTAT_1_1mpi__rank__output__stream.html#ad12e22bc84dd141a6912b70997d4cade", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1mpi__t-members.html b/structTAT_1_1mpi__t-members.html new file mode 100644 index 000000000..94cd40782 --- /dev/null +++ b/structTAT_1_1mpi__t-members.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::mpi_t Member List
    +
    +
    + +

    This is the complete list of members for TAT::mpi_t, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + +
    barrier() (defined in TAT::mpi_t)TAT::mpi_tinlinestatic
    broadcast(const Type &value, const int root) const (defined in TAT::mpi_t)TAT::mpi_tinline
    enabled (defined in TAT::mpi_t)TAT::mpi_tstatic
    err_one(int rank_specified=0) (defined in TAT::mpi_t)TAT::mpi_tinline
    err_rank() (defined in TAT::mpi_t)TAT::mpi_tinline
    finalized() (defined in TAT::mpi_t)TAT::mpi_tinlinestatic
    initialized() (defined in TAT::mpi_t)TAT::mpi_tinlinestatic
    log_one(int rank_specified=0) (defined in TAT::mpi_t)TAT::mpi_tinline
    log_rank() (defined in TAT::mpi_t)TAT::mpi_tinline
    mpi_t() (defined in TAT::mpi_t)TAT::mpi_tinline
    mpi_tag (defined in TAT::mpi_t)TAT::mpi_tstatic
    out_one(int rank_specified=0) (defined in TAT::mpi_t)TAT::mpi_tinline
    out_rank() (defined in TAT::mpi_t)TAT::mpi_tinline
    rank (defined in TAT::mpi_t)TAT::mpi_t
    receive(const int source) (defined in TAT::mpi_t)TAT::mpi_tinlinestatic
    reduce(const Type &value, const int root, Func &&function) const (defined in TAT::mpi_t)TAT::mpi_tinline
    send(const Type &value, const int destination) (defined in TAT::mpi_t)TAT::mpi_tinlinestatic
    send_receive(const Type &value, const int source, const int destination) const (defined in TAT::mpi_t)TAT::mpi_tinline
    size (defined in TAT::mpi_t)TAT::mpi_t
    ~mpi_t() (defined in TAT::mpi_t)TAT::mpi_tinline
    +
    + + + + diff --git a/structTAT_1_1mpi__t.html b/structTAT_1_1mpi__t.html new file mode 100644 index 000000000..12fcf5594 --- /dev/null +++ b/structTAT_1_1mpi__t.html @@ -0,0 +1,190 @@ + + + + + + + +TAT: TAT::mpi_t Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + + +
    + +

    MPI handler type. + More...

    + +

    #include <mpi.hpp>

    + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    +template<typename Type , typename = std::enable_if_t<serializable<Type>>>
    Type send_receive (const Type &value, const int source, const int destination) const
     
    +template<typename Type , typename = std::enable_if_t<serializable<Type>>>
    Type broadcast (const Type &value, const int root) const
     
    +template<typename Type , typename Func , typename = std::enable_if_t<serializable<Type> && std::is_invocable_r_v<Type, Func, Type, Type>>>
    Type reduce (const Type &value, const int root, Func &&function) const
     
    +auto out_one (int rank_specified=0)
     
    +auto log_one (int rank_specified=0)
     
    +auto err_one (int rank_specified=0)
     
    +auto out_rank ()
     
    +auto log_rank ()
     
    +auto err_rank ()
     
    + + + + + + + + + + + + + +

    +Static Public Member Functions

    +static bool initialized ()
     
    +static bool finalized ()
     
    +static void barrier ()
     
    +template<typename Type , typename = std::enable_if_t<serializable<Type>>>
    static void send (const Type &value, const int destination)
     
    +template<typename Type , typename = std::enable_if_t<serializable<Type>>>
    static Type receive (const int source)
     
    + + + + + +

    +Public Attributes

    +int size = 1
     
    +int rank = 0
     
    + + + + + +

    +Static Public Attributes

    +static constexpr bool enabled = true
     
    +static constexpr int mpi_tag = 0
     
    +

    Detailed Description

    +

    MPI handler type.

    +

    It will call MPI_Init and MPI_Finalize automatically, and get size and rank information. It also supply ostream related to mpi rank

    +
    Note
    creating multiple MPI handler will not crash the program
    +

    The documentation for this struct was generated from the following file:
      +
    • include/TAT/miscellaneous/mpi.hpp
    • +
    +
    +
    + + + + diff --git a/structTAT_1_1mpi__t.js b/structTAT_1_1mpi__t.js new file mode 100644 index 000000000..3e0c19563 --- /dev/null +++ b/structTAT_1_1mpi__t.js @@ -0,0 +1,23 @@ +var structTAT_1_1mpi__t = +[ + [ "mpi_t", "structTAT_1_1mpi__t.html#a0a40978ff07deb5166e5bdf4698a23ca", null ], + [ "~mpi_t", "structTAT_1_1mpi__t.html#a56a2d405b16dc9989d9be2042100944a", null ], + [ "barrier", "structTAT_1_1mpi__t.html#a220ca4b638ab2d027855479bf85a945f", null ], + [ "broadcast", "structTAT_1_1mpi__t.html#adf48e42530d44eafe9030b5cdcf65e78", null ], + [ "err_one", "structTAT_1_1mpi__t.html#a25c432a1addc0b0e18838d2cd733bcaa", null ], + [ "err_rank", "structTAT_1_1mpi__t.html#a736343318c74e46d68d82a9b5c80abb7", null ], + [ "finalized", "structTAT_1_1mpi__t.html#a1d82bd3e3da5f5e001d248305837eb47", null ], + [ "initialized", "structTAT_1_1mpi__t.html#a41625eba8fa98a56deefdd4e1a88087a", null ], + [ "log_one", "structTAT_1_1mpi__t.html#afff3c1a61ecf5785480e7a7c95df0d66", null ], + [ "log_rank", "structTAT_1_1mpi__t.html#ae05b85b20f19b97c65e9352a8f512f75", null ], + [ "out_one", "structTAT_1_1mpi__t.html#aed5ce907b04b40e54a8fe01d1528ad7b", null ], + [ "out_rank", "structTAT_1_1mpi__t.html#a010af9cba7735422b2131964ffd22e6c", null ], + [ "receive", "structTAT_1_1mpi__t.html#aebb8d56342cd6d69a9dc3699a214ae17", null ], + [ "reduce", "structTAT_1_1mpi__t.html#a4cefbe5071669d456aead6da765eef10", null ], + [ "send", "structTAT_1_1mpi__t.html#a82a533bb47b215381132133881da5df9", null ], + [ "send_receive", "structTAT_1_1mpi__t.html#a0558cc54b386b93a441edfa307f45916", null ], + [ "enabled", "structTAT_1_1mpi__t.html#a74b3f186e220639e37024cf512b79b73", null ], + [ "mpi_tag", "structTAT_1_1mpi__t.html#add76ab46d3f30e5cc8334006817fed84", null ], + [ "rank", "structTAT_1_1mpi__t.html#a06768cd4b932c95403bf26c225fc5172", null ], + [ "size", "structTAT_1_1mpi__t.html#a3d9e7a6e5ad99811c8c8e741e3dfa66c", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1overloaded.html b/structTAT_1_1overloaded.html new file mode 100644 index 000000000..49335af5b --- /dev/null +++ b/structTAT_1_1overloaded.html @@ -0,0 +1,109 @@ + + + + + + + +TAT: TAT::overloaded< Fs > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::overloaded< Fs > Struct Template Reference
    +
    +
    +
    +Inheritance diagram for TAT::overloaded< Fs >:
    +
    +
    + +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1overloaded.png b/structTAT_1_1overloaded.png new file mode 100644 index 0000000000000000000000000000000000000000..0e08d3b9cd6b03f62b59a89b34cb4fa3bdd7ee6a GIT binary patch literal 515 zcmeAS@N?(olHy`uVBq!ia0vp^{XiVR!3-qDuU?A=QW60^A+G=b{|7Q(y!l$%e`o@b z1;z&s9ANFdBM;1AhgSVq8$V5=NWnKPH+{XKu{VpFXQqa{XO|`r&-@sfe`v9F&-RHbXALChe|6th ze$0Q8$wBtoWldiuo&US{`@8i|GlPYr_g_AK^?b>_xX(AW%w6~W3YmN5^YqW9Z$JP2 zC0YBc>R;AAm6ys>`c;m?u*w%h^q<{kQ3}(y=H8f9XY|FA_tL@Tb8mjSHZS?}jSp`gTfKMtS8_e??%g-~^Z#D% z^tZQ(etfm|Z%<|Mw#Dbea^2_K+S}FYb^9IZ-*txN=PkaswZB4G?ZN|#eZvdWzrJY} zJM#QidcEx9&ohBuzI82@@2>r-hjqHo_dl;={8J2dA&^pA*grE;u8tviZ+NxSwUgTe~DWM4fka_St literal 0 HcmV?d00001 diff --git a/structTAT_1_1remove__cvref-members.html b/structTAT_1_1remove__cvref-members.html new file mode 100644 index 000000000..ee623a291 --- /dev/null +++ b/structTAT_1_1remove__cvref-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::remove_cvref< T > Member List
    +
    +
    + +

    This is the complete list of members for TAT::remove_cvref< T >, including all inherited members.

    + + +
    type typedef (defined in TAT::remove_cvref< T >)TAT::remove_cvref< T >
    +
    + + + + diff --git a/structTAT_1_1remove__cvref.html b/structTAT_1_1remove__cvref.html new file mode 100644 index 000000000..b07c32d33 --- /dev/null +++ b/structTAT_1_1remove__cvref.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: TAT::remove_cvref< T > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::remove_cvref< T > Struct Template Reference
    +
    +
    + + + + +

    +Public Types

    +using type = std::remove_cv_t< std::remove_reference_t< T > >
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1remove__cvref.js b/structTAT_1_1remove__cvref.js new file mode 100644 index 000000000..61eaa396e --- /dev/null +++ b/structTAT_1_1remove__cvref.js @@ -0,0 +1,4 @@ +var structTAT_1_1remove__cvref = +[ + [ "type", "structTAT_1_1remove__cvref.html#a87ed8fd07da40923a9e1b68408409e47", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1scope__resource-members.html b/structTAT_1_1scope__resource-members.html new file mode 100644 index 000000000..c69d1bdba --- /dev/null +++ b/structTAT_1_1scope__resource-members.html @@ -0,0 +1,107 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::scope_resource Member List
    +
    +
    + +

    This is the complete list of members for TAT::scope_resource, including all inherited members.

    + + + + + + +
    buffer (defined in TAT::scope_resource)TAT::scope_resource
    resource (defined in TAT::scope_resource)TAT::scope_resource
    scope_resource(std::size_t size=default_buffer_size) (defined in TAT::scope_resource)TAT::scope_resourceinline
    upstream (defined in TAT::scope_resource)TAT::scope_resource
    ~scope_resource() (defined in TAT::scope_resource)TAT::scope_resourceinline
    +
    + + + + diff --git a/structTAT_1_1scope__resource.html b/structTAT_1_1scope__resource.html new file mode 100644 index 000000000..12668c74b --- /dev/null +++ b/structTAT_1_1scope__resource.html @@ -0,0 +1,126 @@ + + + + + + + +TAT: TAT::scope_resource Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::scope_resource Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    scope_resource (std::size_t size=default_buffer_size)
     
    + + + + + + + +

    +Public Attributes

    +std::byte * buffer
     
    +detail::monotonic_buffer_resource resource
     
    +detail::memory_resource * upstream
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1scope__resource.js b/structTAT_1_1scope__resource.js new file mode 100644 index 000000000..c617853c9 --- /dev/null +++ b/structTAT_1_1scope__resource.js @@ -0,0 +1,8 @@ +var structTAT_1_1scope__resource = +[ + [ "scope_resource", "structTAT_1_1scope__resource.html#a893b96a35a8ce620e545fb8a10ccb91a", null ], + [ "~scope_resource", "structTAT_1_1scope__resource.html#a780982f8e68ad04eb565dcc48e267972", null ], + [ "buffer", "structTAT_1_1scope__resource.html#aa491970e90fc7314d6ff9fc096400248", null ], + [ "resource", "structTAT_1_1scope__resource.html#aeebd8e7b02131dbf194e47ccac8bb176", null ], + [ "upstream", "structTAT_1_1scope__resource.html#a685042578b5ce1e1d78eca06469ae146", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1timer-members.html b/structTAT_1_1timer-members.html new file mode 100644 index 000000000..97af632b2 --- /dev/null +++ b/structTAT_1_1timer-members.html @@ -0,0 +1,104 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::timer Member List
    +
    +
    + +

    This is the complete list of members for TAT::timer, including all inherited members.

    + + + +
    operator()() (defined in TAT::timer)TAT::timerinline
    timer(const char *) (defined in TAT::timer)TAT::timerinline
    +
    + + + + diff --git a/structTAT_1_1timer.html b/structTAT_1_1timer.html new file mode 100644 index 000000000..935bcb5d4 --- /dev/null +++ b/structTAT_1_1timer.html @@ -0,0 +1,122 @@ + + + + + + + +TAT: TAT::timer Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::timer Struct Reference
    +
    +
    + + + + +

    +Classes

    struct  timer_guard
     
    + + + + + +

    +Public Member Functions

    +auto operator() ()
     
    timer (const char *)
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1timer.js b/structTAT_1_1timer.js new file mode 100644 index 000000000..44583c041 --- /dev/null +++ b/structTAT_1_1timer.js @@ -0,0 +1,6 @@ +var structTAT_1_1timer = +[ + [ "timer_guard", "structTAT_1_1timer_1_1timer__guard.html", null ], + [ "timer", "structTAT_1_1timer.html#a66b780327de3b8102bc1d33f6d8ccf14", null ], + [ "operator()", "structTAT_1_1timer.html#ad2bd64b4e05c23f913d9df7a0831a4b8", null ] +]; \ No newline at end of file diff --git a/structTAT_1_1timer_1_1timer__guard.html b/structTAT_1_1timer_1_1timer__guard.html new file mode 100644 index 000000000..eb43bdc7d --- /dev/null +++ b/structTAT_1_1timer_1_1timer__guard.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: TAT::timer::timer_guard Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::timer::timer_guard Struct Reference
    +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1type__identity-members.html b/structTAT_1_1type__identity-members.html new file mode 100644 index 000000000..d546582ea --- /dev/null +++ b/structTAT_1_1type__identity-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    TAT::type_identity< T > Member List
    +
    +
    + +

    This is the complete list of members for TAT::type_identity< T >, including all inherited members.

    + + +
    type typedef (defined in TAT::type_identity< T >)TAT::type_identity< T >
    +
    + + + + diff --git a/structTAT_1_1type__identity.html b/structTAT_1_1type__identity.html new file mode 100644 index 000000000..04c416a5d --- /dev/null +++ b/structTAT_1_1type__identity.html @@ -0,0 +1,115 @@ + + + + + + + +TAT: TAT::type_identity< T > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    TAT::type_identity< T > Struct Template Reference
    +
    +
    + +

    Inherited by TAT::detail::symmetry_unwrap_helper< T >, and TAT::detail::symmetry_unwrap_helper< fermi< T > >.

    + + + + +

    +Public Types

    +using type = T
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structTAT_1_1type__identity.js b/structTAT_1_1type__identity.js new file mode 100644 index 000000000..5d96a40be --- /dev/null +++ b/structTAT_1_1type__identity.js @@ -0,0 +1,4 @@ +var structTAT_1_1type__identity = +[ + [ "type", "structTAT_1_1type__identity.html#a5810ca4aa498241dbc8b4e1829c94583", null ] +]; \ No newline at end of file diff --git a/structstd_1_1hash_3_01TAT_1_1FastName_01_4-members.html b/structstd_1_1hash_3_01TAT_1_1FastName_01_4-members.html new file mode 100644 index 000000000..9409320cb --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1FastName_01_4-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    std::hash< TAT::FastName > Member List
    +
    +
    + +

    This is the complete list of members for std::hash< TAT::FastName >, including all inherited members.

    + + +
    operator()(const TAT::FastName &name) const (defined in std::hash< TAT::FastName >)std::hash< TAT::FastName >inline
    +
    + + + + diff --git a/structstd_1_1hash_3_01TAT_1_1FastName_01_4.html b/structstd_1_1hash_3_01TAT_1_1FastName_01_4.html new file mode 100644 index 000000000..52735cfe2 --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1FastName_01_4.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: std::hash< TAT::FastName > Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    std::hash< TAT::FastName > Struct Reference
    +
    +
    + + + + +

    +Public Member Functions

    +size_t operator() (const TAT::FastName &name) const
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structstd_1_1hash_3_01TAT_1_1FastName_01_4.js b/structstd_1_1hash_3_01TAT_1_1FastName_01_4.js new file mode 100644 index 000000000..992776305 --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1FastName_01_4.js @@ -0,0 +1,4 @@ +var structstd_1_1hash_3_01TAT_1_1FastName_01_4 = +[ + [ "operator()", "structstd_1_1hash_3_01TAT_1_1FastName_01_4.html#ae023ca8072e92c7988037769210b26ca", null ] +]; \ No newline at end of file diff --git a/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4-members.html b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4-members.html new file mode 100644 index 000000000..afbb7481e --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    std::hash< TAT::Symmetry< T... > > Member List
    +
    +
    + +

    This is the complete list of members for std::hash< TAT::Symmetry< T... > >, including all inherited members.

    + + +
    operator()(const TAT::Symmetry< T... > &symmetry) const (defined in std::hash< TAT::Symmetry< T... > >)std::hash< TAT::Symmetry< T... > >inline
    +
    + + + + diff --git a/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html new file mode 100644 index 000000000..d135404f8 --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: std::hash< TAT::Symmetry< T... > > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    std::hash< TAT::Symmetry< T... > > Struct Template Reference
    +
    +
    + + + + +

    +Public Member Functions

    +size_t operator() (const TAT::Symmetry< T... > &symmetry) const
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.js b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.js new file mode 100644 index 000000000..41e01ecd2 --- /dev/null +++ b/structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.js @@ -0,0 +1,4 @@ +var structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4 = +[ + [ "operator()", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html#ae7d04971a08d057db9a66824c91fbbaa", null ] +]; \ No newline at end of file diff --git a/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4-members.html b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4-members.html new file mode 100644 index 000000000..d9bf7ccb8 --- /dev/null +++ b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4-members.html @@ -0,0 +1,103 @@ + + + + + + + +TAT: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    std::hash< pair< Name, Name > > Member List
    +
    +
    + +

    This is the complete list of members for std::hash< pair< Name, Name > >, including all inherited members.

    + + +
    operator()(const pair< Name, Name > &names) const (defined in std::hash< pair< Name, Name > >)std::hash< pair< Name, Name > >inline
    +
    + + + + diff --git a/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html new file mode 100644 index 000000000..29f93cb19 --- /dev/null +++ b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html @@ -0,0 +1,113 @@ + + + + + + + +TAT: std::hash< pair< Name, Name > > Struct Template Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    std::hash< pair< Name, Name > > Struct Template Reference
    +
    +
    + + + + +

    +Public Member Functions

    +size_t operator() (const pair< Name, Name > &names) const
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.js b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.js new file mode 100644 index 000000000..9aa09a13e --- /dev/null +++ b/structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.js @@ -0,0 +1,4 @@ +var structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4 = +[ + [ "operator()", "structstd_1_1hash_3_01pair_3_01Name_00_01Name_01_4_01_4.html#af26888002a8b727fb5ddb45d7456b421", null ] +]; \ No newline at end of file diff --git a/svd_8hpp.html b/svd_8hpp.html new file mode 100644 index 000000000..2e51d4eac --- /dev/null +++ b/svd_8hpp.html @@ -0,0 +1,178 @@ + + + + + + + +TAT: include/TAT/implement/svd.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    svd.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <variant>
    +#include "../structure/tensor.hpp"
    +#include "../utility/allocator.hpp"
    +#include "../utility/timer.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +int sgesvd_ (const char *job_u, const char *job_vt, const int *m, const int *n, float *a, const int *ld_a, float *s, float *u, const int *ld_u, float *vt, const int *ld_vt, float *work, const int *lwork, int *info)
     
    +int dgesvd_ (const char *job_u, const char *job_vt, const int *m, const int *n, double *a, const int *ld_a, double *s, double *u, const int *ld_u, double *vt, const int *ld_vt, double *work, const int *lwork, int *info)
     
    +int cgesvd_ (const char *job_u, const char *job_vt, const int *m, const int *n, std::complex< float > *a, const int *ld_a, float *s, std::complex< float > *u, const int *ld_u, std::complex< float > *vt, const int *ld_vt, std::complex< float > *work, const int *lwork, float *rwork, int *info)
     
    +int zgesvd_ (const char *job_u, const char *job_vt, const int *m, const int *n, std::complex< double > *a, const int *ld_a, double *s, std::complex< double > *u, const int *ld_u, std::complex< double > *vt, const int *ld_vt, std::complex< double > *work, const int *lwork, double *rwork, int *info)
     
    +template<typename ScalarType >
    void TAT::detail::calculate_svd_kernel (const int &m, const int &n, const int &min, ScalarType *a, ScalarType *u, real_scalar< ScalarType > *s, ScalarType *vt)
     
    +template<>
    void TAT::detail::calculate_svd_kernel< float > (const int &m, const int &n, const int &min, float *a, float *u, float *s, float *vt)
     
    +template<>
    void TAT::detail::calculate_svd_kernel< double > (const int &m, const int &n, const int &min, double *a, double *u, double *s, double *vt)
     
    +template<>
    void TAT::detail::calculate_svd_kernel< std::complex< float > > (const int &m, const int &n, const int &min, std::complex< float > *a, std::complex< float > *u, float *s, std::complex< float > *vt)
     
    +template<>
    void TAT::detail::calculate_svd_kernel< std::complex< double > > (const int &m, const int &n, const int &min, std::complex< double > *a, std::complex< double > *u, double *s, std::complex< double > *vt)
     
    +template<typename ScalarType >
    void TAT::detail::calculate_svd (const int &m, const int &n, const int &min, ScalarType *a, ScalarType *u, real_scalar< ScalarType > *s, ScalarType *vt)
     
    +template<typename ScalarType , typename Symmetry , typename Name , typename SingularValue >
    Tensor< ScalarType, Symmetry, Name > TAT::detail::singular_to_tensor (const SingularValue &singular, const Name &singular_name_u, const Name &singular_name_v, const bool put_v_right)
     
    + + + + + +

    +Variables

    +timer TAT::svd_kernel_guard ("svd_kernel")
     
    +timer TAT::svd_guard ("svd")
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/svd_8hpp.js b/svd_8hpp.js new file mode 100644 index 000000000..224c9c162 --- /dev/null +++ b/svd_8hpp.js @@ -0,0 +1,17 @@ +var svd_8hpp = +[ + [ "TAT_SVD_HPP", "svd_8hpp.html#a0c4776472d6cd83278f45897deee20c4", null ], + [ "calculate_svd", "svd_8hpp.html#a8ee272a620a6c18cad9ac926ab4e4d76", null ], + [ "calculate_svd_kernel", "svd_8hpp.html#a4bb1d50acc412ebc98a944716ea07614", null ], + [ "calculate_svd_kernel< double >", "svd_8hpp.html#ab75e7b09e352b453f88ac0fd2419f626", null ], + [ "calculate_svd_kernel< float >", "svd_8hpp.html#a154cec59ab5b376f018b0bbfc808e945", null ], + [ "calculate_svd_kernel< std::complex< double > >", "svd_8hpp.html#a52023b2357f3418bec18e6ac21c9dd64", null ], + [ "calculate_svd_kernel< std::complex< float > >", "svd_8hpp.html#a15182441a849d1bfc7fac3709483865d", null ], + [ "cgesvd_", "svd_8hpp.html#a027af1925210893cf6afcd18339a2a09", null ], + [ "dgesvd_", "svd_8hpp.html#af5707a096f7ce9475d7c13269a811ad5", null ], + [ "sgesvd_", "svd_8hpp.html#a5d9d052b6ad700f30da6b66d41801526", null ], + [ "singular_to_tensor", "svd_8hpp.html#a2b184468a1433cbc160547bd680d5839", null ], + [ "zgesvd_", "svd_8hpp.html#a56e1ae99137c882049e03d0c287e0615", null ], + [ "svd_guard", "svd_8hpp.html#a5b2976cd695c711243a32430788fbea7", null ], + [ "svd_kernel_guard", "svd_8hpp.html#a37f97a54937a6075ee0a69e7f5de92c5", null ] +]; \ No newline at end of file diff --git a/svd_8hpp_source.html b/svd_8hpp_source.html new file mode 100644 index 000000000..4963527c1 --- /dev/null +++ b/svd_8hpp_source.html @@ -0,0 +1,635 @@ + + + + + + + +TAT: include/TAT/implement/svd.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    svd.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SVD_HPP
    +
    22 #define TAT_SVD_HPP
    +
    23 
    +
    24 #include <variant>
    +
    25 
    +
    26 #include "../structure/tensor.hpp"
    +
    27 #include "../utility/allocator.hpp"
    +
    28 #include "../utility/timer.hpp"
    +
    29 
    +
    30 extern "C" {
    +
    31  int sgesvd_(
    +
    32  const char* job_u,
    +
    33  const char* job_vt,
    +
    34  const int* m,
    +
    35  const int* n,
    +
    36  float* a,
    +
    37  const int* ld_a,
    +
    38  float* s,
    +
    39  float* u,
    +
    40  const int* ld_u,
    +
    41  float* vt,
    +
    42  const int* ld_vt,
    +
    43  float* work,
    +
    44  const int* lwork,
    +
    45  int* info
    +
    46  );
    +
    47  int dgesvd_(
    +
    48  const char* job_u,
    +
    49  const char* job_vt,
    +
    50  const int* m,
    +
    51  const int* n,
    +
    52  double* a,
    +
    53  const int* ld_a,
    +
    54  double* s,
    +
    55  double* u,
    +
    56  const int* ld_u,
    +
    57  double* vt,
    +
    58  const int* ld_vt,
    +
    59  double* work,
    +
    60  const int* lwork,
    +
    61  int* info
    +
    62  );
    +
    63  int cgesvd_(
    +
    64  const char* job_u,
    +
    65  const char* job_vt,
    +
    66  const int* m,
    +
    67  const int* n,
    +
    68  std::complex<float>* a,
    +
    69  const int* ld_a,
    +
    70  float* s,
    +
    71  std::complex<float>* u,
    +
    72  const int* ld_u,
    +
    73  std::complex<float>* vt,
    +
    74  const int* ld_vt,
    +
    75  std::complex<float>* work,
    +
    76  const int* lwork,
    +
    77  float* rwork,
    +
    78  int* info
    +
    79  );
    +
    80  int zgesvd_(
    +
    81  const char* job_u,
    +
    82  const char* job_vt,
    +
    83  const int* m,
    +
    84  const int* n,
    +
    85  std::complex<double>* a,
    +
    86  const int* ld_a,
    +
    87  double* s,
    +
    88  std::complex<double>* u,
    +
    89  const int* ld_u,
    +
    90  std::complex<double>* vt,
    +
    91  const int* ld_vt,
    +
    92  std::complex<double>* work,
    +
    93  const int* lwork,
    +
    94  double* rwork,
    +
    95  int* info
    +
    96  );
    +
    97 }
    +
    98 
    +
    99 namespace TAT {
    +
    100 
    +
    101  inline timer svd_kernel_guard("svd_kernel");
    +
    102 
    +
    103  namespace detail {
    +
    104  template<typename ScalarType>
    +
    105  void
    +
    106  calculate_svd_kernel(const int& m, const int& n, const int& min, ScalarType* a, ScalarType* u, real_scalar<ScalarType>* s, ScalarType* vt);
    +
    107 
    +
    108  template<>
    +
    109  inline void calculate_svd_kernel<float>(const int& m, const int& n, const int& min, float* a, float* u, float* s, float* vt) {
    +
    110  int result;
    +
    111  const int lwork_query = -1;
    +
    112  float float_lwork;
    +
    113  sgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, &float_lwork, &lwork_query, &result);
    +
    114  if (result != 0) {
    +
    115  detail::what_if_lapack_error("Error in GESVD");
    +
    116  }
    +
    117  const int lwork = int(float_lwork);
    +
    118  auto work = no_initialize::pmr::vector<float>(lwork);
    +
    119  sgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, work.data(), &lwork, &result);
    +
    120  if (result != 0) {
    +
    121  detail::what_if_lapack_error("Error in GESVD");
    +
    122  }
    +
    123  }
    +
    124  template<>
    +
    125  inline void calculate_svd_kernel<double>(const int& m, const int& n, const int& min, double* a, double* u, double* s, double* vt) {
    +
    126  int result;
    +
    127  const int lwork_query = -1;
    +
    128  double float_lwork;
    +
    129  dgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, &float_lwork, &lwork_query, &result);
    +
    130  if (result != 0) {
    +
    131  detail::what_if_lapack_error("Error in GESVD");
    +
    132  }
    +
    133  const int lwork = int(float_lwork);
    +
    134  auto work = no_initialize::pmr::vector<double>(lwork);
    +
    135  dgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, work.data(), &lwork, &result);
    +
    136  if (result != 0) {
    +
    137  detail::what_if_lapack_error("Error in GESVD");
    +
    138  }
    +
    139  }
    +
    140  template<>
    +
    141  inline void calculate_svd_kernel<std::complex<float>>(
    +
    142  const int& m,
    +
    143  const int& n,
    +
    144  const int& min,
    +
    145  std::complex<float>* a,
    +
    146  std::complex<float>* u,
    +
    147  float* s,
    +
    148  std::complex<float>* vt
    +
    149  ) {
    +
    150  int result;
    +
    151  auto rwork = no_initialize::pmr::vector<float>(5 * min);
    +
    152  const int lwork_query = -1;
    +
    153  std::complex<float> float_lwork;
    +
    154  cgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, &float_lwork, &lwork_query, rwork.data(), &result);
    +
    155  if (result != 0) {
    +
    156  detail::what_if_lapack_error("Error in GESVD");
    +
    157  }
    +
    158  const int lwork = int(float_lwork.real());
    +
    159  auto work = no_initialize::pmr::vector<std::complex<float>>(lwork);
    +
    160  cgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, work.data(), &lwork, rwork.data(), &result);
    +
    161  if (result != 0) {
    +
    162  detail::what_if_lapack_error("Error in GESVD");
    +
    163  }
    +
    164  }
    +
    165  template<>
    +
    166  inline void calculate_svd_kernel<std::complex<double>>(
    +
    167  const int& m,
    +
    168  const int& n,
    +
    169  const int& min,
    +
    170  std::complex<double>* a,
    +
    171  std::complex<double>* u,
    +
    172  double* s,
    +
    173  std::complex<double>* vt
    +
    174  ) {
    +
    175  int result;
    +
    176  auto rwork = no_initialize::pmr::vector<double>(5 * min);
    +
    177  const int lwork_query = -1;
    +
    178  std::complex<double> float_lwork;
    +
    179  zgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, &float_lwork, &lwork_query, rwork.data(), &result);
    +
    180  if (result != 0) {
    +
    181  detail::what_if_lapack_error("Error in GESVD");
    +
    182  }
    +
    183  const int lwork = int(float_lwork.real());
    +
    184  auto work = no_initialize::pmr::vector<std::complex<double>>(lwork);
    +
    185  zgesvd_("S", "S", &n, &m, a, &n, s, vt, &n, u, &min, work.data(), &lwork, rwork.data(), &result);
    +
    186  if (result != 0) {
    +
    187  detail::what_if_lapack_error("Error in GESVD");
    +
    188  }
    +
    189  }
    +
    190 
    +
    191  template<typename ScalarType>
    +
    192  void calculate_svd(const int& m, const int& n, const int& min, ScalarType* a, ScalarType* u, real_scalar<ScalarType>* s, ScalarType* vt) {
    +
    193  auto kernel_guard = svd_kernel_guard();
    +
    194  // after testing: m>n is better than m<n and false, true is obviously worse
    +
    195  if (m > n) {
    +
    196  auto new_a = no_initialize::pmr::vector<ScalarType>(n * m);
    +
    197  auto old_u = no_initialize::pmr::vector<ScalarType>(n * min);
    +
    198  auto old_vt = no_initialize::pmr::vector<ScalarType>(min * m);
    +
    199  // new_a = a^T
    +
    200  // u s vt = a
    +
    201  // vt^T s u^T = a^T
    +
    202  // old_u = vt^T
    +
    203  // old_vt = u^T
    +
    204  matrix_transpose<pmr::vector<Size>>(m, n, a, new_a.data()); // m*n -> n*m
    +
    205  calculate_svd_kernel(n, m, min, new_a.data(), old_u.data(), s, old_vt.data());
    +
    206  matrix_transpose<pmr::vector<Size>>(n, min, old_u.data(), vt); // n*min -> min*n
    +
    207  matrix_transpose<pmr::vector<Size>>(min, m, old_vt.data(), u); // min*m -> m*min
    +
    208  } else {
    +
    209  calculate_svd_kernel(m, n, min, a, u, s, vt);
    +
    210  }
    +
    211  }
    +
    212 
    +
    213  template<typename ScalarType, typename Symmetry, typename Name, typename SingularValue>
    +
    214  Tensor<ScalarType, Symmetry, Name>
    +
    215  singular_to_tensor(const SingularValue& singular, const Name& singular_name_u, const Name& singular_name_v, const bool put_v_right) {
    +
    216  // singular : [(sym, vector<Scalar>)]
    +
    217  // (... U sym true) (-sym false S sym true) (-sym false V ...)
    +
    218  auto segments_u = std::vector<std::pair<Symmetry, Size>>();
    +
    219  auto segments_v = std::vector<std::pair<Symmetry, Size>>();
    +
    220  segments_u.reserve(singular.size());
    +
    221  segments_v.reserve(singular.size());
    +
    222  for (const auto& [symmetry, values] : singular) {
    +
    223  auto dimension = values.size();
    +
    224  segments_u.emplace_back(-symmetry, dimension);
    +
    225  segments_v.emplace_back(symmetry, dimension);
    +
    226  }
    +
    227  auto result = Tensor<ScalarType, Symmetry, Name>(
    +
    228  {singular_name_u, singular_name_v},
    +
    229  {{std::move(segments_u), false}, {std::move(segments_v), true}}
    +
    230  );
    +
    231  result.zero_();
    +
    232  for (const auto& [symmetry, values] : singular) {
    +
    233  const auto* data_source = values.data();
    +
    234  auto* data_destination = result.blocks(pmr::vector<Symmetry>{-symmetry, symmetry}).data();
    +
    235  auto dimension = values.size();
    +
    236  auto dimension_plus_one = dimension + 1;
    +
    237  bool parity = false;
    +
    238  if constexpr (Symmetry::is_fermi_symmetry) {
    +
    239  if (!put_v_right) {
    +
    240  parity = symmetry.parity();
    +
    241  }
    +
    242  }
    +
    243  if (parity) {
    +
    244  for (Size i = 0; i < dimension; i++) {
    +
    245  data_destination[i * dimension_plus_one] = -data_source[i];
    +
    246  }
    +
    247  } else {
    +
    248  for (Size i = 0; i < dimension; i++) {
    +
    249  data_destination[i * dimension_plus_one] = data_source[i];
    +
    250  }
    +
    251  }
    +
    252  }
    +
    253  return result;
    +
    254  }
    +
    255  } // namespace detail
    +
    256 
    +
    257  inline timer svd_guard("svd");
    +
    258 
    +
    259  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    261  const std::unordered_set<Name>& free_names_u,
    +
    262  const Name& common_name_u,
    +
    263  const Name& common_name_v,
    +
    264  const Name& singular_name_u,
    +
    265  const Name& singular_name_v,
    +
    266  Cut cut
    +
    267  ) const {
    +
    268  auto pmr_guard = scope_resource(default_buffer_size);
    +
    269  auto timer_guard = svd_guard();
    +
    270 
    +
    271  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
    +
    272 
    +
    273  if constexpr (debug_mode) {
    +
    274  // check free_name_set_u is valid
    +
    275  for (const auto& name : free_names_u) {
    +
    276  if (auto found = find_by_name(name); found == names().end()) {
    +
    277  detail::error("Missing name in svd");
    +
    278  }
    +
    279  }
    +
    280  }
    +
    281  // now check done
    +
    282 
    +
    283  // merge to matrix
    +
    284  // svd it with generating middle bond
    +
    285  // split original edge
    +
    286 
    +
    287  // merge_plan -> all edge into free_name_u and free_name_v
    +
    288  // and collect reversed edges
    +
    289 
    +
    290  // split and apply reversed edges, and use the free_name_x of merge
    +
    291  // result name is also needed
    +
    292 
    +
    293  // merge
    +
    294  auto free_name_list_u = pmr::vector<Name>(); // merge plan
    +
    295  auto free_name_list_v = pmr::vector<Name>(); // merge plan
    +
    296  auto reversed_names_input = pmr::unordered_set<Name>(unordered_parameter * rank()); // merge plan
    +
    297 
    +
    298  auto reversed_names_u = pmr::unordered_set<Name>(unordered_parameter * rank()); // split plan
    +
    299  auto reversed_names_v = pmr::unordered_set<Name>(unordered_parameter * rank()); // split plan
    +
    300  auto result_names_u = std::vector<Name>(); // split plan
    +
    301  auto result_names_v = std::vector<Name>(); // split plan
    +
    302  auto free_names_and_edges_u = pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>(); // split plan
    +
    303  auto free_names_and_edges_v = pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>(); // split plan
    +
    304 
    +
    305  free_name_list_u.reserve(rank());
    +
    306  free_name_list_v.reserve(rank());
    +
    307  result_names_u.reserve(rank() + 1);
    +
    308  result_names_v.reserve(rank() + 1);
    +
    309  free_names_and_edges_u.reserve(rank());
    +
    310  free_names_and_edges_v.reserve(rank());
    +
    311 
    +
    312  const bool put_v_right = names().empty() || free_names_u.find(names().back()) == free_names_u.end();
    +
    313  // The last names not in free_names_u -> last names in free_names_v -> put v right
    +
    314 
    +
    315  if (put_v_right) {
    +
    316  result_names_v.push_back(common_name_v);
    +
    317  } else {
    +
    318  result_names_u.push_back(common_name_u);
    +
    319  }
    +
    320  for (Rank i = 0; i < rank(); i++) {
    +
    321  const auto& n = names(i);
    +
    322  if (free_names_u.find(n) != free_names_u.end()) {
    +
    323  // U side
    +
    324  free_name_list_u.push_back(n);
    +
    325  result_names_u.push_back(n);
    +
    326  free_names_and_edges_u.push_back({n, {edges(i).segments()}});
    +
    327  if constexpr (is_fermi) {
    +
    328  if (edges(i).arrow()) {
    +
    329  reversed_names_u.insert(n);
    +
    330  reversed_names_input.insert(n);
    +
    331  }
    +
    332  }
    +
    333  } else {
    +
    334  // V side
    +
    335  free_name_list_v.push_back(n);
    +
    336  result_names_v.push_back(n);
    +
    337  free_names_and_edges_v.push_back({n, {edges(i).segments()}});
    +
    338  if constexpr (is_fermi) {
    +
    339  if (edges(i).arrow()) {
    +
    340  reversed_names_v.insert(n);
    +
    341  reversed_names_input.insert(n);
    +
    342  }
    +
    343  }
    +
    344  }
    +
    345  }
    +
    346  if (put_v_right) {
    +
    347  result_names_u.push_back(common_name_u);
    +
    348  } else {
    +
    349  result_names_v.push_back(common_name_v);
    +
    350  }
    +
    351 
    +
    352  auto tensor_merged = edge_operator_implement(
    +
    353  {},
    +
    354  reversed_names_input,
    +
    355  pmr::map<Name, pmr::vector<Name>>{
    +
    356  {InternalName<Name>::SVD_U, std::move(free_name_list_u)},
    +
    357  {InternalName<Name>::SVD_V, std::move(free_name_list_v)}},
    +
    358  put_v_right ? std::vector<Name>{InternalName<Name>::SVD_U, InternalName<Name>::SVD_V} :
    + +
    360  false,
    +
    361  {},
    +
    362  {},
    +
    363  {},
    +
    364  {},
    +
    365  {}
    +
    366  );
    +
    367 
    +
    368  // tensor -> SVD_U -O- SVD_V when put_v_right = true
    +
    369  // or SVD_V -O- SVD_U when put_v_right = false
    +
    370  // put_v_right = true
    +
    371  // SVD_U -O- common_1 . common_2 -O- SVD_V
    +
    372  // put_v_right = false
    +
    373  // SVD_V -O- common_1 . common_1 -O- SVD_U
    +
    374 
    +
    375  const auto& edge_0_input = tensor_merged.edges(0);
    +
    376  const auto& edge_1_input = tensor_merged.edges(1);
    +
    377  // prepare result tensor
    +
    378  auto common_edge_segments_1 = std::vector<std::pair<Symmetry, Size>>();
    +
    379  auto common_edge_segments_2 = std::vector<std::pair<Symmetry, Size>>();
    +
    380  common_edge_segments_1.reserve(edge_0_input.segments_size());
    +
    381  common_edge_segments_2.reserve(edge_0_input.segments_size());
    +
    382  // arrow all false currently, arrow check is processed at the last
    +
    383  for (const auto& [symmetry_0, dimension_0] : edge_0_input.segments()) {
    +
    384  auto symmetry_1 = -symmetry_0;
    +
    385  if (auto found = edge_1_input.find_by_symmetry(symmetry_1); found != edge_1_input.segments().end()) {
    +
    386  // This block does exist
    +
    387  auto m = dimension_0;
    +
    388  auto n = found->second;
    +
    389  auto k = m > n ? n : m;
    +
    390  common_edge_segments_1.emplace_back(symmetry_1, k);
    +
    391  common_edge_segments_2.emplace_back(symmetry_0, k);
    +
    392  }
    +
    393  }
    +
    394  auto tensor_1 = Tensor<ScalarType, Symmetry, Name>{
    +
    395  put_v_right ? std::vector<Name>{InternalName<Name>::SVD_U, common_name_u} : std::vector<Name>{InternalName<Name>::SVD_V, common_name_v},
    +
    396  {tensor_merged.edges(0), std::move(common_edge_segments_1)}};
    +
    397  auto tensor_2 = Tensor<ScalarType, Symmetry, Name>{
    +
    398  put_v_right ? std::vector<Name>{common_name_v, InternalName<Name>::SVD_V} : std::vector<Name>{common_name_u, InternalName<Name>::SVD_U},
    +
    399  {std::move(common_edge_segments_2), tensor_merged.edges(1)}};
    +
    400  auto result_s = pmr::list<std::pair<Symmetry, pmr::vector<real_scalar<ScalarType>>>>(); // use list for easy delete
    +
    401  // const auto& edge_common_1 = tensor_1.edges(1);
    +
    402  const auto& edge_common_2 = tensor_2.edges(0);
    +
    403 
    +
    404  // call lapack
    +
    405  for (const auto& [symmetry, _] : edge_0_input.segments()) {
    +
    406  Size position_0_input = edge_0_input.find_by_symmetry(symmetry) - edge_0_input.segments().begin();
    +
    407  Size position_1_input = edge_1_input.find_by_symmetry(-symmetry) - edge_1_input.segments().begin();
    +
    408  if (position_1_input == edge_1_input.segments_size()) {
    +
    409  continue;
    +
    410  }
    +
    411  Size position_common = edge_common_2.find_by_symmetry(symmetry) - edge_common_2.segments().begin();
    +
    412  const int m = edge_0_input.segments(position_0_input).second;
    +
    413  const int n = edge_1_input.segments(position_1_input).second;
    +
    414  const int k = edge_common_2.segments(position_common).second;
    +
    415 
    +
    416  auto* data_1 = tensor_1.blocks(pmr::vector<Size>{position_0_input, position_common}).data();
    +
    417  auto* data_2 = tensor_2.blocks(pmr::vector<Size>{position_common, position_1_input}).data();
    +
    418  auto* data = tensor_merged.blocks(pmr::vector<Size>{position_0_input, position_1_input}).data();
    +
    419 
    +
    420  auto s = pmr::vector<real_scalar<ScalarType>>(k);
    +
    421  auto* data_s = s.data();
    +
    422 
    +
    423  if (m * n != 0) {
    +
    424  detail::calculate_svd<ScalarType>(m, n, k, data, data_1, data_s, data_2);
    +
    425  }
    +
    426  result_s.emplace_back(put_v_right ? -symmetry : symmetry, std::move(s)); // symmetry of s is always the same to common edge of tensor U
    +
    427  }
    +
    428 
    +
    429  // analyze how to cut
    +
    430  Size total_dimension = 0;
    +
    431  for (const auto& [symmetry, vector_s] : result_s) {
    +
    432  total_dimension += vector_s.size();
    +
    433  }
    +
    434  auto remain_dimension_u = pmr::unordered_map<Symmetry, Size>(unordered_parameter * result_s.size());
    +
    435  auto remain_dimension_v = pmr::unordered_map<Symmetry, Size>(unordered_parameter * result_s.size());
    +
    436 
    +
    437  real_scalar<ScalarType> total_maximum_singular = 0;
    +
    438  for (const auto& [symmetry, vector_s] : result_s) {
    +
    439  for (const auto& this_singular : vector_s) {
    +
    440  if (this_singular > total_maximum_singular) {
    +
    441  total_maximum_singular = this_singular;
    +
    442  }
    +
    443  }
    +
    444  }
    +
    445  const real_scalar<ScalarType> cut_threshold = cut.relative_cut * total_maximum_singular;
    +
    446  const Size remain_cut = cut.remain_cut < total_dimension ? cut.remain_cut : total_dimension;
    +
    447 
    +
    448  for (const auto& [symmetry, vector_s] : result_s) {
    +
    449  remain_dimension_u[symmetry] = 0;
    +
    450  remain_dimension_v[-symmetry] = 0;
    +
    451  }
    +
    452  for (Size i = 0; i < remain_cut; i++) {
    +
    453  Symmetry maximum_symmetry;
    +
    454  real_scalar<ScalarType> maximum_singular = 0;
    +
    455  for (const auto& [symmetry, vector_s] : result_s) {
    +
    456  if (auto& this_remain = remain_dimension_u.at(symmetry); this_remain != vector_s.size()) {
    +
    457  if (auto this_singular = vector_s[this_remain]; this_singular > maximum_singular) {
    +
    458  maximum_singular = this_singular;
    +
    459  maximum_symmetry = symmetry;
    +
    460  }
    +
    461  }
    +
    462  }
    +
    463  if (maximum_singular > cut_threshold) {
    +
    464  // If the singular is too small, do not remain it.
    +
    465  remain_dimension_u.at(maximum_symmetry) += 1;
    +
    466  remain_dimension_v.at(-maximum_symmetry) += 1;
    +
    467  } else {
    +
    468  break;
    +
    469  }
    +
    470  }
    +
    471  // delete element of tensor S
    +
    472  for (auto it = result_s.begin(); it != result_s.end();) {
    +
    473  const auto& symmetry = it->first;
    +
    474  const auto& this_remain = remain_dimension_u.at(symmetry);
    +
    475  if (this_remain == 0) {
    +
    476  it = result_s.erase(it);
    +
    477  } else {
    +
    478  it->second.resize(this_remain);
    +
    479  ++it;
    +
    480  }
    +
    481  }
    +
    482  // cut analyze done
    +
    483 
    +
    484  const auto& tensor_u = put_v_right ? tensor_1 : tensor_2;
    +
    485  const auto& tensor_v = put_v_right ? tensor_2 : tensor_1;
    +
    486  // tensor 1 common edge should be true
    +
    487  // tensor 2 common edge should be false
    +
    488  // S tensor 1 side should be false
    +
    489  // S tensor 2 side should be true
    +
    490 
    +
    491  // if put_v_right, it should be
    +
    492  // (... U sym true) (-sym false S sym true) (-sym false V ...)
    +
    493  // if !put_v_right, it should be
    +
    494  // (... V -sym true) (sym false S -sym true) (sym false U ...)
    +
    495  // which is same to
    +
    496  // (... V -sym false) (sym true S -sym false) (sym true U ...)
    +
    497  // aka (sym true U ...) (sym true v_S_u -sym false) (... V -sym false)
    +
    498  // so always put reverse tensor_u common name
    +
    499  // if put_v_right: (-sym false u_S_v sym true)
    +
    500  // if !put_v_right: (sym true v_S_u -sym false) -> (-sym false u_S_v sym true) with a transpose sign
    +
    501  // -> always set v_edge in s to sym true
    +
    502  if constexpr (is_fermi) {
    +
    503  reversed_names_u.insert(common_name_u);
    +
    504  }
    +
    505  // cut happened here
    +
    506  auto u = tensor_u.edge_operator_implement(
    +
    507  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>{
    +
    508  {InternalName<Name>::SVD_U, std::move(free_names_and_edges_u)}},
    +
    509  reversed_names_u,
    +
    510  {},
    +
    511  std::move(result_names_u),
    +
    512  false,
    +
    513  {},
    +
    514  {},
    +
    515  {},
    +
    516  {},
    +
    517  pmr::map<Name, pmr::unordered_map<Symmetry, Size>>{{common_name_u, std::move(remain_dimension_u)}}
    +
    518  );
    +
    519  auto v = tensor_v.edge_operator_implement(
    +
    520  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>{
    +
    521  {InternalName<Name>::SVD_V, std::move(free_names_and_edges_v)}},
    +
    522  reversed_names_v,
    +
    523  {},
    +
    524  std::move(result_names_v),
    +
    525  false,
    +
    526  {},
    +
    527  {},
    +
    528  {},
    +
    529  {},
    +
    530  pmr::map<Name, pmr::unordered_map<Symmetry, Size>>{{common_name_v, std::move(remain_dimension_v)}}
    +
    531  );
    +
    532  return {
    +
    533  std::move(u),
    +
    534  // it should be noticed that, singular value content of fermi tensor is not always positive,
    +
    535  // since it is not even valid to talk about sign of tensor content for fermi tensor
    +
    536  detail::singular_to_tensor<ScalarType, Symmetry, Name>(result_s, singular_name_u, singular_name_v, put_v_right),
    +
    537  std::move(v)};
    +
    538  }
    +
    539 } // namespace TAT
    +
    540 #endif
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    svd_result svd(const std::unordered_set< Name > &free_names_u, const Name &common_name_u, const Name &common_name_v, const Name &singular_name_u, const Name &singular_name_v, Cut cut=Cut()) const
    Calculate SVD of the tensor.
    Definition: svd.hpp:260
    +
    Definition: edge.hpp:33
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    std::uint16_t Rank
    Tensor rank type.
    Definition: common_variable.hpp:149
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    typename detail::real_scalar_helper< T >::type real_scalar
    Get corresponding real type, used in svd and norm.
    Definition: common_variable.hpp:201
    +
    Used to describle how to cut when doing svd to a tensor.
    Definition: tensor.hpp:53
    +
    For every Name type, some internal name is needed.
    Definition: name.hpp:112
    +
    General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
    Definition: symmetry.hpp:95
    +
    SVD result type.
    Definition: tensor.hpp:929
    +
    Definition: allocator.hpp:295
    +
    +
    + + + + diff --git a/symmetry_8hpp.html b/symmetry_8hpp.html new file mode 100644 index 000000000..e3cf2c8b3 --- /dev/null +++ b/symmetry_8hpp.html @@ -0,0 +1,200 @@ + + + + + + + +TAT: include/TAT/structure/symmetry.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    symmetry.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <tuple>
    +#include <utility>
    +#include "../utility/common_variable.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + +

    +Classes

    struct  TAT::fermi< T >
     
    struct  TAT::Symmetry< T >
     General symmetry type, used to mark edge index the different transform rule when some symmetric operation is applied. More...
     
    struct  std::hash< TAT::Symmetry< T... > >
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Typedefs

    +template<typename T >
    using TAT::bose = T
     
    +template<typename T >
    using TAT::detail::symmetry_unwrap = typename symmetry_unwrap_helper< T >::type
     
    using TAT::Z2 = bool
     Z2 Symmetry. More...
     
    using TAT::U1 = std::int32_t
     U1 symmetry. More...
     
    +using TAT::NoSymmetry = Symmetry<>
     
    +using TAT::Z2Symmetry = Symmetry< bose< Z2 > >
     
    +using TAT::U1Symmetry = Symmetry< bose< U1 > >
     
    +using TAT::FermiSymmetry = Symmetry< fermi< U1 > >
     
    +using TAT::FermiZ2Symmetry = Symmetry< fermi< U1 >, bose< Z2 > >
     
    +using TAT::FermiU1Symmetry = Symmetry< fermi< U1 >, bose< U1 > >
     
    +using TAT::ParitySymmetry = Symmetry< fermi< Z2 > >
     
    +using TAT::FermiFermiSymmetry = Symmetry< fermi< U1 >, fermi< U1 > >
     
    + + + + + + + +

    +Functions

    +template<typename Result = void, typename Func , typename Tuple , std::size_t... Is>
    auto TAT::detail::map_on_tuple (Func &&func, Tuple &&tuple, std::index_sequence< Is... >)
     
    +template<typename Result = void, typename Func , typename Tuple1 , typename Tuple2 , std::size_t... Is>
    auto TAT::detail::map_on_2tuple (Func &&func, Tuple1 &&tuple1, Tuple2 &&tuple2, std::index_sequence< Is... >)
     
    + + + + + + + + +

    +Variables

    +template<typename T >
    constexpr bool TAT::detail::is_fermi = is_fermi_helper<T>::value
     
    template<typename T >
    constexpr bool TAT::is_symmetry = detail::is_symmetry_helper<T>::value
     Check whether a type is a symmetry type. More...
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/symmetry_8hpp.js b/symmetry_8hpp.js new file mode 100644 index 000000000..74ed6e33b --- /dev/null +++ b/symmetry_8hpp.js @@ -0,0 +1,23 @@ +var symmetry_8hpp = +[ + [ "fermi", "structTAT_1_1fermi.html", null ], + [ "Symmetry", "structTAT_1_1Symmetry.html", "structTAT_1_1Symmetry" ], + [ "hash< TAT::Symmetry< T... > >", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4.html", "structstd_1_1hash_3_01TAT_1_1Symmetry_3_01T_8_8_8_01_4_01_4" ], + [ "TAT_SYMMETRY_HPP", "symmetry_8hpp.html#aafb8e91b925c726b59f42402064dff0e", null ], + [ "bose", "symmetry_8hpp.html#a8a961016ff45e81893384b29d146eee6", null ], + [ "FermiFermiSymmetry", "symmetry_8hpp.html#a5052c780024af5ae4c5955c42c8e7848", null ], + [ "FermiSymmetry", "symmetry_8hpp.html#aa28c061821585641d5d3ff71fc2c4960", null ], + [ "FermiU1Symmetry", "symmetry_8hpp.html#aefba6da15c56fc8323e7ab30044624c9", null ], + [ "FermiZ2Symmetry", "symmetry_8hpp.html#afa4283fe7df78e7ca6db74f1252916e3", null ], + [ "NoSymmetry", "symmetry_8hpp.html#aacb9a1b91b188d91bf9353919a17a194", null ], + [ "ParitySymmetry", "symmetry_8hpp.html#ab830827d1c6dc8f4d4b685dec9a8df4e", null ], + [ "symmetry_unwrap", "symmetry_8hpp.html#ac4c605a4070d76f412bb5cf7c59c2e50", null ], + [ "U1", "symmetry_8hpp.html#acaff1ad08de8cf21a6ad0d08d9f8f07a", null ], + [ "U1Symmetry", "symmetry_8hpp.html#a1fce66aa6bbe72d7c1d99785e6dffea2", null ], + [ "Z2", "symmetry_8hpp.html#a9f0315e334e454cc7330c18d2cbd677b", null ], + [ "Z2Symmetry", "symmetry_8hpp.html#a6f08c4753204137c8192e118cbc04285", null ], + [ "map_on_2tuple", "symmetry_8hpp.html#ac943729c1ba643f87215d5efbc01b2cf", null ], + [ "map_on_tuple", "symmetry_8hpp.html#a5cbc362d8172208d8636172cae848a3e", null ], + [ "is_fermi", "symmetry_8hpp.html#aea1199c9635158e1376bb03e51146a53", null ], + [ "is_symmetry", "symmetry_8hpp.html#aebd8b134e9b359acd653ad1aab1a37e1", null ] +]; \ No newline at end of file diff --git a/symmetry_8hpp_source.html b/symmetry_8hpp_source.html new file mode 100644 index 000000000..d3b3a6d61 --- /dev/null +++ b/symmetry_8hpp_source.html @@ -0,0 +1,351 @@ + + + + + + + +TAT: include/TAT/structure/symmetry.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    symmetry.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_SYMMETRY_HPP
    +
    22 #define TAT_SYMMETRY_HPP
    +
    23 
    +
    24 #include <tuple>
    +
    25 #include <utility>
    +
    26 
    +
    27 #include "../utility/common_variable.hpp"
    +
    28 
    +
    29 namespace TAT {
    +
    30  // A symmetry is a tuple of several int or bool, which may be fermi or bose
    +
    31  // fermi is used to select fermi, bose is used to select bose, otherwise bose by default.
    +
    32  template<typename T>
    +
    33  struct fermi { };
    +
    34  template<typename T>
    +
    35  using bose = T;
    +
    36 
    +
    37  namespace detail {
    +
    38  template<typename T>
    +
    39  struct symmetry_unwrap_helper : type_identity<T> { };
    +
    40  template<typename T>
    +
    41  struct symmetry_unwrap_helper<fermi<T>> : type_identity<T> { };
    +
    42  template<typename T>
    +
    43  using symmetry_unwrap = typename symmetry_unwrap_helper<T>::type;
    +
    44 
    +
    45  template<typename T>
    +
    46  struct is_fermi_helper : std::false_type { };
    +
    47  template<typename T>
    +
    48  struct is_fermi_helper<fermi<T>> : std::true_type { };
    +
    49  template<typename T>
    +
    50  constexpr bool is_fermi = is_fermi_helper<T>::value;
    +
    51  } // namespace detail
    +
    52 
    +
    53  namespace detail {
    +
    54  template<typename Result = void, typename Func, typename Tuple, std::size_t... Is>
    +
    55  auto map_on_tuple(Func&& func, Tuple&& tuple, std::index_sequence<Is...>) {
    +
    56  if constexpr (std::is_same_v<Result, void>) {
    +
    57  (func(std::get<Is>(std::forward<Tuple>(tuple)), std::integral_constant<std::size_t, Is>()), ...);
    +
    58  return 0;
    +
    59  } else {
    +
    60  return Result(func(std::get<Is>(std::forward<Tuple>(tuple)), std::integral_constant<std::size_t, Is>())...);
    +
    61  }
    +
    62  }
    +
    63 
    +
    64  template<typename Result = void, typename Func, typename Tuple1, typename Tuple2, std::size_t... Is>
    +
    65  auto map_on_2tuple(Func&& func, Tuple1&& tuple1, Tuple2&& tuple2, std::index_sequence<Is...>) {
    +
    66  if constexpr (std::is_same_v<Result, void>) {
    +
    67  (func(
    +
    68  std::get<Is>(std::forward<Tuple1>(tuple1)),
    +
    69  std::get<Is>(std::forward<Tuple2>(tuple2)),
    +
    70  std::integral_constant<std::size_t, Is>()
    +
    71  ),
    +
    72  ...);
    +
    73  return 0;
    +
    74  } else {
    +
    75  return Result(func(
    +
    76  std::get<Is>(std::forward<Tuple1>(tuple1)),
    +
    77  std::get<Is>(std::forward<Tuple2>(tuple2)),
    +
    78  std::integral_constant<std::size_t, Is>()
    +
    79  )...);
    +
    80  }
    +
    81  }
    +
    82  } // namespace detail
    +
    83 
    +
    94  template<typename... T>
    +
    95  struct Symmetry : std::tuple<detail::symmetry_unwrap<T>...> {
    +
    96  static_assert((std::is_integral_v<detail::symmetry_unwrap<T>> && ...));
    +
    97 
    +
    98  public:
    +
    99  using self_t = Symmetry<T...>; // used freq too high so alias it
    +
    100  using base_tuple_t = std::tuple<detail::symmetry_unwrap<T>...>;
    +
    101  using index_sequence_t = std::index_sequence_for<T...>;
    +
    102  static constexpr int length = sizeof...(T);
    +
    103  static constexpr std::array<bool, length> is_fermi_item = {detail::is_fermi<T>...};
    +
    104  static constexpr bool is_fermi_symmetry = (detail::is_fermi<T> || ...);
    +
    105 
    +
    106  private:
    +
    107  template<typename... Args>
    +
    108  base_tuple_t construct_base_tuple(const Args&... args) {
    +
    109  if constexpr (sizeof...(Args) < length) {
    +
    110  return construct_base_tuple(args..., 0);
    +
    111  } else {
    +
    112  return base_tuple_t(args...);
    +
    113  }
    +
    114  }
    +
    115 
    +
    116  public:
    +
    117  template<typename... Args, typename = std::enable_if_t<(sizeof...(Args) <= length) && (std::is_integral_v<Args> && ...)>>
    +
    118  Symmetry(const Args&... args) : base_tuple_t(construct_base_tuple(args...)) { }
    +
    119 
    +
    120  private:
    +
    121  const base_tuple_t& obtain_base() const {
    +
    122  return static_cast<const base_tuple_t&>(*this);
    +
    123  }
    +
    124  base_tuple_t& obtain_base() {
    +
    125  return static_cast<base_tuple_t&>(*this);
    +
    126  }
    +
    127 
    +
    128  public:
    +
    129  self_t& operator+=(const self_t& other_symmetry) & {
    +
    130  detail::map_on_2tuple(
    +
    131  [](auto& a, const auto& b, const auto&) {
    +
    132  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    133  a ^= b;
    +
    134  } else {
    +
    135  a += b;
    +
    136  }
    +
    137  },
    +
    138  obtain_base(),
    +
    139  other_symmetry.obtain_base(),
    +
    140  index_sequence_t()
    +
    141  );
    +
    142  return *this;
    +
    143  }
    +
    144 
    +
    145  self_t& operator-=(const self_t& other_symmetry) & {
    +
    146  detail::map_on_2tuple(
    +
    147  [](auto& a, const auto& b, const auto&) {
    +
    148  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    149  a ^= b;
    +
    150  } else {
    +
    151  a -= b;
    +
    152  }
    +
    153  },
    +
    154  obtain_base(),
    +
    155  other_symmetry.obtain_base(),
    +
    156  index_sequence_t()
    +
    157  );
    +
    158  return *this;
    +
    159  }
    +
    160 
    +
    161  [[nodiscard]] self_t operator+(const self_t& other_symmetry) const& {
    +
    162  return detail::map_on_2tuple<self_t>(
    +
    163  [](auto& a, const auto& b, const auto&) {
    +
    164  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    165  return a ^ b;
    +
    166  } else {
    +
    167  return a + b;
    +
    168  }
    +
    169  },
    +
    170  obtain_base(),
    +
    171  other_symmetry.obtain_base(),
    +
    172  index_sequence_t()
    +
    173  );
    +
    174  }
    +
    175 
    +
    176  [[nodiscard]] self_t operator-(const self_t& other_symmetry) const& {
    +
    177  return detail::map_on_2tuple<self_t>(
    +
    178  [](auto& a, const auto& b, const auto&) {
    +
    179  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    180  return a ^ b;
    +
    181  } else {
    +
    182  return a - b;
    +
    183  }
    +
    184  },
    +
    185  obtain_base(),
    +
    186  other_symmetry.obtain_base(),
    +
    187  index_sequence_t()
    +
    188  );
    +
    189  }
    +
    190  [[nodiscard]] self_t operator-() const& {
    +
    191  return detail::map_on_tuple<self_t>(
    +
    192  [](const auto& a, const auto&) {
    +
    193  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    194  return a;
    +
    195  } else {
    +
    196  return -a;
    +
    197  }
    +
    198  },
    +
    199  obtain_base(),
    +
    200  index_sequence_t()
    +
    201  );
    +
    202  }
    +
    203 
    +
    204  // hash
    +
    205  [[nodiscard]] std::size_t hash() const {
    +
    206  std::size_t seed = length;
    +
    207  detail::map_on_tuple(
    +
    208  [&seed](const auto& a, const auto&) {
    +
    209  using A = remove_cvref_t<decltype(a)>;
    +
    210  hash_absorb(seed, std::hash<A>{}(a));
    +
    211  },
    +
    212  obtain_base(),
    +
    213  index_sequence_t()
    +
    214  );
    +
    215  return seed;
    +
    216  }
    +
    217 
    +
    218  // parity
    +
    222  [[nodiscard]] bool parity() const {
    +
    223  bool result = false;
    +
    224  detail::map_on_tuple(
    +
    225  [&result](const auto& a, const auto& integral_constant) {
    +
    226  if constexpr (is_fermi_item[remove_cvref_t<decltype(integral_constant)>::value]) {
    +
    227  if constexpr (std::is_same_v<remove_cvref_t<decltype(a)>, bool>) {
    +
    228  result ^= a;
    +
    229  } else {
    +
    230  result ^= bool(a % 2);
    +
    231  }
    +
    232  }
    +
    233  },
    +
    234  obtain_base(),
    +
    235  index_sequence_t()
    +
    236  );
    +
    237  return result;
    +
    238  }
    +
    239  };
    +
    240 
    +
    241  namespace detail {
    +
    242  template<typename T>
    +
    243  struct is_symmetry_helper : std::false_type { };
    +
    244 
    +
    245  template<typename... T>
    +
    246  struct is_symmetry_helper<Symmetry<T...>> : std::true_type { };
    +
    247  } // namespace detail
    +
    248 
    +
    256  template<typename T>
    +
    257  constexpr bool is_symmetry = detail::is_symmetry_helper<T>::value;
    +
    258 
    +
    259  // common used symmetries alias
    +
    263  using Z2 = bool;
    +
    267  using U1 = std::int32_t;
    +
    268 
    +
    269  using NoSymmetry = Symmetry<>;
    +
    270  using Z2Symmetry = Symmetry<bose<Z2>>;
    +
    271  using U1Symmetry = Symmetry<bose<U1>>;
    + +
    273  using FermiZ2Symmetry = Symmetry<fermi<U1>, bose<Z2>>;
    +
    274  using FermiU1Symmetry = Symmetry<fermi<U1>, bose<U1>>;
    + + +
    277 } // namespace TAT
    +
    278 
    +
    279 namespace std {
    +
    280  template<typename... T>
    +
    281  struct hash<TAT::Symmetry<T...>> {
    +
    282  size_t operator()(const TAT::Symmetry<T...>& symmetry) const {
    +
    283  return symmetry.hash();
    +
    284  }
    +
    285  };
    +
    286 } // namespace std
    +
    287 #endif
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    bool Z2
    Z2 Symmetry.
    Definition: symmetry.hpp:263
    +
    std::int32_t U1
    U1 symmetry.
    Definition: symmetry.hpp:267
    +
    constexpr bool is_symmetry
    Check whether a type is a symmetry type.
    Definition: symmetry.hpp:257
    +
    General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
    Definition: symmetry.hpp:95
    +
    bool parity() const
    Get the total parity, whether fermion or boson.
    Definition: symmetry.hpp:222
    +
    Definition: symmetry.hpp:33
    +
    Definition: common_variable.hpp:225
    +
    +
    + + + + diff --git a/sync_off.png b/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3b443fc62892114406e3d399421b2a881b897acc GIT binary patch literal 853 zcmV-b1FHOqP)oT|#XixUYy%lpuf3i8{fX!o zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py; zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK& z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sTxLGlJY5nc&Re zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j* literal 0 HcmV?d00001 diff --git a/sync_on.png b/sync_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e08320fb64e6fa33b573005ed6d8fe294e19db76 GIT binary patch literal 845 zcmV-T1G4;yP)Y;xxyHF2B5Wzm| zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I_))aP?*T)ow&n59{}X4$3Goat zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F={P0Y^?$4t z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU# z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+ z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$Mj4Uq05 X8=0q~qBNan00000NkvXXu0mjfptF>5 literal 0 HcmV?d00001 diff --git a/tab_a.png b/tab_a.png new file mode 100644 index 0000000000000000000000000000000000000000..3b725c41c5a527a3a3e40097077d0e206a681247 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD# z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4 literal 0 HcmV?d00001 diff --git a/tab_b.png b/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b4a8638cb3496a016eaed9e16ffc12846dea18 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^ literal 0 HcmV?d00001 diff --git a/tabs.css b/tabs.css new file mode 100644 index 000000000..7d45d36c1 --- /dev/null +++ b/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} diff --git a/tensor_8hpp.html b/tensor_8hpp.html new file mode 100644 index 000000000..90bf11843 --- /dev/null +++ b/tensor_8hpp.html @@ -0,0 +1,210 @@ + + + + + + + +TAT: include/TAT/structure/tensor.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    tensor.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <algorithm>
    +#include <array>
    +#include <limits>
    +#include <map>
    +#include <memory>
    +#include <set>
    +#include <tuple>
    +#include <variant>
    +#include "../utility/allocator.hpp"
    +#include "../utility/shared_ptr.hpp"
    +#include "core.hpp"
    +#include "edge.hpp"
    +#include "name.hpp"
    +#include "symmetry.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + +

    +Classes

    struct  TAT::RemainCut
     
    struct  TAT::RelativeCut
     
    struct  TAT::NoCut
     
    struct  TAT::Cut
     Used to describle how to cut when doing svd to a tensor. More...
     
    class  TAT::Tensor< ScalarType, Symmetry, Name >
     Tensor type. More...
     
    struct  TAT::Tensor< ScalarType, Symmetry, Name >::svd_result
     SVD result type. More...
     
    struct  TAT::Tensor< ScalarType, Symmetry, Name >::qr_result
     QR result type. More...
     
    struct  TAT::TensorShape< ScalarType, Symmetry, Name >
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + +

    +Macros

    +#define TAT_TENSOR_HPP
     
    #define TAT_DEFINE_TENSOR_AT(ARG)
     
    + + + + +

    +Functions

    +template<typename ScalarType1 , typename ScalarType2 , typename Symmetry , typename Name >
    auto TAT::contract (const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs)
     
    + + + + +

    +Variables

    +template<typename T >
    constexpr bool TAT::is_tensor = detail::is_tensor_helper<T>::value
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +

    Macro Definition Documentation

    + +

    ◆ TAT_DEFINE_TENSOR_AT

    + +
    +
    + + + + + + + + +
    #define TAT_DEFINE_TENSOR_AT( ARG)
    +
    +Value:
    [[nodiscard]] const scalar_t& at(const ARG& arg) const { \
    +
    return at<>(arg); \
    +
    } \
    +
    [[nodiscard]] scalar_t& at(const ARG& arg) { \
    +
    return at<>(arg); \
    +
    } \
    +
    [[nodiscard]] const scalar_t& const_at(const ARG& arg) const { \
    +
    return const_at<>(arg); \
    +
    }
    +
    +
    +
    +
    +
    + + + + diff --git a/tensor_8hpp.js b/tensor_8hpp.js new file mode 100644 index 000000000..4b71061c1 --- /dev/null +++ b/tensor_8hpp.js @@ -0,0 +1,15 @@ +var tensor_8hpp = +[ + [ "RemainCut", "structTAT_1_1RemainCut.html", "structTAT_1_1RemainCut" ], + [ "RelativeCut", "structTAT_1_1RelativeCut.html", "structTAT_1_1RelativeCut" ], + [ "NoCut", "structTAT_1_1NoCut.html", null ], + [ "Cut", "structTAT_1_1Cut.html", "structTAT_1_1Cut" ], + [ "Tensor", "classTAT_1_1Tensor.html", "classTAT_1_1Tensor" ], + [ "svd_result", "structTAT_1_1Tensor_1_1svd__result.html", "structTAT_1_1Tensor_1_1svd__result" ], + [ "qr_result", "structTAT_1_1Tensor_1_1qr__result.html", "structTAT_1_1Tensor_1_1qr__result" ], + [ "TensorShape", "structTAT_1_1TensorShape.html", "structTAT_1_1TensorShape" ], + [ "TAT_DEFINE_TENSOR_AT", "tensor_8hpp.html#a066addf6c1f59ed1ff54b409307365b3", null ], + [ "TAT_TENSOR_HPP", "tensor_8hpp.html#aad98d87f1a7f9d311598c6ee13a21347", null ], + [ "contract", "tensor_8hpp.html#ad87023480759ee62f00606ec09d962a0", null ], + [ "is_tensor", "tensor_8hpp.html#a8d892d6579cfeb06dc84a00cb05348cb", null ] +]; \ No newline at end of file diff --git a/tensor_8hpp_source.html b/tensor_8hpp_source.html new file mode 100644 index 000000000..02f27ad17 --- /dev/null +++ b/tensor_8hpp_source.html @@ -0,0 +1,949 @@ + + + + + + + +TAT: include/TAT/structure/tensor.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    tensor.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_TENSOR_HPP
    +
    22 #define TAT_TENSOR_HPP
    +
    23 
    +
    24 #include <algorithm>
    +
    25 #include <array>
    +
    26 #include <limits>
    +
    27 #include <map>
    +
    28 #include <memory>
    +
    29 #include <set>
    +
    30 #include <tuple>
    +
    31 #include <variant>
    +
    32 
    +
    33 #include "../utility/allocator.hpp"
    +
    34 #include "../utility/shared_ptr.hpp"
    +
    35 #include "core.hpp"
    +
    36 #include "edge.hpp"
    +
    37 #include "name.hpp"
    +
    38 #include "symmetry.hpp"
    +
    39 
    +
    40 namespace TAT {
    +
    41  struct RemainCut {
    +
    42  Size value;
    +
    43  explicit RemainCut(Size v) : value(v) { }
    +
    44  };
    +
    45  struct RelativeCut {
    +
    46  double value;
    +
    47  explicit RelativeCut(double v) : value(v) { }
    +
    48  };
    +
    49  struct NoCut { };
    +
    53  struct Cut {
    +
    54  Size remain_cut;
    +
    55  double relative_cut;
    +
    56 
    +
    57  Cut(Size i, double f) : remain_cut(i), relative_cut(f) { }
    +
    58  Cut(double f, Size i) : remain_cut(i), relative_cut(f) { }
    +
    59  Cut() : remain_cut(std::numeric_limits<Size>::max()), relative_cut(0) { }
    +
    60  Cut(Size i) : remain_cut(i), relative_cut(0) { }
    +
    61  Cut(double f) : remain_cut(std::numeric_limits<Size>::max()), relative_cut(f) { }
    +
    62 
    +
    63  [[deprecated("NoCut is deprecated, use Cut directly")]] Cut(NoCut) : Cut() { }
    +
    64  [[deprecated("RelativeCut is deprecated, use Cut directly")]] Cut(RelativeCut c) : Cut(c.value) { }
    +
    65  [[deprecated("RemainCut is deprecated, use Cut directly")]] Cut(RemainCut c) : Cut(c.value) { }
    +
    66  };
    +
    67 
    +
    68  template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
    +
    69  struct TensorShape;
    +
    70 
    +
    86  template<typename ScalarType = double, typename Symmetry = Symmetry<>, typename Name = DefaultName>
    +
    87  class Tensor {
    +
    88  static_assert(is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>);
    +
    89 
    +
    90  template<typename, typename, typename>
    +
    91  friend class Tensor;
    +
    92  template<typename ScalarTypeT, typename SymmetryT, typename NameT>
    +
    93  friend Tensor<ScalarTypeT, SymmetryT, NameT> contract_without_fuse(
    + + +
    96  const std::unordered_set<std::pair<NameT, NameT>>& contract_pairs
    +
    97  );
    +
    98  template<typename ScalarTypeT, typename NameT>
    +
    99  friend Tensor<ScalarTypeT, NoSymmetry, NameT> contract_with_fuse(
    + + +
    102  const std::unordered_set<std::pair<NameT, NameT>>& contract_pairs,
    +
    103  const std::unordered_set<NameT>& fuse_names
    +
    104  );
    +
    105  template<typename ScalarTypeT, typename SymmetryT, typename NameT>
    + +
    107  trace_without_fuse(const Tensor<ScalarTypeT, SymmetryT, NameT>& tensor, const std::unordered_set<std::pair<NameT, NameT>>& trace_pairs);
    +
    108  template<typename ScalarTypeT, typename SymmetryT, typename NameT>
    +
    109  friend Tensor<ScalarTypeT, SymmetryT, NameT> trace_with_fuse(
    + +
    111  const std::unordered_set<std::pair<NameT, NameT>>& trace_pairs,
    +
    112  const std::unordered_map<NameT, std::pair<NameT, NameT>>& fuse_names
    +
    113  );
    +
    114  public:
    + +
    116  // common used type alias
    +
    117  using scalar_t = ScalarType;
    +
    118  using symmetry_t = Symmetry;
    +
    119  using name_t = Name;
    +
    120  using edge_t = Edge<symmetry_t>;
    + +
    122 
    +
    123  // tensor data
    +
    124  private:
    +
    129  std::vector<name_t> m_names;
    +
    135  detail::shared_ptr<core_t> m_core;
    +
    136 
    +
    137  public:
    +
    138  // names
    +
    139  [[nodiscard]] const std::vector<name_t>& names() const {
    +
    140  return m_names;
    +
    141  }
    +
    142  [[nodiscard]] const name_t& names(Rank i) const {
    +
    143  return m_names[i];
    +
    144  }
    +
    145 
    +
    146  [[nodiscard]] Rank rank() const {
    +
    147  return m_names.size();
    +
    148  }
    +
    149  [[nodiscard]] auto find_by_name(const name_t& name) const {
    +
    150  return std::find(m_names.begin(), m_names.end(), name);
    +
    151  }
    +
    152  [[nodiscard]] Rank rank_by_name(const name_t& name) const {
    +
    153  auto where = find_by_name(name);
    +
    154  if (debug_mode) {
    +
    155  if (where == m_names.end()) {
    +
    156  detail::error("No such name in name list");
    +
    157  }
    +
    158  }
    +
    159  return std::distance(m_names.begin(), where);
    +
    160  }
    +
    161 
    +
    162  // core
    +
    163  [[nodiscard]] const auto& storage() const {
    +
    164  return m_core->storage();
    +
    165  }
    +
    166  [[nodiscard]] auto& storage() {
    +
    167  return m_core->storage();
    +
    168  }
    +
    169 
    +
    170  [[nodiscard]] const std::vector<edge_t>& edges() const {
    +
    171  return m_core->edges();
    +
    172  }
    +
    173  [[nodiscard]] const edge_t& edges(Rank r) const {
    +
    174  return m_core->edges(r);
    +
    175  }
    +
    176  [[nodiscard]] const edge_t& edges(const Name& name) const {
    +
    177  return edges(rank_by_name(name));
    +
    178  }
    +
    179 
    +
    180  [[nodiscard]] const mdspan<std::optional<mdspan<scalar_t>>>& blocks() const {
    +
    181  return m_core->blocks();
    +
    182  }
    +
    183  [[nodiscard]] mdspan<std::optional<mdspan<scalar_t>>>& blocks() {
    +
    184  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_blocks to get const reference");
    +
    185  return m_core->blocks();
    +
    186  }
    +
    187  [[nodiscard]] const mdspan<std::optional<mdspan<scalar_t>>>& const_blocks() const {
    +
    188  return m_core->blocks();
    +
    189  }
    +
    190  // int/name -> symmetry/position
    +
    191  // it maybe used from other tensor function
    +
    192  template<typename T = symmetry_t, typename A>
    +
    193  [[nodiscard]] const auto& blocks(const std::vector<T, A>& arg) const {
    +
    194  return m_core->blocks(arg);
    +
    195  }
    +
    196  template<typename T = symmetry_t, typename H, typename K, typename A>
    +
    197  [[nodiscard]] const auto& blocks(const std::unordered_map<name_t, T, H, K, A>& arg_map) const {
    +
    198  std::vector<T, typename std::allocator_traits<A>::template rebind_alloc<T>> arg_list;
    +
    199  arg_list.reserve(rank());
    +
    200  for (const auto& name : names()) {
    +
    201  arg_list.push_back(arg_map.at(name));
    +
    202  }
    +
    203  return blocks(arg_list);
    +
    204  }
    +
    205  template<typename T>
    +
    206  [[nodiscard]] auto& blocks(const T& arg) {
    +
    207  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_blocks to get const reference");
    +
    208  return const_cast<mdspan<scalar_t>&>(const_cast<const self_t*>(this)->blocks(arg));
    +
    209  }
    +
    210  template<typename T>
    +
    211  [[nodiscard]] const auto& const_blocks(const T& arg) const {
    +
    212  return blocks(arg);
    +
    213  }
    +
    214  // Two of non const version are needed
    +
    215  // Since c++ need to try to convert literal value to 2 kind of type(vector<symmetry>, map<name, symmetry>).
    +
    216  [[nodiscard]] auto& blocks(const std::vector<symmetry_t>& arg) {
    +
    217  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_blocks to get const reference");
    +
    218  return const_cast<mdspan<scalar_t>&>(const_cast<const self_t*>(this)->blocks(arg));
    +
    219  }
    +
    220  [[nodiscard]] const auto& const_blocks(const std::vector<symmetry_t>& arg) const {
    +
    221  return blocks(arg);
    +
    222  }
    +
    223  [[nodiscard]] auto& blocks(const std::unordered_map<name_t, symmetry_t>& arg) {
    +
    224  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_at to get const reference");
    +
    225  return const_cast<mdspan<scalar_t>&>(const_cast<const self_t*>(this)->blocks(arg));
    +
    226  }
    +
    227  [[nodiscard]] const auto& const_blocks(const std::unordered_map<name_t, symmetry_t>& arg) const {
    +
    228  return blocks(arg);
    +
    229  }
    +
    230 
    +
    231  // get element
    +
    232  // name/int -> (coord/point/index) const/non-const
    +
    233  template<typename T, typename A>
    +
    234  [[nodiscard]] const scalar_t& at(const std::vector<T, A>& arg) const {
    +
    235  return m_core->at(arg);
    +
    236  }
    +
    237  template<typename T, typename H, typename K, typename A>
    +
    238  [[nodiscard]] const scalar_t& at(const std::unordered_map<name_t, T, H, K, A>& arg_map) const {
    +
    239  std::vector<T, typename std::allocator_traits<A>::template rebind_alloc<T>> arg_list;
    +
    240  arg_list.reserve(rank());
    +
    241  for (const auto& name : names()) {
    +
    242  arg_list.push_back(arg_map.at(name));
    +
    243  }
    +
    244  return at(arg_list);
    +
    245  }
    +
    246  template<typename T>
    +
    247  [[nodiscard]] scalar_t& at(const T& arg) {
    +
    248  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_at to get const reference");
    +
    249  return const_cast<scalar_t&>(const_cast<const self_t*>(this)->at(arg));
    +
    250  }
    +
    251  template<typename T>
    +
    252  [[nodiscard]] const scalar_t& const_at(const T& arg) const {
    +
    253  return at(arg);
    +
    254  }
    +
    255 
    +
    256  [[nodiscard]] const scalar_t& at() const {
    +
    257  if (!scalar_like()) {
    +
    258  detail::error("Try to get the only element of the tensor which does not contains only one element");
    +
    259  }
    +
    260  return storage().front();
    +
    261  }
    +
    262  [[nodiscard]] scalar_t& at() {
    +
    263  acquire_data_ownership("Get reference which may change the shared tensor, copy happened here, use const_at to get const reference");
    +
    264  return const_cast<scalar_t&>(const_cast<const self_t*>(this)->at());
    +
    265  }
    +
    266  [[nodiscard]] const scalar_t& const_at() const {
    +
    267  return at();
    +
    268  }
    +
    269 
    +
    270  template<typename T>
    +
    271  using map_from_name = std::unordered_map<name_t, T>;
    +
    272 #define TAT_DEFINE_TENSOR_AT(ARG) \
    +
    273  [[nodiscard]] const scalar_t& at(const ARG& arg) const { \
    +
    274  return at<>(arg); \
    +
    275  } \
    +
    276  [[nodiscard]] scalar_t& at(const ARG& arg) { \
    +
    277  return at<>(arg); \
    +
    278  } \
    +
    279  [[nodiscard]] const scalar_t& const_at(const ARG& arg) const { \
    +
    280  return const_at<>(arg); \
    +
    281  }
    +
    282  // coord may be ambiguous to point, because position may be ambiguous to symmetry
    +
    283  // TAT_DEFINE_TENSOR_AT(std::vector<typename edge_t::coord_t>)
    +
    284  TAT_DEFINE_TENSOR_AT(std::vector<typename edge_t::index_t>)
    +
    285  TAT_DEFINE_TENSOR_AT(std::vector<typename edge_t::point_t>)
    +
    286  // TAT_DEFINE_TENSOR_AT(map_from_name<typename edge_t::coord_t>)
    +
    287  TAT_DEFINE_TENSOR_AT(map_from_name<typename edge_t::index_t>)
    +
    288  TAT_DEFINE_TENSOR_AT(map_from_name<typename edge_t::point_t>)
    +
    289 #undef TAT_DEFINE_TENSOR_AT
    +
    290 
    +
    291  private:
    +
    295  void check_valid_name() const {
    +
    296  if (rank() != edges().size()) {
    +
    297  detail::error("Wrong name list length which no equals to expected length");
    +
    298  }
    +
    299  for (auto i = 0; i < rank(); i++) {
    +
    300  for (auto j = i + 1; j < rank(); j++) {
    +
    301  if (names(i) == names(j)) {
    +
    302  detail::error("Duplicated names in name list");
    +
    303  }
    +
    304  }
    +
    305  }
    +
    306  }
    +
    307 
    +
    308  // shape
    +
    309  public:
    + +
    314  return {this};
    +
    315  }
    +
    316 
    +
    317  // constructors
    +
    318  // There are many method to construct edge, so it is not proper to use initializer list
    +
    319  public:
    +
    327  Tensor(std::vector<Name> input_names, std::vector<Edge<Symmetry>> input_edges) :
    +
    328  m_names(std::move(input_names)),
    +
    329  m_core(detail::shared_ptr<core_t>::make(std::move(input_edges))) {
    +
    330  if constexpr (debug_mode) {
    +
    331  check_valid_name();
    +
    332  }
    +
    333  }
    +
    334 
    +
    335  Tensor() : Tensor(1) { }
    +
    336  Tensor(const Tensor& other) = default;
    +
    337  Tensor(Tensor&& other) = default;
    +
    338  Tensor& operator=(const Tensor& other) = default;
    +
    339  Tensor& operator=(Tensor&& other) = default;
    +
    340  ~Tensor() = default;
    +
    341 
    +
    350  explicit Tensor(
    +
    351  scalar_t number,
    +
    352  std::vector<Name> input_names = {},
    +
    353  const std::vector<symmetry_t>& edge_symmetry = {},
    +
    354  const std::vector<Arrow>& edge_arrow = {}
    +
    355  ) :
    +
    356  m_names(std::move(input_names)),
    +
    357  m_core(detail::shared_ptr<core_t>::make(get_edge_from_edge_symmetry_and_arrow(edge_symmetry, edge_arrow, rank()))) {
    +
    358  if constexpr (debug_mode) {
    +
    359  check_valid_name();
    +
    360  }
    +
    361  at() = number;
    +
    362  }
    +
    363 
    +
    364  private:
    +
    365  [[nodiscard]] static std::vector<Edge<Symmetry>>
    +
    366  get_edge_from_edge_symmetry_and_arrow(const std::vector<Symmetry>& edge_symmetry, const std::vector<Arrow>& edge_arrow, Rank rank) {
    +
    367  // used in Tensor(ScalarType, ...)
    +
    368  if constexpr (Symmetry::length == 0) {
    +
    369  return std::vector<Edge<Symmetry>>(rank, {1});
    +
    370  } else {
    +
    371  auto result = std::vector<Edge<Symmetry>>();
    +
    372  result.reserve(rank);
    +
    373  if constexpr (Symmetry::is_fermi_symmetry) {
    +
    374  for (auto i = 0; i < rank; i++) {
    +
    375  result.push_back({{{edge_symmetry[i], 1}}, edge_arrow[i]});
    +
    376  }
    +
    377  } else {
    +
    378  for (auto i = 0; i < rank; i++) {
    +
    379  result.push_back({{{edge_symmetry[i], 1}}});
    +
    380  }
    +
    381  }
    +
    382  return result;
    +
    383  }
    +
    384  }
    +
    385 
    +
    386  public:
    +
    387  [[nodiscard]] bool scalar_like() const {
    +
    388  return storage().size() == 1;
    +
    389  }
    +
    390 
    +
    394  explicit operator scalar_t() const {
    +
    395  if (storage().size() == 0) {
    +
    396  // sometimes it is useful
    +
    397  return 0;
    +
    398  } else {
    +
    399  return at();
    +
    400  }
    +
    401  }
    +
    402 
    +
    403  // elementwise operators
    +
    404  public:
    +
    405  template<typename Function>
    +
    406  [[deprecated("transform(...) has been renamed to transform_(...)")]] Tensor<ScalarType, Symmetry, Name>& transform(Function&& function) & {
    +
    407  return transform_(std::forward<Function>(function));
    +
    408  }
    +
    409  template<typename Function>
    +
    410  [[deprecated("transform(...) has been renamed to transform_(...)"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&& transform(
    +
    411  Function&& function
    +
    412  ) && {
    +
    413  return std::move(transform_(std::forward<Function>(function)));
    +
    414  }
    +
    415  template<typename OtherScalarType, typename Function>
    +
    416  [[deprecated("zip_transform(...) has been renamed to zip_transform_(...)")]] Tensor<ScalarType, Symmetry, Name>&
    +
    417  zip_transform(const Tensor<OtherScalarType, Symmetry, Name>& other, Function&& function) & {
    +
    418  return zip_transform_(other, std::forward<Function>(function));
    +
    419  }
    +
    420  template<typename OtherScalarType, typename Function>
    +
    421  [[deprecated("zip_transform(...) has been renamed to zip_transform_(...)"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&&
    +
    422  zip_transform(const Tensor<OtherScalarType, Symmetry, Name>& other, Function&& function) && {
    +
    423  return std::move(zip_transform_(other, std::forward<Function>(function)));
    +
    424  }
    +
    429  template<typename Function>
    + +
    431  acquire_data_ownership("Set tensor shared in transform, copy happened here");
    +
    432  std::transform(storage().begin(), storage().end(), storage().begin(), std::forward<Function>(function));
    +
    433  return *this;
    +
    434  }
    +
    435  template<typename Function>
    +
    436  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& transform_(Function&& function) && {
    +
    437  return std::move(transform_(std::forward<Function>(function)));
    +
    438  }
    +
    439  template<typename OtherScalarType, typename Function>
    +
    440  Tensor<ScalarType, Symmetry, Name>& zip_transform_(const Tensor<OtherScalarType, Symmetry, Name>& other, Function&& function) & {
    +
    441  acquire_data_ownership("Set tensor shared in zip_transform, copy happened here");
    +
    442  if constexpr (debug_mode) {
    +
    443  if (rank() != other.rank()) {
    +
    444  detail::error("Try to do zip_transform on two different rank tensor");
    +
    445  }
    +
    446  }
    +
    447  auto real_other_pointer = &other;
    +
    448  auto new_other = Tensor<OtherScalarType, Symmetry, Name>();
    +
    449  if (names() != other.names()) {
    +
    450  new_other = other.transpose(names());
    +
    451  real_other_pointer = &new_other;
    +
    452  }
    +
    453  const auto& real_other = *real_other_pointer;
    +
    454  if constexpr (debug_mode) {
    +
    455  if (edges() != real_other.edges()) {
    +
    456  detail::error("Try to do zip_transform on two tensors which edges not compatible");
    +
    457  }
    +
    458  }
    +
    459  std::transform(storage().begin(), storage().end(), real_other.storage().begin(), storage().begin(), std::forward<Function>(function));
    +
    460  return *this;
    +
    461  }
    +
    462  template<typename OtherScalarType, typename Function>
    +
    463  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&&
    +
    464  zip_transform_(const Tensor<OtherScalarType, Symmetry, Name>& other, Function&& function) && {
    +
    465  return std::move(zip_transform_(other, std::forward<Function>(function)));
    +
    466  }
    +
    467 
    +
    473  template<typename NewScalarType = ScalarType>
    + +
    475  return Tensor<NewScalarType, Symmetry, Name>(names(), edges());
    +
    476  }
    +
    477 
    +
    484  template<typename ForceScalarType = void, typename Function>
    +
    485  [[nodiscard]] auto map(Function&& function) const {
    +
    486  using DefaultNewScalarType = std::invoke_result_t<Function, ScalarType>;
    +
    487  using NewScalarType = std::conditional_t<std::is_same_v<void, ForceScalarType>, DefaultNewScalarType, ForceScalarType>;
    +
    488  auto result = same_shape<NewScalarType>();
    +
    489  std::transform(storage().begin(), storage().end(), result.storage().begin(), std::forward<Function>(function));
    +
    490  return result;
    +
    491  }
    +
    492 
    +
    493  template<typename ForceScalarType = void, typename OtherScalarType, typename Function>
    +
    494  [[nodiscard]] auto zip_map(const Tensor<OtherScalarType, Symmetry, Name>& other, Function&& function) const {
    +
    495  using DefaultNewScalarType = std::invoke_result_t<Function, ScalarType, OtherScalarType>;
    +
    496  using NewScalarType = std::conditional_t<std::is_same_v<void, ForceScalarType>, DefaultNewScalarType, ForceScalarType>;
    +
    497  if constexpr (debug_mode) {
    +
    498  if (rank() != other.rank()) {
    +
    499  detail::error("Try to do zip_map on two different rank tensor");
    +
    500  }
    +
    501  }
    +
    502  auto real_other_pointer = &other;
    +
    503  auto new_other = Tensor<OtherScalarType, Symmetry, Name>();
    +
    504  if (names() != other.names()) {
    +
    505  new_other = other.transpose(names());
    +
    506  real_other_pointer = &new_other;
    +
    507  }
    +
    508  const auto& real_other = *real_other_pointer;
    +
    509  if constexpr (debug_mode) {
    +
    510  if (edges() != real_other.edges()) {
    +
    511  detail::error("Try to do zip_map on two tensors which edges not compatible");
    +
    512  }
    +
    513  }
    +
    514  auto result = same_shape<NewScalarType>();
    +
    515  std::transform(
    +
    516  storage().begin(),
    +
    517  storage().end(),
    +
    518  real_other.storage().begin(),
    +
    519  result.storage().begin(),
    +
    520  std::forward<Function>(function)
    +
    521  );
    +
    522  return result;
    +
    523  }
    +
    524 
    +
    529  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> copy() const {
    +
    530  return map([](const ScalarType& x) -> ScalarType { return x; });
    +
    531  }
    +
    532 
    +
    533  template<typename Generator>
    +
    534  [[deprecated("set is renamed to set_")]] Tensor<ScalarType, Symmetry, Name>& set(Generator&& generator) & {
    +
    535  return set_(std::forward<Generator>(generator));
    +
    536  }
    +
    537  template<typename Generator>
    +
    538  [[deprecated("set is renamed to set_"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&& set(Generator&& generator) && {
    +
    539  return std::move(set_(std::forward<Generator>(generator)));
    +
    540  }
    +
    545  template<typename Generator>
    +
    546  Tensor<ScalarType, Symmetry, Name>& set_(Generator&& generator) & {
    +
    547  acquire_data_ownership("Set tensor shared, copy happened here");
    +
    548  std::generate(storage().begin(), storage().end(), std::forward<Generator>(generator));
    +
    549  return *this;
    +
    550  }
    +
    551  template<typename Generator>
    +
    552  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& set_(Generator&& generator) && {
    +
    553  return std::move(set_(std::forward<Generator>(generator)));
    +
    554  }
    +
    555 
    +
    556  [[deprecated("zero is renamed to zero_")]] Tensor<ScalarType, Symmetry, Name>& zero() & {
    +
    557  return zero_();
    +
    558  }
    +
    559  [[deprecated("zero is renamed to zero_"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&& zero() && {
    +
    560  return std::move(zero_());
    +
    561  }
    + +
    567  return set_([]() -> ScalarType { return 0; });
    +
    568  }
    +
    569  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& zero_() && {
    +
    570  return std::move(zero_());
    +
    571  }
    +
    572 
    +
    573  [[deprecated("range is renamed to range_")]] Tensor<ScalarType, Symmetry, Name>& range(ScalarType first = 0, ScalarType step = 1) & {
    +
    574  return range_(first, step);
    +
    575  }
    +
    576  [[deprecated("range is renamed to range_"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&&
    +
    577  range(ScalarType first = 0, ScalarType step = 1) && {
    +
    578  return std::move(range_(first, step));
    +
    579  }
    +
    584  Tensor<ScalarType, Symmetry, Name>& range_(ScalarType first = 0, ScalarType step = 1) & {
    +
    585  return set_([&first, step]() -> ScalarType {
    +
    586  auto result = first;
    +
    587  first += step;
    +
    588  return result;
    +
    589  });
    +
    590  }
    +
    591  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& range_(ScalarType first = 0, ScalarType step = 1) && {
    +
    592  return std::move(range_(first, step));
    +
    593  }
    +
    594 
    +
    599  void acquire_data_ownership(const char* message = "") {
    +
    600  if (m_core.use_count() != 1) {
    +
    601  m_core = detail::shared_ptr<Core<ScalarType, Symmetry>>::make(*m_core);
    +
    602  if (*message != 0) {
    +
    603  detail::what_if_copy_shared(message);
    +
    604  }
    +
    605  }
    +
    606  }
    +
    607 
    +
    611  template<typename OtherScalarType, typename = std::enable_if_t<is_scalar<OtherScalarType>>>
    + +
    613  if constexpr (std::is_same_v<ScalarType, OtherScalarType>) {
    +
    614  return *this; // shallow copy
    +
    615  } else {
    +
    616  return map([](ScalarType input) -> OtherScalarType {
    +
    617  if constexpr (is_complex<ScalarType> && is_real<OtherScalarType>) {
    +
    618  return OtherScalarType(input.real());
    +
    619  } else {
    +
    620  return OtherScalarType(input);
    +
    621  }
    +
    622  });
    +
    623  }
    +
    624  }
    +
    625 
    +
    631  template<int p = 2>
    +
    632  [[nodiscard]] real_scalar<ScalarType> norm() const {
    +
    633  real_scalar<ScalarType> result = 0;
    +
    634  if constexpr (p == -1) {
    +
    635  // max abs
    +
    636  for (const auto& number : storage()) {
    +
    637  if (auto absolute_value = std::abs(number); absolute_value > result) {
    +
    638  result = absolute_value;
    +
    639  }
    +
    640  }
    +
    641  } else if constexpr (p == 0) {
    +
    642  result += real_scalar<ScalarType>(storage().size());
    +
    643  } else {
    +
    644  for (const auto& number : storage()) {
    +
    645  if constexpr (p == 1) {
    +
    646  result += std::abs(number);
    +
    647  } else if constexpr (p == 2) {
    +
    648  result += std::norm(number);
    +
    649  } else {
    +
    650  if constexpr (p % 2 == 0 && is_real<ScalarType>) {
    +
    651  result += std::pow(number, p);
    +
    652  } else {
    +
    653  result += std::pow(std::abs(number), p);
    +
    654  }
    +
    655  }
    +
    656  }
    +
    657  result = std::pow(result, 1. / p);
    +
    658  }
    +
    659  return result;
    +
    660  }
    +
    661 
    +
    662  public:
    + +
    669 
    + +
    676 
    +
    677  [[nodiscard]] auto clear_symmetry() const {
    +
    678  if constexpr (symmetry_t::is_fermi_symmetry) {
    +
    679  return clear_fermi_symmetry();
    +
    680  } else {
    +
    681  return clear_bose_symmetry();
    +
    682  }
    +
    683  }
    +
    684 
    +
    685 
    +
    686  public:
    +
    687  // Operators
    + +
    704  const std::unordered_map<Name, std::vector<std::pair<Name, edge_segments_t<Symmetry>>>>& split_map,
    +
    705  const std::unordered_set<Name>& reversed_names,
    +
    706  const std::unordered_map<Name, std::vector<Name>>& merge_map,
    +
    707  std::vector<Name> new_names, // move into result tensor
    +
    708  const bool apply_parity = false,
    +
    709  const std::unordered_set<Name>& parity_exclude_names_split = {},
    +
    710  const std::unordered_set<Name>& parity_exclude_names_reversed_before_transpose = {},
    +
    711  const std::unordered_set<Name>& parity_exclude_names_reversed_after_transpose = {},
    +
    712  const std::unordered_set<Name>& parity_exclude_names_merge = {}
    +
    713  ) const {
    +
    714  auto pmr_guard = scope_resource(default_buffer_size);
    +
    715  return edge_operator_implement(
    +
    716  split_map,
    +
    717  reversed_names,
    +
    718  merge_map,
    +
    719  std::move(new_names),
    +
    720  apply_parity,
    +
    721  parity_exclude_names_split,
    +
    722  parity_exclude_names_reversed_before_transpose,
    +
    723  parity_exclude_names_reversed_after_transpose,
    +
    724  parity_exclude_names_merge,
    +
    725  {}
    +
    726  );
    +
    727  // last argument only used in svd, Name -> Symmetry -> Size
    +
    728  // it is not proper to expose to users
    +
    729  }
    +
    730 
    +
    731  private:
    +
    732  template<
    +
    733  typename A = empty_list<std::pair<Name, empty_list<std::pair<Name, edge_segments_t<Symmetry>>>>>,
    +
    734  typename B = empty_list<Name>,
    +
    735  typename C = empty_list<std::pair<Name, empty_list<Name>>>,
    +
    736  typename D = empty_list<Name>,
    +
    737  typename E = empty_list<Name>,
    +
    738  typename F = empty_list<Name>,
    +
    739  typename G = empty_list<Name>,
    +
    740  typename H = empty_list<std::pair<Name, empty_list<std::pair<Symmetry, Size>>>>>
    +
    741  [[nodiscard]] Tensor<scalar_t, symmetry_t, name_t> edge_operator_implement(
    +
    742  const A& split_map,
    +
    743  const B& reversed_names,
    +
    744  const C& merge_map,
    +
    745  std::vector<Name> new_names,
    +
    746  const bool apply_parity,
    +
    747  const D& parity_exclude_names_split,
    +
    748  const E& parity_exclude_names_reversed_before_transpose,
    +
    749  const F& parity_exclude_names_reversed_after_transpose,
    +
    750  const G& parity_exclude_names_merge,
    +
    751  const H& edges_and_symmetries_to_cut_before_all
    +
    752  ) const;
    +
    753 
    +
    754  public:
    +
    760  template<typename ResultName = Name, typename = std::enable_if_t<is_name<ResultName>>>
    +
    761  [[nodiscard]] Tensor<ScalarType, Symmetry, ResultName> edge_rename(const std::unordered_map<Name, ResultName>& dictionary) const {
    +
    762  if constexpr (debug_mode) {
    +
    763  for (const auto& [name, new_name] : dictionary) {
    +
    764  if (auto found = find_by_name(name); found == names().end()) {
    +
    765  detail::error("Name missing in edge_rename");
    +
    766  }
    +
    767  }
    +
    768  }
    + +
    770  result.m_core = m_core; // shallow copy
    +
    771  result.m_names.reserve(rank());
    +
    772  std::transform(names().begin(), names().end(), std::back_inserter(result.m_names), [&dictionary](const Name& name) {
    +
    773  if (auto position = dictionary.find(name); position == dictionary.end()) {
    +
    774  if constexpr (std::is_same_v<ResultName, Name>) {
    +
    775  return name;
    +
    776  } else {
    +
    777  detail::error("New names not found in edge_rename which change type of name");
    +
    778  }
    +
    779  } else {
    +
    780  return position->second;
    +
    781  }
    +
    782  });
    +
    783  return result;
    +
    784  }
    +
    785 
    +
    791  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> transpose(std::vector<Name> target_names) const {
    +
    792  auto pmr_guard = scope_resource(default_buffer_size);
    +
    793  if (names() == target_names) {
    +
    794  return *this; // shallow copy
    +
    795  }
    +
    796  return edge_operator_implement({}, {}, {}, std::move(target_names), false, {}, {}, {}, {}, {});
    +
    797  }
    +
    798 
    + +
    807  const std::unordered_set<Name>& reversed_names,
    +
    808  bool apply_parity = false,
    +
    809  const std::unordered_set<Name>& parity_exclude_names = {}
    +
    810  ) const {
    +
    811  auto pmr_guard = scope_resource(default_buffer_size);
    +
    812  return edge_operator_implement({}, reversed_names, {}, names(), apply_parity, {}, parity_exclude_names, {}, {}, {});
    +
    813  }
    +
    814 
    +
    820  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> merge_edge(
    +
    821  const std::unordered_map<Name, std::vector<Name>>& merge,
    +
    822  bool apply_parity = false,
    +
    823  const std::unordered_set<Name>& parity_exclude_names_merge = {},
    +
    824  const std::unordered_set<Name>& parity_exclude_names_reverse = {}
    +
    825  ) const;
    +
    826 
    +
    831  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> split_edge(
    +
    832  const std::unordered_map<Name, std::vector<std::pair<Name, edge_segments_t<Symmetry>>>>& split,
    +
    833  bool apply_parity = false,
    +
    834  const std::unordered_set<Name>& parity_exclude_names_split = {}
    +
    835  ) const;
    +
    836 
    +
    837  // Contract
    +
    838  private:
    +
    839  [[nodiscard]] static Tensor<ScalarType, Symmetry, Name> contract_implement(
    +
    840  const Tensor<ScalarType, Symmetry, Name>& tensor_1,
    +
    841  const Tensor<ScalarType, Symmetry, Name>& tensor_2,
    +
    842  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
    +
    843  const std::unordered_set<Name>& fuse_names
    +
    844  );
    +
    845  public:
    +
    854  template<typename ScalarType1, typename ScalarType2, typename = std::enable_if_t<is_scalar<ScalarType1> && is_scalar<ScalarType2>>>
    +
    855  [[nodiscard]] static auto contract(
    +
    856  const Tensor<ScalarType1, Symmetry, Name>& tensor_1,
    +
    857  const Tensor<ScalarType2, Symmetry, Name>& tensor_2,
    +
    858  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
    +
    859  const std::unordered_set<Name>& fuse_names = {}
    +
    860  ) {
    +
    861  using ResultScalarType = std::common_type_t<ScalarType1, ScalarType2>;
    +
    862  using ResultTensor = Tensor<ResultScalarType, Symmetry, Name>;
    +
    863  // Maybe shallow copy happened here
    +
    864  return ResultTensor::contract_implement(
    +
    865  tensor_1.template to<ResultScalarType>(),
    +
    866  tensor_2.template to<ResultScalarType>(),
    +
    867  contract_pairs,
    +
    868  fuse_names
    +
    869  );
    +
    870  }
    +
    871 
    +
    872  template<typename OtherScalarType, typename = std::enable_if_t<is_scalar<OtherScalarType>>>
    +
    873  [[nodiscard]] auto contract(
    +
    874  const Tensor<OtherScalarType, Symmetry, Name>& tensor_2,
    +
    875  const std::unordered_set<std::pair<Name, Name>>& contract_pairs,
    +
    876  const std::unordered_set<Name>& fuse_names = {}
    +
    877  ) const {
    +
    878  return contract(*this, tensor_2, contract_pairs, fuse_names);
    +
    879  }
    +
    880 
    +
    887  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> conjugate(bool trivial_metric = false) const;
    +
    888 
    +
    889  [[deprecated("identity(...) is renamed to identity_(...)")]] Tensor<ScalarType, Symmetry, Name>& identity(
    +
    890  const std::unordered_set<std::pair<Name, Name>>& pairs
    +
    891  ) & {
    +
    892  return identity_(pairs);
    +
    893  }
    +
    894  [[deprecated("identity(...) is renamed to identity_(...)"), nodiscard]] Tensor<ScalarType, Symmetry, Name>&& identity(
    +
    895  const std::unordered_set<std::pair<Name, Name>>& pairs
    +
    896  ) && {
    +
    897  return std::move(identity_(pairs));
    +
    898  }
    +
    903  Tensor<ScalarType, Symmetry, Name>& identity_(const std::unordered_set<std::pair<Name, Name>>& pairs) &;
    +
    904 
    +
    905  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& identity_(const std::unordered_set<std::pair<Name, Name>>& pairs) && {
    +
    906  return std::move(identity_(pairs));
    +
    907  }
    +
    908 
    +
    914  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> exponential(const std::unordered_set<std::pair<Name, Name>>& pairs, int step = 2) const;
    +
    915 
    +
    921  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> trace(
    +
    922  const std::unordered_set<std::pair<Name, Name>>& trace_pairs,
    +
    923  const std::unordered_map<Name, std::pair<Name, Name>>& fuse_names = {}
    +
    924  ) const;
    +
    925 
    +
    929  struct svd_result {
    + + + +
    933  };
    +
    934 
    +
    938  struct qr_result {
    + + +
    941  };
    +
    942 
    +
    954  [[nodiscard]] svd_result svd(
    +
    955  const std::unordered_set<Name>& free_names_u,
    +
    956  const Name& common_name_u,
    +
    957  const Name& common_name_v,
    +
    958  const Name& singular_name_u,
    +
    959  const Name& singular_name_v,
    +
    960  Cut cut = Cut()
    +
    961  ) const;
    +
    962 
    +
    972  [[nodiscard]] qr_result
    +
    973  qr(char free_names_direction, const std::unordered_set<Name>& free_names, const Name& common_name_q, const Name& common_name_r) const;
    +
    974 
    +
    980  [[nodiscard]] Tensor<ScalarType, Symmetry, Name> expand(
    +
    981  const std::unordered_map<Name, std::pair<Size, Edge<Symmetry>>>& configure,
    +
    982  const Name& old_name = InternalName<Name>::No_Old_Name
    +
    983  ) const;
    + +
    991  shrink(const std::unordered_map<Name, Size>& configure, const Name& new_name = InternalName<Name>::No_New_Name, Arrow arrow = false) const;
    +
    992 
    +
    993  [[nodiscard]] std::string show() const;
    +
    994  [[nodiscard]] std::string dump() const;
    +
    995  Tensor<ScalarType, Symmetry, Name>& load(const std::string&) &;
    +
    996  [[nodiscard]] Tensor<ScalarType, Symmetry, Name>&& load(const std::string& string) && {
    +
    997  return std::move(load(string));
    +
    998  }
    +
    999 
    +
    1000  void _block_order_v0_to_v1() {
    +
    1001  m_core->_block_order_v0_to_v1();
    +
    1002  }
    +
    1003  };
    +
    1004 
    +
    1005  namespace detail {
    +
    1006  template<typename T>
    +
    1007  struct is_tensor_helper : std::false_type { };
    +
    1008  template<typename A, typename B, typename C>
    +
    1009  struct is_tensor_helper<Tensor<A, B, C>> : std::true_type { };
    +
    1010  } // namespace detail
    +
    1011  template<typename T>
    +
    1012  constexpr bool is_tensor = detail::is_tensor_helper<T>::value;
    +
    1013 
    +
    1014  template<typename ScalarType1, typename ScalarType2, typename Symmetry, typename Name>
    +
    1015  [[nodiscard]] auto contract(
    +
    1016  const Tensor<ScalarType1, Symmetry, Name>& tensor_1,
    +
    1017  const Tensor<ScalarType2, Symmetry, Name>& tensor_2,
    +
    1018  const std::unordered_set<std::pair<Name, Name>>& contract_pairs
    +
    1019  ) {
    +
    1020  return tensor_1.contract(tensor_2, contract_pairs);
    +
    1021  }
    +
    1022 
    +
    1023  template<typename ScalarType, typename Symmetry, typename Name>
    +
    1024  struct TensorShape {
    +
    1025  static_assert(is_scalar<ScalarType> && is_symmetry<Symmetry> && is_name<Name>);
    +
    1026 
    + +
    1028  };
    +
    1029 
    +
    1030  // TODO quasi tensor (middle value between edge_operator)
    +
    1031 } // namespace TAT
    +
    1032 #endif
    +
    Contains nearly all tensor data except edge name, include edge shape and tensor content.
    Definition: core.hpp:45
    +
    The shape of tensor edge, is a list of pair of symmetry and size, which construct a structure like li...
    Definition: edge.hpp:252
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    static auto contract(const Tensor< ScalarType1, Symmetry, Name > &tensor_1, const Tensor< ScalarType2, Symmetry, Name > &tensor_2, const std::unordered_set< std::pair< Name, Name >> &contract_pairs, const std::unordered_set< Name > &fuse_names={})
    Calculate product of two tensor.
    Definition: tensor.hpp:855
    +
    Tensor< NewScalarType, Symmetry, Name > same_shape() const
    Generate a tensor with the same shape.
    Definition: tensor.hpp:474
    +
    auto map(Function &&function) const
    Do the same operator to the every value element of the tensor, outplacely.
    Definition: tensor.hpp:485
    +
    Tensor< ScalarType, Symmetry, ResultName > edge_rename(const std::unordered_map< Name, ResultName > &dictionary) const
    Rename the edge name of tensor.
    Definition: tensor.hpp:761
    +
    Tensor< ScalarType, Symmetry, Name > & range_(ScalarType first=0, ScalarType step=1) &
    Set the value of tensor as natural number, used for test.
    Definition: tensor.hpp:584
    +
    Tensor< ScalarType, Symmetry, Name > transpose(std::vector< Name > target_names) const
    Transpose the tensor.
    Definition: tensor.hpp:791
    +
    Tensor< ScalarType, NoSymmetry, Name > clear_bose_symmetry() const
    Convert symmetry tensor to non-symmetry tensor.
    Definition: clear_symmetry.hpp:30
    +
    real_scalar< ScalarType > norm() const
    Get the norm of the tensor.
    Definition: tensor.hpp:632
    +
    void acquire_data_ownership(const char *message="")
    Acquire tensor data's ownership, it will copy the core if the core is shared.
    Definition: tensor.hpp:599
    +
    Tensor< ScalarType, ParitySymmetry, Name > clear_fermi_symmetry() const
    Convert fermionic symmetry tensor to parity symmetry tensor.
    Definition: clear_symmetry.hpp:70
    +
    TensorShape< ScalarType, Symmetry, Name > shape() const
    Get tensor shape to print, used when you don't want to know value of the tensor.
    Definition: tensor.hpp:313
    +
    Tensor< ScalarType, Symmetry, Name > & set_(Generator &&generator) &
    Set value of tensor by a generator elementwisely.
    Definition: tensor.hpp:546
    +
    Tensor< ScalarType, Symmetry, Name > edge_operator(const std::unordered_map< Name, std::vector< std::pair< Name, edge_segments_t< Symmetry >>>> &split_map, const std::unordered_set< Name > &reversed_names, const std::unordered_map< Name, std::vector< Name >> &merge_map, std::vector< Name > new_names, const bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names_split={}, const std::unordered_set< Name > &parity_exclude_names_reversed_before_transpose={}, const std::unordered_set< Name > &parity_exclude_names_reversed_after_transpose={}, const std::unordered_set< Name > &parity_exclude_names_merge={}) const
    The core method for various edge operations, include split, reverse, merge and transpose.
    Definition: tensor.hpp:703
    +
    Tensor< ScalarType, Symmetry, Name > reverse_edge(const std::unordered_set< Name > &reversed_names, bool apply_parity=false, const std::unordered_set< Name > &parity_exclude_names={}) const
    Reverse fermi arrow of some edge for fermi tensor.
    Definition: tensor.hpp:806
    +
    Tensor< ScalarType, Symmetry, Name > copy() const
    Tensor deep copy, default copy will share the common data, i.e.
    Definition: tensor.hpp:529
    +
    Tensor< OtherScalarType, Symmetry, Name > to() const
    Change the basic scalar type of the tensor.
    Definition: tensor.hpp:612
    +
    Tensor< ScalarType, Symmetry, Name > & zero_() &
    Set all the value of the tensor to zero.
    Definition: tensor.hpp:566
    +
    Tensor(std::vector< Name > input_names, std::vector< Edge< Symmetry >> input_edges)
    Initialize tensor with tensor edge name and tensor edge shape, blocks will be generated by edges.
    Definition: tensor.hpp:327
    +
    Tensor< ScalarType, Symmetry, Name > & transform_(Function &&function) &
    Do the same operator to the every value element of the tensor, inplacely.
    Definition: tensor.hpp:430
    +
    Tensor(scalar_t number, std::vector< Name > input_names={}, const std::vector< symmetry_t > &edge_symmetry={}, const std::vector< Arrow > &edge_arrow={})
    Create a high rank tensor but which only contains one element.
    Definition: tensor.hpp:350
    +
    Definition: edge.hpp:33
    +
    Definition: multidimension_span.hpp:33
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    std::uint16_t Rank
    Tensor rank type.
    Definition: common_variable.hpp:149
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    bool Arrow
    Fermi arrow type.
    Definition: common_variable.hpp:166
    +
    typename detail::real_scalar_helper< T >::type real_scalar
    Get corresponding real type, used in svd and norm.
    Definition: common_variable.hpp:201
    +
    Used to describle how to cut when doing svd to a tensor.
    Definition: tensor.hpp:53
    +
    For every Name type, some internal name is needed.
    Definition: name.hpp:112
    +
    Definition: tensor.hpp:49
    +
    Definition: tensor.hpp:45
    +
    Definition: tensor.hpp:41
    +
    General symmetry type, used to mark edge index the different transform rule when some symmetric opera...
    Definition: symmetry.hpp:95
    +
    Definition: tensor.hpp:1024
    +
    QR result type.
    Definition: tensor.hpp:938
    +
    SVD result type.
    Definition: tensor.hpp:929
    +
    Definition: allocator.hpp:295
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    +
    + + + + diff --git a/timer_8hpp.html b/timer_8hpp.html new file mode 100644 index 000000000..931e781a9 --- /dev/null +++ b/timer_8hpp.html @@ -0,0 +1,134 @@ + + + + + + + +TAT: include/TAT/utility/timer.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    timer.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    +
    #include <chrono>
    +#include <stack>
    +#include <string>
    +#include <utility>
    +#include <vector>
    +#include "common_variable.hpp"
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Classes

    struct  TAT::timer
     
    struct  TAT::timer::timer_guard
     
    + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/timer_8hpp.js b/timer_8hpp.js new file mode 100644 index 000000000..21468e1c7 --- /dev/null +++ b/timer_8hpp.js @@ -0,0 +1,6 @@ +var timer_8hpp = +[ + [ "timer", "structTAT_1_1timer.html", "structTAT_1_1timer" ], + [ "timer_guard", "structTAT_1_1timer_1_1timer__guard.html", null ], + [ "TAT_TIMER_HPP", "timer_8hpp.html#ae43a392082fa7de5b3d827d152e517c0", null ] +]; \ No newline at end of file diff --git a/timer_8hpp_source.html b/timer_8hpp_source.html new file mode 100644 index 000000000..93f30d308 --- /dev/null +++ b/timer_8hpp_source.html @@ -0,0 +1,199 @@ + + + + + + + +TAT: include/TAT/utility/timer.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    timer.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_TIMER_HPP
    +
    22 #define TAT_TIMER_HPP
    +
    23 
    +
    24 #include <chrono>
    +
    25 #include <stack>
    +
    26 #include <string>
    +
    27 #include <utility>
    +
    28 #include <vector>
    +
    29 
    +
    30 #include "common_variable.hpp"
    +
    31 
    +
    32 namespace TAT {
    +
    33 #ifdef TAT_USE_TIMER
    +
    42  struct timer {
    +
    43  private:
    +
    44  using time_point = std::chrono::high_resolution_clock::time_point;
    +
    45  using time_duration = std::chrono::high_resolution_clock::duration;
    +
    46  using time_pair = std::pair<time_point, time_duration>;
    +
    47 
    +
    48  private:
    +
    49  static auto get_current_time() {
    +
    50  return std::chrono::high_resolution_clock::now();
    +
    51  }
    +
    52  static auto duration_to_second(const time_duration& count) {
    +
    53  return std::chrono::duration<double>(count).count();
    +
    54  }
    +
    55 
    +
    56  private:
    +
    57  struct timer_stack_t {
    +
    58  std::stack<time_pair, std::vector<time_pair>> stack;
    +
    59  timer_stack_t() {
    +
    60  stack.push({get_current_time(), time_duration::zero()});
    +
    61  }
    +
    62  ~timer_stack_t() {
    +
    63  const auto& [start_point, children_time] = stack.top();
    +
    64  auto program_total_time = get_current_time() - start_point;
    +
    65  auto program_misc_time = program_total_time - children_time;
    +
    66  detail::log(("total : " + std::to_string(duration_to_second(program_total_time)) + ", " +
    +
    67  std::to_string(duration_to_second(program_misc_time)))
    +
    68  .c_str());
    +
    69  }
    +
    70  };
    +
    71  inline static auto timer_stack = timer_stack_t();
    +
    72 
    +
    73  std::string timer_name;
    +
    77  time_duration timer_total_count;
    +
    81  time_duration timer_self_count;
    +
    82 
    +
    83  public:
    +
    87  timer(const char* name) : timer_name(name), timer_total_count(time_duration::zero()), timer_self_count(time_duration::zero()) { }
    +
    88 
    +
    89  ~timer() {
    +
    90  if (timer_total_count.count() != 0) {
    +
    91  auto self_count_in_second = std::chrono::duration<float>(timer_self_count).count();
    +
    92  auto total_count_in_second = std::chrono::duration<float>(timer_total_count).count();
    +
    93  detail::log((timer_name + " : " + std::to_string(total_count_in_second) + ", " + std::to_string(self_count_in_second)).c_str());
    +
    94  }
    +
    95  }
    +
    96 
    +
    97  struct timer_guard {
    +
    98  private:
    +
    99  timer* owner;
    +
    100 
    +
    101  public:
    +
    102  timer_guard(timer* owner) : owner(owner) {
    +
    103  timer_stack.stack.push({get_current_time(), time_duration::zero()});
    +
    104  }
    +
    105 
    +
    106  ~timer_guard() {
    +
    107  const auto& [start_point, children_time] = timer_stack.stack.top();
    +
    108  auto this_guard_time = get_current_time() - start_point;
    +
    109  owner->timer_total_count += this_guard_time;
    +
    110  owner->timer_self_count += this_guard_time - children_time;
    +
    111  timer_stack.stack.pop();
    +
    112  timer_stack.stack.top().second += this_guard_time;
    +
    113  }
    +
    114  };
    +
    115 
    +
    119  auto operator()() {
    +
    120  return timer_guard(this);
    +
    121  }
    +
    122  };
    +
    123 #else
    +
    124  struct timer {
    +
    125  struct timer_guard { };
    +
    126  auto operator()() {
    +
    127  return timer_guard{};
    +
    128  }
    +
    129  timer(const char*) { }
    +
    130  };
    +
    131 #endif
    +
    132 } // namespace TAT
    +
    133 #endif
    +
    Copyright (C) 2019-2023 Hao Zhangzh970205@mail.ustc.edu.cn
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    Definition: timer.hpp:125
    +
    Definition: timer.hpp:124
    +
    +
    + + + + diff --git a/trace_8hpp.html b/trace_8hpp.html new file mode 100644 index 000000000..1abc8edfc --- /dev/null +++ b/trace_8hpp.html @@ -0,0 +1,142 @@ + + + + + + + +TAT: include/TAT/implement/trace.hpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    trace.hpp File Reference
    +
    +
    + +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

     TAT
     TAT is A Tensor library.
     
    + + + + + + + +

    +Functions

    +template<typename ScalarType , typename Symmetry , typename Name >
    Tensor< ScalarType, Symmetry, Name > TAT::trace_with_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor, const std::unordered_set< std::pair< Name, Name >> &trace_pairs, const std::unordered_map< Name, std::pair< Name, Name >> &fuse_names)
     
    +template<typename ScalarType , typename Symmetry , typename Name >
    Tensor< ScalarType, Symmetry, Name > TAT::trace_without_fuse (const Tensor< ScalarType, Symmetry, Name > &tensor, const std::unordered_set< std::pair< Name, Name >> &trace_pairs)
     
    + + + +

    +Variables

    +timer TAT::trace_guard ("trace")
     
    +

    Detailed Description

    +

    Copyright (C) 2019-2023 Hao Zhangzh970.nosp@m.205@.nosp@m.mail..nosp@m.ustc.nosp@m..edu..nosp@m.cn

    +

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

    +

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    +

    You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

    +
    +
    + + + + diff --git a/trace_8hpp.js b/trace_8hpp.js new file mode 100644 index 000000000..2cb87cc16 --- /dev/null +++ b/trace_8hpp.js @@ -0,0 +1,7 @@ +var trace_8hpp = +[ + [ "TAT_TRACE_HPP", "trace_8hpp.html#a77769da0c0eb51431cd06110b0256e29", null ], + [ "trace_with_fuse", "trace_8hpp.html#af2a118f08f742b75afe835daba6fdb91", null ], + [ "trace_without_fuse", "trace_8hpp.html#aca3223eb1d72c9dd625cb0e0310cc8f5", null ], + [ "trace_guard", "trace_8hpp.html#acca638529aa0d6db06d5dc7f29c2fcd1", null ] +]; \ No newline at end of file diff --git a/trace_8hpp_source.html b/trace_8hpp_source.html new file mode 100644 index 000000000..1f8a7109f --- /dev/null +++ b/trace_8hpp_source.html @@ -0,0 +1,484 @@ + + + + + + + +TAT: include/TAT/implement/trace.hpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    TAT +  0.3.12 +
    +
    TAT is A Tensor library
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    trace.hpp
    +
    +
    +Go to the documentation of this file.
    1 
    +
    20 #pragma once
    +
    21 #ifndef TAT_TRACE_HPP
    +
    22 #define TAT_TRACE_HPP
    +
    23 
    +
    24 #include "../structure/tensor.hpp"
    +
    25 #include "../utility/const_integral.hpp"
    +
    26 #include "../utility/timer.hpp"
    +
    27 
    +
    28 namespace TAT {
    +
    29  template<typename ScalarType, typename Symmetry, typename Name>
    +
    30  Tensor<ScalarType, Symmetry, Name> trace_with_fuse(
    +
    31  const Tensor<ScalarType, Symmetry, Name>& tensor,
    +
    32  const std::unordered_set<std::pair<Name, Name>>& trace_pairs,
    +
    33  const std::unordered_map<Name, std::pair<Name, Name>>& fuse_names
    +
    34  ) {
    +
    35  auto rank = tensor.rank();
    +
    36  auto trace_rank = trace_pairs.size();
    +
    37  auto fuse_rank = fuse_names.size();
    +
    38  auto free_rank = rank - 2 * trace_rank - 2 * fuse_rank;
    +
    39 
    +
    40  // transpose to a_ji = b_{kkjji}, this is the most fast way to trace
    +
    41  auto trace_1_names = pmr::vector<Name>();
    +
    42  auto trace_2_names = pmr::vector<Name>();
    +
    43  auto fuse_1_names = pmr::vector<Name>();
    +
    44  auto fuse_2_names = pmr::vector<Name>();
    +
    45  trace_1_names.reserve(trace_rank);
    +
    46  trace_2_names.reserve(trace_rank);
    +
    47  fuse_1_names.reserve(fuse_rank);
    +
    48  fuse_2_names.reserve(fuse_rank);
    +
    49 
    +
    50  auto nonfree_names = pmr::unordered_set<Name>(unordered_parameter * rank);
    +
    51 
    +
    52  auto fuse_split_plan = pmr::vector<std::pair<Name, edge_segments_t<Symmetry>>>();
    +
    53  fuse_split_plan.reserve(fuse_rank);
    +
    54  // need to call std::reverse on it, but edge segment pointer cannot be swapped.
    +
    55  // luck, for no symmetry, segment is very light, so use the segment vector directly, rather than pointer.
    +
    56 
    +
    57  // traced edge
    +
    58  auto valid_indices = pmr::vector<bool>(rank, true);
    +
    59  for (auto i = rank; i-- > 0;) {
    +
    60  // if possible, let names order unchanged
    +
    61 
    +
    62  // trace
    +
    63  if (valid_indices[i]) {
    +
    64  const auto& name_to_find = tensor.names(i);
    +
    65  const Name* name_correspond = nullptr;
    +
    66  for (const auto& [name_1, name_2] : trace_pairs) {
    +
    67  if (name_1 == name_to_find) {
    +
    68  name_correspond = &name_2;
    +
    69  break;
    +
    70  }
    +
    71  if (name_2 == name_to_find) {
    +
    72  name_correspond = &name_1;
    +
    73  break;
    +
    74  }
    +
    75  }
    +
    76  if (name_correspond) {
    +
    77  // found in trace_names
    +
    78  trace_1_names.push_back(*name_correspond);
    +
    79  trace_2_names.push_back(name_to_find);
    +
    80  // trace_1 is in front of trace_2
    +
    81  // name_correspond is in front of name_to_find
    +
    82 
    +
    83  nonfree_names.insert(name_to_find);
    +
    84  nonfree_names.insert(*name_correspond);
    +
    85  auto index_correspond = tensor.rank_by_name(*name_correspond);
    +
    86  valid_indices[i] = false;
    +
    87  valid_indices[index_correspond] = false;
    +
    88  }
    +
    89  }
    +
    90 
    +
    91  // fuse
    +
    92  if (valid_indices[i]) {
    +
    93  const auto& name_to_find = tensor.names(i);
    +
    94  const Name* name_correspond = nullptr;
    +
    95  const Name* name_fused = nullptr;
    +
    96  for (const auto& [fused_name, name_1_name_2] : fuse_names) {
    +
    97  const auto& [name_1, name_2] = name_1_name_2;
    +
    98 
    +
    99  if (name_1 == name_to_find) {
    +
    100  name_fused = &fused_name;
    +
    101  name_correspond = &name_2;
    +
    102  break;
    +
    103  }
    +
    104  if (name_2 == name_to_find) {
    +
    105  name_fused = &fused_name;
    +
    106  name_correspond = &name_1;
    +
    107  break;
    +
    108  }
    +
    109  }
    +
    110  if (name_correspond) {
    +
    111  // found in fuse_names
    +
    112  fuse_1_names.push_back(*name_correspond);
    +
    113  fuse_2_names.push_back(name_to_find);
    +
    114  fuse_split_plan.push_back({*name_fused, {tensor.edges(i).segments()}});
    +
    115  // fuse_1 is in front of fuse_2
    +
    116  // name_correspond is in front of name_to_find
    +
    117 
    +
    118  nonfree_names.insert(name_to_find);
    +
    119  nonfree_names.insert(*name_correspond);
    +
    120  auto index_correspond = tensor.rank_by_name(*name_correspond);
    +
    121  valid_indices[i] = false;
    +
    122  valid_indices[index_correspond] = false;
    +
    123  }
    +
    124  }
    +
    125  }
    +
    126  std::reverse(trace_1_names.begin(), trace_1_names.end());
    +
    127  std::reverse(trace_2_names.begin(), trace_2_names.end());
    +
    128  std::reverse(fuse_1_names.begin(), fuse_1_names.end());
    +
    129  std::reverse(fuse_2_names.begin(), fuse_2_names.end());
    +
    130  std::reverse(fuse_split_plan.begin(), fuse_split_plan.end());
    +
    131 
    +
    132  auto result_names = std::vector<Name>();
    +
    133  result_names.reserve(fuse_rank + free_rank);
    +
    134  for (const auto& [fuse_name, fuse_edge] : fuse_split_plan) {
    +
    135  result_names.push_back(fuse_name);
    +
    136  }
    +
    137  auto free_names = pmr::vector<Name>();
    +
    138  free_names.reserve(free_rank);
    +
    139  auto free_split_plan = pmr::vector<std::pair<Name, edge_segments_t<Symmetry>>>();
    +
    140  free_split_plan.reserve(free_rank);
    +
    141  for (Rank i = 0; i < rank; i++) {
    +
    142  const auto& name = tensor.names(i);
    +
    143  if (auto found = nonfree_names.find(name); found == nonfree_names.end()) {
    +
    144  // it is free name
    +
    145  const auto& this_edge = tensor.edges(i);
    +
    146  result_names.push_back(name);
    +
    147  free_names.push_back(name);
    +
    148  free_split_plan.push_back({name, {this_edge.segments()}});
    +
    149  }
    +
    150  }
    +
    151 
    +
    152  auto merged_tensor = tensor.edge_operator_implement(
    +
    153  {},
    +
    154  {},
    +
    155  pmr::map<Name, pmr::vector<Name>>{
    +
    156  {InternalName<Name>::Trace_1, std::move(trace_1_names)},
    +
    157  {InternalName<Name>::Trace_2, std::move(trace_2_names)},
    +
    158  {InternalName<Name>::Trace_3, std::move(fuse_1_names)},
    +
    159  {InternalName<Name>::Trace_4, std::move(fuse_2_names)},
    +
    160  {InternalName<Name>::Trace_5, std::move(free_names)}},
    +
    161  std::vector<Name>{
    +
    162  InternalName<Name>::Trace_1,
    +
    163  InternalName<Name>::Trace_2,
    +
    164  InternalName<Name>::Trace_3,
    +
    165  InternalName<Name>::Trace_4,
    +
    166  InternalName<Name>::Trace_5},
    +
    167  false,
    +
    168  {},
    +
    169  {},
    +
    170  {},
    +
    171  {},
    +
    172  {}
    +
    173  );
    +
    174 
    +
    175  auto traced_tensor = Tensor<ScalarType, Symmetry, Name>(
    +
    176  {InternalName<Name>::Trace_4, InternalName<Name>::Trace_5},
    +
    177  {merged_tensor.edges(3), merged_tensor.edges(4)}
    +
    178  )
    +
    179  .zero_();
    +
    180 
    +
    181  // move data
    +
    182  const Size trace_size = merged_tensor.edges(0).total_dimension();
    +
    183  const Size fuse_size = merged_tensor.edges(2).total_dimension();
    +
    184  const Size free_size = merged_tensor.edges(4).total_dimension();
    +
    185 
    +
    186  ScalarType* destination_block = traced_tensor.storage().data();
    +
    187  const ScalarType* source_block = merged_tensor.storage().data();
    +
    188 
    +
    189  std::visit(
    +
    190  // If these variables are not captured explicitly, old compiler such as gcc7 will fail to compile
    +
    191  [&trace_size, &fuse_size, &destination_block, &source_block](const auto& const_free_size) {
    +
    192  const Size free_size = const_free_size.value();
    +
    193  for (auto k = 0; k < trace_size; k++) {
    +
    194  for (auto j = 0; j < fuse_size; j++) {
    +
    195  ScalarType* __restrict destination_data = destination_block + j * free_size;
    +
    196  const ScalarType* __restrict source_data =
    +
    197  source_block + (((k * trace_size + k) * fuse_size + j) * fuse_size + j) * free_size;
    +
    198  for (auto i = 0; i < free_size; i++) {
    +
    199  // dst[j, i] += src[k, k, j, j, i];
    +
    200  destination_data[i] += source_data[i];
    +
    201  }
    +
    202  }
    +
    203  }
    +
    204  },
    +
    205  to_const_integral_0_to_16<Size>(free_size)
    +
    206  );
    +
    207 
    +
    208  auto result = traced_tensor.edge_operator_implement(
    +
    209  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry>>>>{
    +
    210  {InternalName<Name>::Trace_4, std::move(fuse_split_plan)},
    +
    211  {InternalName<Name>::Trace_5, std::move(free_split_plan)}},
    +
    212  {},
    +
    213  {},
    +
    214  std::move(result_names),
    +
    215  false,
    +
    216  {},
    +
    217  {},
    +
    218  {},
    +
    219  {},
    +
    220  {}
    +
    221  );
    +
    222  return result;
    +
    223  }
    +
    224 
    +
    225  template<typename ScalarType, typename Symmetry, typename Name>
    +
    226  Tensor<ScalarType, Symmetry, Name>
    +
    227  trace_without_fuse(const Tensor<ScalarType, Symmetry, Name>& tensor, const std::unordered_set<std::pair<Name, Name>>& trace_pairs) {
    +
    228  constexpr bool is_fermi = Symmetry::is_fermi_symmetry;
    +
    229 
    +
    230  auto rank = tensor.rank();
    +
    231  auto trace_rank = trace_pairs.size();
    +
    232  auto free_rank = rank - 2 * trace_rank;
    +
    233 
    +
    234  // transpose to a_i = b_{jji}, this is the most fast way to trace
    +
    235  auto traced_names = pmr::unordered_set<Name>(unordered_parameter * rank);
    +
    236  auto trace_1_names = pmr::vector<Name>();
    +
    237  auto trace_2_names = pmr::vector<Name>();
    +
    238  trace_1_names.reserve(trace_rank);
    +
    239  trace_2_names.reserve(trace_rank);
    +
    240 
    +
    241  // reverse before merge
    +
    242  auto reverse_names = pmr::unordered_set<Name>(unordered_parameter * rank); // use in both merge and split
    +
    243  auto traced_reverse_flag = pmr::unordered_set<Name>(unordered_parameter * rank); // use for merge
    +
    244 
    +
    245  // traced edge
    +
    246  auto valid_indices = pmr::vector<bool>(rank, true);
    +
    247  for (auto i = rank; i-- > 0;) {
    +
    248  // if possible, let names order unchanged
    +
    249  if (valid_indices[i]) {
    +
    250  const auto& name_to_find = tensor.names(i);
    +
    251  const Name* name_correspond = nullptr;
    +
    252  for (const auto& [name_1, name_2] : trace_pairs) {
    +
    253  if (name_1 == name_to_find) {
    +
    254  name_correspond = &name_2;
    +
    255  break;
    +
    256  }
    +
    257  if (name_2 == name_to_find) {
    +
    258  name_correspond = &name_1;
    +
    259  break;
    +
    260  }
    +
    261  }
    +
    262  if (name_correspond) {
    +
    263  // found in trace_names
    +
    264  // trace_1 arrow true, trace_2 arrow false
    +
    265  // so that (a b c)(b+ a+) = (c)
    +
    266  if constexpr (is_fermi) {
    +
    267  if (tensor.edges(i).arrow()) {
    +
    268  // need reversed
    +
    269  traced_reverse_flag.insert(name_to_find);
    +
    270  reverse_names.insert(name_to_find);
    +
    271  reverse_names.insert(*name_correspond);
    +
    272  }
    +
    273  }
    +
    274  trace_1_names.push_back(*name_correspond);
    +
    275  trace_2_names.push_back(name_to_find);
    +
    276  // trace_1 is in front of trace_2
    +
    277  // name_correspond is in front of name_to_find
    +
    278 
    +
    279  traced_names.insert(name_to_find);
    +
    280  traced_names.insert(*name_correspond);
    +
    281  auto index_correspond = tensor.rank_by_name(*name_correspond);
    +
    282  valid_indices[i] = false;
    +
    283  valid_indices[index_correspond] = false;
    +
    284 
    +
    285  if constexpr (debug_mode) {
    +
    286  if (tensor.edges(i).conjugate() != tensor.edges(index_correspond)) {
    +
    287  detail::error("Incompatible edge in trace");
    +
    288  }
    +
    289  }
    +
    290  }
    +
    291  }
    +
    292  }
    +
    293  std::reverse(trace_1_names.begin(), trace_1_names.end());
    +
    294  std::reverse(trace_2_names.begin(), trace_2_names.end());
    +
    295 
    +
    296  // free edge
    +
    297  auto result_names = std::vector<Name>();
    +
    298  result_names.reserve(free_rank);
    +
    299  auto split_plan = pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>();
    +
    300  split_plan.reserve(free_rank);
    +
    301  for (Rank i = 0; i < rank; i++) {
    +
    302  const auto& name = tensor.names(i);
    +
    303  if (auto found = traced_names.find(name); found == traced_names.end()) {
    +
    304  // it is free name
    +
    305  const auto& this_edge = tensor.edges(i);
    +
    306  result_names.push_back(name);
    +
    307  split_plan.push_back({name, {this_edge.segments()}});
    +
    308  if constexpr (is_fermi) {
    +
    309  if (this_edge.arrow()) {
    +
    310  reverse_names.insert(name);
    +
    311  }
    +
    312  }
    +
    313  }
    +
    314  }
    +
    315 
    +
    316  auto merged_tensor = tensor.edge_operator_implement(
    +
    317  {},
    +
    318  reverse_names,
    +
    319  pmr::map<Name, pmr::vector<Name>>{
    +
    320  {InternalName<Name>::Trace_1, std::move(trace_1_names)},
    +
    321  {InternalName<Name>::Trace_2, std::move(trace_2_names)},
    +
    322  {InternalName<Name>::Trace_3, {result_names.begin(), result_names.end()}}},
    +
    323  std::vector<Name>{InternalName<Name>::Trace_1, InternalName<Name>::Trace_2, InternalName<Name>::Trace_3},
    +
    324  false,
    +
    325  {},
    +
    326  traced_reverse_flag, // reverse the trace edge as needed
    +
    327  {},
    +
    328  pmr::set<Name>{InternalName<Name>::Trace_1}, // merge, half of traced edge need to apply parity.
    +
    329  {}
    +
    330  );
    +
    331  // trace 1 is connected to trace_2, so one of then is applied sign, another is not
    +
    332  // trace 3 will be reversed/splitted later, nothing changed
    +
    333  auto traced_tensor = Tensor<ScalarType, Symmetry, Name>({InternalName<Name>::Trace_3}, {merged_tensor.edges(2)}).zero_();
    +
    334  auto& destination_block = traced_tensor.storage();
    +
    335  // only one block here
    +
    336  const Size line_size = destination_block.size();
    +
    337 
    +
    338  std::visit(
    +
    339  [&](const auto& const_line_size) {
    +
    340  const auto line_size = const_line_size.value();
    +
    341  auto free_position_trivial_symmetry = merged_tensor.edges(2).position_by_symmetry(Symmetry());
    +
    342  for (Size position = 0; position < merged_tensor.edges(0).segments_size(); position++) {
    +
    343  auto dimension = merged_tensor.edges(0).segments(position).second;
    +
    344  auto source_block = merged_tensor.blocks(pmr::vector<Size>{position, position, free_position_trivial_symmetry});
    +
    345  auto dimension_plus_one = dimension + 1;
    +
    346  for (Size i = 0; i < dimension; i++) {
    +
    347  const ScalarType* __restrict source_data = source_block.data() + dimension_plus_one * i * line_size;
    +
    348  ScalarType* __restrict destination_data = destination_block.data();
    +
    349  for (Size j = 0; j < line_size; j++) {
    +
    350  destination_data[j] += source_data[j];
    +
    351  }
    +
    352  }
    +
    353  }
    +
    354  },
    +
    355  to_const_integral_0_to_16<Size>(line_size)
    +
    356  );
    +
    357 
    +
    358  auto result = traced_tensor.edge_operator_implement(
    +
    359  pmr::map<Name, pmr::vector<std::pair<Name, edge_segments_t<Symmetry, true>>>>{{InternalName<Name>::Trace_3, std::move(split_plan)}},
    +
    360  reverse_names, // more than it have, it contains some traced edge, but it is ok
    +
    361  {},
    +
    362  std::move(result_names),
    +
    363  false,
    +
    364  {},
    +
    365  {},
    +
    366  {},
    +
    367  {},
    +
    368  {}
    +
    369  );
    +
    370  return result;
    +
    371  }
    +
    372 
    +
    373  inline timer trace_guard("trace");
    +
    374 
    +
    375  template<typename ScalarType, typename Symmetry, typename Name>
    + +
    377  const std::unordered_set<std::pair<Name, Name>>& trace_pairs,
    +
    378  const std::unordered_map<Name, std::pair<Name, Name>>& fuse_names
    +
    379  ) const {
    +
    380  auto pmr_guard = scope_resource(default_buffer_size);
    +
    381  auto timer_guard = trace_guard();
    +
    382  if constexpr (Symmetry::length == 0) {
    +
    383  return trace_with_fuse(*this, trace_pairs, fuse_names);
    +
    384  } else {
    +
    385  if constexpr (debug_mode) {
    +
    386  if (fuse_names.size() != 0) {
    +
    387  detail::error("Cannot fuse edge of symmetric tensor");
    +
    388  }
    +
    389  }
    +
    390  return trace_without_fuse(*this, trace_pairs);
    +
    391  }
    +
    392  }
    +
    393 
    +
    394 } // namespace TAT
    +
    395 #endif
    +
    Tensor type.
    Definition: tensor.hpp:87
    +
    Tensor< ScalarType, Symmetry, Name > trace(const std::unordered_set< std::pair< Name, Name >> &trace_pairs, const std::unordered_map< Name, std::pair< Name, Name >> &fuse_names={}) const
    Get trace of tensor.
    Definition: trace.hpp:376
    +
    TAT is A Tensor library.
    Definition: clear_symmetry.hpp:28
    +
    std::uint64_t Size
    Tensor content data size, or dimension size type.
    Definition: common_variable.hpp:157
    +
    std::uint16_t Rank
    Tensor rank type.
    Definition: common_variable.hpp:149
    +
    constexpr bool debug_mode
    Debug flag.
    Definition: common_variable.hpp:50
    +
    Definition: allocator.hpp:295
    +
    +
    + + + +