1 #ifndef VCSN_ALGOS_PRINT_HH
2 # define VCSN_ALGOS_PRINT_HH
28 template <
typename Context,
typename Ostream,
typename String>
30 const std::string& format)
32 const auto& c = ctx->as<Context>();
33 return c.print_set(o, format);
37 (
const context& c, std::ostream& o,
38 const std::string& format) -> std::ostream&);
48 template <
typename ValueSet>
51 print(
const ValueSet& vs,
const typename ValueSet::value_t& v,
52 std::ostream& o,
const std::string& format)
54 return vs.print(v, o, format);
62 template <
typename ExpansionSet,
typename Ostream,
typename String>
64 const std::string& format)
66 const auto& e = expansion->as<ExpansionSet>();
67 return vcsn::print(e.expansionset(), e.expansion(), o, format);
72 const std::string& format) -> std::ostream&);
85 template <
typename LabelSet,
typename Ostream,
typename String>
87 const std::string& format)
89 const auto& l = label->as<
LabelSet>();
90 return vcsn::print(l.labelset(), l.label(), o, format);
94 (
const label& l, std::ostream& o,
95 const std::string& format) -> std::ostream&);
103 template <
typename PolynomialSet>
106 list(
const PolynomialSet& ps,
const typename PolynomialSet::value_t& p,
110 for (
const auto& m: p)
125 template <
typename PolynomialSet,
typename Ostream>
129 const auto& p = polynomial->as<PolynomialSet>();
130 return vcsn::list(p.polynomialset(), p.polynomial(), o);
134 (
const polynomial& p, std::ostream& o) -> std::ostream&);
147 template <
typename PolynomialSet,
typename Ostream,
typename String>
149 std::ostream& o,
const std::string& format)
151 const auto& p = polynomial->as<PolynomialSet>();
152 return vcsn::print(p.polynomialset(), p.polynomial(), o, format);
157 const std::string& format) -> std::ostream&);
167 template <
typename RatExpSet>
171 print(
const RatExpSet& rs,
const typename RatExpSet::value_t& e,
172 std::ostream& o,
const std::string& format)
174 return rs.print(e, o, format);
183 template <
typename RatExpSet,
typename Ostream,
typename String>
185 const std::string& format)
187 const auto& e = exp->as<RatExpSet>();
188 return vcsn::print(e.ratexpset(), e.ratexp(), o, format);
192 (
const ratexp& aut, std::ostream& o,
193 const std::string& format) -> std::ostream&);
202 template <
typename WeightSet>
209 return ws.print(w, o);
218 template <
typename WeightSet,
typename Ostream,
typename String>
220 const std::string& format)
223 return vcsn::print(w.weightset(), w.weight(), o, format);
227 (
const weight& aut, std::ostream& o,
228 const std::string& format) -> std::ostream&);
234 #endif // !VCSN_ALGOS_PRINT_HH
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::ostream & list_polynomial(const polynomial &polynomial, std::ostream &o)
Bridge.
std::ostream & print_polynomial(const polynomial &polynomial, std::ostream &o, const std::string &format)
Bridge.
std::ostream & print_ctx(const context &ctx, std::ostream &o, const std::string &format)
Bridge.
std::ostream & list(const PolynomialSet &ps, const typename PolynomialSet::value_t &p, std::ostream &o)
std::ostream & print_weight(const weight &weight, std::ostream &o, const std::string &format)
Bridge.
std::shared_ptr< const detail::weight_base > weight
std::shared_ptr< detail::ratexp_base > ratexp
std::ostream & print_expansion(const expansion &expansion, std::ostream &o, const std::string &format)
Bridge.
std::ostream & print(const ValueSet &vs, const typename ValueSet::value_t &v, std::ostream &o, const std::string &format)
Applies to (ValueSet, Value, ostream, string): for expansionset, polynomialset, ratexpset, and weightset.
std::shared_ptr< const detail::expansion_base > expansion
std::ostream & print_ratexp(const ratexp &exp, std::ostream &o, const std::string &format)
Bridge.
std::ostream & print_label(const label &label, std::ostream &o, const std::string &format)
Bridge.
std::shared_ptr< const detail::label_base > label
std::shared_ptr< const detail::context_base > context
std::shared_ptr< const detail::polynomial_base > polynomial