31 format(
const std::string& f);
format for_labels() const
A copy of this format, but to print labels.
std::istringstream is
The input stream: the specification to translate.
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
bool operator!=(self_t that) const
Print as is. For instance, don't try to escape labels.
std::istream & operator>>(std::istream &is, direction &d)
Parsing.
bool is_for_weights() const
Whether to use the syntax for weights (e.g., "(1, 1/2)").
By default, print for text.
bool operator<(self_t that) const
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
bool label_
Whether printed as a label (e.g., "a|x"), or as a weight (e.g., "(1, 1/2)").
std::string to_string(direction d)
Conversion to string.
format for_weights() const
A copy of this format, but to print weights.
bool operator==(self_t that) const
bool is_for_labels() const
Whether to use the syntax for labels (e.g., "a|x").