Encode a guarantee, and generate subtrees for it as well.
| 124 | |
| 125 | // Encode a guarantee, and generate subtrees for it as well. |
| 126 | void EncodeOneGuarantee(int index, const Expression& guarantee, |
| 127 | std::vector<Encoded>* encoded) { |
| 128 | Encoded encoded_guarantee{index, {}}; |
| 129 | EncodeConjunctionMembers(guarantee, &encoded_guarantee.guarantee); |
| 130 | GenerateSubtrees(encoded_guarantee.guarantee, encoded); |
| 131 | encoded->push_back(std::move(encoded_guarantee)); |
| 132 | } |
| 133 | |
| 134 | template <typename GetGuarantee> |
| 135 | std::vector<Encoded> EncodeGuarantees(const GetGuarantee& get, int count) { |