8#include "yas/serialize.hpp"
9#include "yas/std_types.hpp"
11#include "tabulate/table.hpp"
27 explicit Pattern(
const std::vector<std::vector<std::size_t>>& pat = {{0ul}},
bool TRANSPOSE =
false)
40 Pattern
row(
int x)
const;
41 Pattern
col(
int y)
const;
44 inline std::size_t
size()
const {
return Lx *
Ly; }
45 std::size_t
index(
const int x,
const int y)
const;
46 std::size_t
uniqueIndex(
const int x,
const int y)
const;
48 std::pair<int, int>
coords(
const std::size_t
index)
const;
49 bool isUnique(
const int x,
const int y)
const;
51 tabulate::Table
print()
const;
53 template <
typename Ar>
56 ar& YAS_OBJECT_NVP(
"Pattern", (
"data",
data));
59 template <
typename Ar>
62 ar& YAS_OBJECT_NVP(
"Pattern", (
"data",
data));
70 std::vector<std::vector<std::size_t>>
data;
72 std::size_t
Lx = 1,
Ly = 1;
79#ifndef XPED_COMPILED_LIB
std::ostream & operator<<(std::ostream &os, const FusionTree< depth, Symmetry > &tree)
Definition: FusionTree.hpp:93
Definition: Pattern.hpp:18
std::size_t index(const int x, const int y) const
Definition: Pattern.cpp:53
tabulate::Table print() const
Definition: Pattern.cpp:76
std::vector< std::vector< std::size_t > > data
Definition: Pattern.hpp:70
void init()
Definition: Pattern.cpp:7
std::size_t Ly
Definition: Pattern.hpp:72
Pattern row(int x) const
Definition: Pattern.cpp:46
std::size_t Lx
Definition: Pattern.hpp:72
std::map< std::size_t, std::size_t > label2index
Definition: Pattern.hpp:68
std::size_t uniqueSize() const
Definition: Pattern.hpp:43
Pattern(const std::vector< std::vector< std::size_t > > &pat={{0ul}}, bool TRANSPOSE=false)
Definition: Pattern.hpp:27
Pattern col(int y) const
Definition: Pattern.cpp:39
bool operator==(const Pattern &other) const
Definition: Pattern.hpp:66
std::map< std::size_t, std::vector< std::size_t > > sites_of_label
Definition: Pattern.hpp:71
std::size_t size() const
Definition: Pattern.hpp:44
std::size_t uniqueIndex(const int x, const int y) const
Definition: Pattern.cpp:66
bool isUnique(const int x, const int y) const
Definition: Pattern.cpp:74
void serialize(Ar &ar) const
Definition: Pattern.hpp:54
void serialize(Ar &ar)
Definition: Pattern.hpp:60
std::map< std::size_t, std::size_t > index2unique
Definition: Pattern.hpp:69
std::pair< int, int > coords(const std::size_t index) const
Definition: Pattern.cpp:70
Definition: UnitCell.hpp:15