4 #include "../unit/comeld.h" 25 const Heads &heads()
const;
39 void computeEffA4()
const;
44 mutable std::optional<std::bitset<34>> mEffA4SetCache;
49 inline std::ostream &operator<<(std::ostream &os,
const Parsed4 &p)
51 return os << p.heads();
59 using Container = std::vector<Parsed4>;
61 explicit Parsed4s(Container &&parseds);
63 const Container &data()
const;
66 Container::const_iterator begin()
const;
67 Container::const_iterator end()
const;
75 mutable std::optional<std::bitset<34>> mEffA4SetCache;
83 explicit Parsed7(
const std::bitset<34> &plurals,
const std::bitset<34> &floats);
86 std::bitset<34> effA7Set()
const;
89 std::bitset<34> mPlurals;
90 std::bitset<34> mFloats;
99 explicit Parsed13(
const std::bitset<34> &yaos,
bool hasYaoPair);
102 std::bitset<34> effA13Set()
const;
105 std::bitset<34> mYaos;
107 mutable std::optional<std::bitset<34>> mEffA13SetCache;
115 static const int STEP_INF = 14;
129 std::bitset<34> effASet()
const;
131 std::bitset<34> effA7Set()
const;
132 std::bitset<34> effA13Set()
const;
135 void computeEffA()
const;
139 std::optional<Parsed7> mParsed7;
140 std::optional<Parsed13> mParsed13;
141 mutable std::optional<std::bitset<34>> mEffASetCache;
150 #endif // SAKI_PARSED_H
static int workOfHeads(const Heads &heads)
Shanten number by which this parsing result decreases to the hand.
Definition: parsed.cpp:18
Comeld, a meld or a part of a meld.
Definition: comeld.h:18
Parsed4(const Heads &heads, int barkCt)
Construct from raw comeld data.
Definition: parsed.cpp:35
int step4() const
Compute 4-meld shanten number with given bark count.
Definition: parsed.cpp:56
bool operator==(const Parsed4 &that) const
ordered equal, not set equal
Definition: parsed.cpp:99
std::bitset< 34 > effA4Set() const
Get the set of first-class effective tiles of this parse formation.
Definition: parsed.cpp:64