9 #include <boost/range/join.hpp>
10 #include <boost/optional.hpp>
12 #include <vcsn/config.hh>
35 template <
typename Enable =
void,
typename... ValueSets>
48 template <
typename... ValueSets>
60 constexpr
static bool is_labelset =
true;
63 template <
typename... ValueSets>
70 template <
typename... ValueSets>
77 template <std::size_t... I>
81 template <std::
size_t I>
101 constexpr
static bool is_labelset
110 : sets_(
std::move(vs))
119 static auto res =
symbol{sname_(indices)};
124 static constexpr std::size_t
size()
126 return sizeof...(ValueSets);
130 template <
typename Value>
133 return size_(v, indices);
136 static constexpr
bool
139 return is_commutative_(indices);
142 static constexpr
bool
145 return is_idempotent_(indices);
154 auto res = make_(is, indices);
169 return std::get<I>(sets());
189 return std::get<I>(
v);
197 return this->open_(o, indices);
201 template <
typename... Args>
204 return this->value_(args, indices);
208 template <
typename... Args>
217 return this->genset_(indices);
224 return this->generators_(indices);
229 return is_free_(indices);
233 template <
typename... Args>
235 word(
const std::tuple<Args...>&
v)
const
238 return this->word_(
v, indices);
245 return equal_(l, r, indices);
249 template <
typename LhsValue,
typename RhsValue>
251 less(
const LhsValue& l,
const RhsValue&
r)
261 return less_(l,
r, indices);
267 return special_(indices);
273 return is_special_(l, indices);
279 return this->zero_(indices);
285 return is_zero_(l, indices);
288 static constexpr
bool
291 return has_lightening_weights_(indices);
294 static constexpr
bool
297 return has_one_(indices);
300 static constexpr
bool
303 return is_expressionset_(indices);
306 static constexpr
bool
309 return is_letterized_(indices);
313 template <std::size_t... I>
325 template <
typename Indices = indices_t>
326 static auto one() -> decltype(one_(Indices{}))
328 return one_(Indices{});
334 return is_one_(l, indices);
340 return show_one_(indices);
355 [](
const auto& vs,
const auto& l,
const auto& r)
365 template <
typename LhsValue,
typename RhsValue>
367 mul(
const LhsValue& l,
const RhsValue&
r)
const
370 return this->mul_(l,
r, indices);
378 [](
const auto& vs,
const auto& l,
const auto& r)
380 return vs.lgcd(l, r);
389 [](
const auto& vs,
const auto& l,
const auto& r)
391 return vs.rdivide(l, r);
395 boost::optional<value_t>
399 auto res = map_(l, r,
400 [&valid](
const auto& vs,
const auto& l,
const auto& r)
402 if (
auto res = vs.maybe_rdivide(l, r))
422 [](
const auto& vs,
const auto& l,
const auto& r)
424 return vs.ldivide(l, r);
428 boost::optional<value_t>
432 auto res = map_(l, r,
433 [&valid](
const auto& vs,
const auto& l,
const auto& r)
435 if (
auto res = vs.maybe_ldivide(l, r))
454 typename valueset_t<0>::value_t
457 return this->lnormalize_here_(v, indices);
465 [](
const auto& vs,
const auto& v)
476 template <
typename Value>
480 return this->delimit_(l, indices);
484 template <
typename Value>
488 return this->undelimit_(l, indices);
498 template <
typename Value>
502 return this->transpose_(l, indices);
508 return hash_(v, indices);
520 return v ? one() : zero();
524 template <
typename... VS>
529 return this->conv_(vs, v, indices);
533 template <
typename... VS>
538 return conv(*vs.labelset(), vs.get_value(v));
543 conv(std::istream& i,
bool quoted =
true)
const
545 constexpr
auto has_label_one
551 template <
typename Fun>
552 void convs(std::istream& i, Fun&& fun)
const
557 { fun(this->value(l)); });
564 return this->print_set_(o, fmt, indices);
575 fmt.delimit() ?
"(" :
"",
576 fmt.is_for_labels() ?
"|" :
",",
577 fmt.delimit() ?
")" :
"",
582 template <std::size_t... I>
585 std::string
res =
"lat<";
586 const char *sep =
"";
597 template <std::size_t... I>
598 static constexpr
bool
601 return all_<valueset_t<I>::is_commutative()...>();
604 template <std::size_t... I>
605 static constexpr
bool
608 return all_<valueset_t<I>::is_idempotent()...>();
611 template <std::size_t... I>
614 #if VCSN_HAVE_CORRECT_LIST_INITIALIZER_ORDER
615 return self_t{(eat_separator_<I>(i),
619 ((eat_separator_<
sizeof...(ValueSets)-1 -I>(i),
620 valueset_t<
sizeof...(ValueSets)-1 -I>::make(i))...);
624 template <std::size_t... I>
627 using swallow =
int[];
628 (
void) swallow { set<I>().open(o)... };
629 std::swap(o, open__);
635 template <
typename Value, std::
size_t I>
644 template <
typename Value, std::
size_t I>
645 static constexpr
auto size_(
const Value&, ...)
651 template <
typename Value, std::size_t... I>
654 return std::max({size_<Value, I>(
v, 0)...});
657 template <
typename... Args, std::size_t... I>
660 return value_t{set<I>().value(std::get<I>(args))...};
663 template <std::size_t... I>
670 template <std::
size_t I>
671 decltype(
auto) generators_()
const
678 static const auto one = std::array<label_t, 1>{{ls.one()}};
683 return ls.generators();
687 template <std::size_t... I>
689 generators_(
seq<I...>)
const
693 auto p = [
this](
const auto& g)
694 {
return !this->is_one(this->value(g)); };
701 template <std::size_t... I>
702 static constexpr
bool
705 return all_<valueset_t<I>::is_free()...>();
708 template <
typename... Args, std::size_t... I>
712 return word_t{set<I>().word(std::get<I>(l))...};
715 template <std::size_t... I>
726 template <
typename LhsValue,
typename RhsValue, std::size_t... I>
734 std::get<I>(l)))...})
742 template <std::size_t... I>
752 template <std::size_t... I>
759 template <std::size_t... I>
769 template <std::size_t... I>
773 return value_t{set<I>().zero()...};
776 template <std::size_t... I>
780 for (
auto n: {set<I>().is_zero(std::get<I>(l))...})
786 template <std::size_t... I>
787 static constexpr
bool
790 return all_<valueset_t<I>::has_lightening_weights()...>();
793 template <std::size_t... I>
794 static constexpr
bool
797 return all_<valueset_t<I>::has_one()...>();
800 template <std::size_t... I>
801 static constexpr
bool
804 return all_<valueset_t<I>::is_expressionset()...>();
807 template <std::size_t... I>
808 static constexpr
bool
814 template <std::size_t... I>
824 template <std::size_t... I>
835 template <
typename Fun>
839 return map_impl_(v, std::forward<Fun>(fun), indices);
842 template <
typename Fun, std::size_t... I>
846 return value_t{fun(set<I>(), std::get<I>(v))...};
850 template <
typename Fun>
854 return map_impl_(l, r, std::forward<Fun>(fun), indices);
857 template <
typename Fun, std::size_t... I>
861 return value_t{fun(set<I>(), std::get<I>(l), std::get<I>(r))...};
864 template <
typename LhsValue,
typename RhsValue, std::size_t... I>
869 return word_t{set<I>().mul(std::get<I>(l), std::get<I>(
r))...};
872 template <std::size_t... I>
873 typename valueset_t<0>::value_t
877 for (
auto v: {std::get<I>(vs)...})
878 res = set<0>().
lgcd(res, v);
879 using swallow =
int[];
880 (
void) swallow { (set<0>().ldivide_here(res, std::get<I>(vs)), 0)... };
884 template <
typename Value, std::size_t... I>
888 return Value{set<I>().delimit(std::get<I>(l))...};
891 template <
typename Value, std::size_t... I>
895 return Value{set<I>().undelimit(std::get<I>(l))...};
898 template <
typename... VS, std::size_t... I>
904 return value_t{set<I>().
conv(vs.template set<I>(), std::get<I>(
v))...};
910 conv_(std::istream& i,
bool quoted, std::true_type)
const
916 return conv_(i, quoted, std::false_type{});
921 conv_(std::istream& i,
bool quoted, std::false_type)
const
923 bool par = i.peek() ==
'(';
926 value_t res = conv_(i, quoted, indices);
932 template <std::size_t... I>
936 #if VCSN_HAVE_CORRECT_LIST_INITIALIZER_ORDER
937 return value_t{(eat_separator_<I>(i),
938 set<I>().conv(i, quoted))...};
940 constexpr
auto S =
sizeof...(ValueSets)-1;
943 set<S - I>().
conv(i, quoted))...);
951 template <std::
size_t I>
956 eat(i, i.peek() ==
',' ?
',' :
'|');
957 while (isspace(i.peek()))
962 template <std::size_t... I>
973 using swallow =
int[];
976 (o << (I == 0 ? pre : sep),
977 set<I>().print(std::get<I>(l), o, fmt),
985 template <std::size_t... I>
990 const char *sep =
"";
991 const char *close =
"";
1012 using swallow =
int[];
1015 (o << (I == 0 ?
"" : sep),
1016 set<I>().print_set(o, fmt),
1023 template <
typename Value, std::size_t... I>
1027 return Value{set<I>().
transpose(std::get<I>(l))...};
1031 template <std::size_t... I>
1035 return self_t{
meet(set<I>(), rhs.template set<I>())...};
1043 return lhs.meet_(rhs, indices);
1065 mutable bool open__ =
false;
1069 template <std::size_t... I>
1074 #if VCSN_HAVE_CORRECT_LIST_INITIALIZER_ORDER
1075 return letter_t{(eat_separator_<I>(i),
1076 set<I>().get_letter(i, quoted))...};
1078 constexpr
auto S =
sizeof...(ValueSets)-1;
1081 set<S - I>().get_letter(i, quoted))...);
1086 template <
typename Value, std::size_t... I>
1095 template <
typename Value,
typename... Defaults, std::size_t... I>
1098 const std::tuple<Defaults...>& def,
seq<I...>) const
1100 this->
set<I>().letters_of_padded(
std::get<I>(v),
1101 std::get<I>(def))...))
1104 set<I>().letters_of_padded(std::get<I>(v),
1105 std::get<I>(def))...);
1109 template <std::size_t... I>
1112 -> decltype(this->get_letter_(i, quoted, indices))
1114 bool par = i.peek() ==
'(';
1117 auto res = get_letter_(i, quoted, indices);
1128 template <
typename Value>
1131 -> decltype(letters_of_(v, indices))
1133 return letters_of_(v, indices);
1141 template <
typename Value,
typename... Defaults>
1144 -> decltype(this->letters_of_padded_(v, def, indices))
1146 return letters_of_padded_(v, def, indices);
1150 template <
typename... ValueSets>
1163 template <
typename ValueSet>
1168 template <
typename... ValueSet>
1173 template <
typename LabelSet,
typename WeightSet>
1178 template <
typename Context>
1185 template <
typename T1,
typename T2>
1193 template <
typename... T1,
typename... T2>
1201 template <
typename... LabelSets>
1206 template <std::size_t... I>
1212 template <std::size_t... I>
1227 template <std::size_t... I>
1236 template <
typename... LabelSets>
1238 std::enable_if_t<tupleset<LabelSets...>::has_one()>>
1249 template <
typename... LabelSets>
1251 std::enable_if_t<!tupleset<LabelSets...>::has_one()>>
1263 template <
typename LabelSet>
1274 template <
typename... LabelSets>
1280 template <std::size_t... I>
1293 template <
typename... VS1,
typename... VS2>
1296 static_assert(
sizeof...(VS1) ==
sizeof...(VS2),
1297 "join: tuplesets must have the same sizes");
1303 template <std::size_t... I>
1307 return {
::vcsn::join(lhs.template set<I>(), rhs.template set<I>())...};
1313 return join(lhs, rhs,
1319 template <
typename... VS1,
typename VS2>
1325 "join: cannot mix tuplesets and non tuplesets");
1335 template <
size_t Tape,
typename LabelSet>
1340 template <
size_t Tape,
typename LabelSet>
1344 template <
size_t Tape,
typename... LabelSets>
1348 using type =
typename valueset_t::template project_t<Tape>;
1352 template <
size_t Tape,
typename Context>
1356 using type =
typename valueset_t::template project_t<Tape>;
1365 template <
size_t Tape,
typename Context>
1378 template <
typename... LabelSet,
1379 typename RandomGenerator = std::default_random_engine>
1380 typename tupleset<LabelSet...>::value_t
1382 RandomGenerator& gen = RandomGenerator())
1389 template <
typename... LabelSet,
1391 typename RandomGenerator = std::default_random_engine>
1392 typename tupleset<LabelSet...>::value_t
1394 RandomGenerator& gen,
1399 return ls.tuple(
random_label(ls.template set<I>(), gen)...);
typename labelset_types< ValueSets... >::word_t word_t
A tuple of words if meaningful, void otherwise.
value_t value_(const std::tuple< Args... > &args, seq< I... >) const
constant< type_t::one, Context > one
static bool equal(const value_t &l, const value_t &r)
Whether l equals r.
static bool is_special(const value_t &l)
value_t add(const value_t &l, const value_t &r) const
Pointwise addition.
static constexpr bool is_expressionset()
Print as is. For instance, don't try to escape labels.
static constexpr bool has_lightening_weights_(seq< I... >)
value_t conv(b, b::value_t v) const
char eat(std::istream &is, char c)
Check lookahead character and advance.
Print as a parsable type string.
letter_t value_type
To be iterable.
value_t conv(const nullableset< tupleset< VS... >> &vs, const typename nullableset< tupleset< VS... >>::value_t &v) const
Convert a value from nullableset> to value_t.
static constexpr bool is_commutative_(seq< I... >)
friend self_t meet(const b &, const self_t &rhs)
The meet with the B weightset.
std::tuple< ValueSets... > valuesets_t
auto mul(const LhsValue &l, const RhsValue &r) const -> word_t
The product (possibly concatenation) of l and r.
static size_t hash(const value_t &v)
tupleset_impl(ValueSets...ls)
std::tuple< typename ValueSets::value_t... > word_t
Same as value_t.
A traits so that tupleset may define types that may exist.
static constexpr bool is_labelset
ValueSet::value_t lgcd(const ValueSet &vs, const typename ValueSet::value_t &lhs, const typename ValueSet::value_t &rhs)
Left-division of values.
static auto letters_of(const Value &v) -> decltype(letters_of_(v, indices))
Iterate over the letters of v.
value_t conv_(std::istream &i, bool quoted, std::false_type) const
Read a tuple in the stream, possibly parenthesized.
bool is_special(const Aut &aut, transition_t_of< Aut > t)
Whether this transition is from pre or to post.
static type join(const vs1_t &lhs, const vs2_t &rhs)
The resulting valueset.
Functor to compare Values of ValueSets.
bool is_letter(const value_t &) const
value_t map_impl_(const value_t &l, const value_t &r, Fun &&fun, seq< I... >) const
value_t map_(const value_t &v, Fun &&fun) const
Apply a unary function pointwise, and return the tuple of results.
auto map_impl_(Fun f, const std::tuple< Ts... > &ts, index_sequence< I... >)
Value delimit(const Value &l) const
Add the special character first and last.
Value delimit_(const Value &l, seq< I... >) const
static constexpr bool is_letterized_(seq< I... >)
static bool is_one(const value_t &l)
std::ostream & print(const value_t &l, std::ostream &o=std::cout, format fmt={}) const
A traits to compute the letterized context.
value_t conv_(std::istream &i, bool quoted, std::true_type) const
When the valuesets are labelsets and support one, accept the empty string to denote one...
value_t value(const std::tuple< Args... > &args) const
Construct a value.
An input/output format for valuesets.
typename project_labelset_impl< Tape, LabelSet >::type project_labelset
The type of the resulting apparent LabelSet when keeping only tape Tape.
weightset_mixin< detail::r_impl > r
context join(const context &c1, const context &c2)
Bridge.
bool is_letterized(const Aut &aut)
Check if the transitions are all letters.
value_t ldivide(const value_t &l, const value_t &r) const
Pointwise left division (l \ r).
static auto one() -> decltype(one_(Indices
A tuple of ones.
Provide a variadic mul on top of a binary mul(), and one().
static labelset_t labelset(const tupleset< LabelSets... > &ls)
The type of the resulting apparent LabelSet when keeping only tape Tape.
static constexpr bool is_expressionset_(seq< I... >)
static bool show_one_(seq< I... >)
value_t zero_(seq< I... >) const
std::ostream & print_(const value_t &l, std::ostream &o, format fmt, const char *pre, const char *sep, const char *post, seq< I... >) const
valueset_t< 0 >::value_t lnormalize_here_(value_t &vs, seq< I... >) const
bool is_zero(const value_t &l) const
The smallest nullableset which includes LabelSet.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static auto less_(const LhsValue &l, const RhsValue &r, seq< I... >) -> bool
static constexpr std::size_t size()
Number of tapes.
value_t conv(const tupleset< VS... > &vs, const typename tupleset< VS... >::value_t &v) const
Convert a value from tupleset<...> to value_t.
friend self_t meet(const self_t &lhs, const self_t &rhs)
The meet with another tupleset.
genset_ptr genset_(seq< I... >) const
void convs(std::istream &i, Fun &&fun) const
Fun: (label_t) -> void.
static labelset_t labelset_(const tupleset< LabelSets... > &ls, seq< I... >)
static void eat_separator_(std::istream &i)
Read the separator from the input stream i if I is not 0.
static bool is_special_(const value_t &l, seq< I... >)
tupleset< ValueSets... > make_tupleset(const ValueSets &...vss)
static auto size_(const Value &v, int) -> decltype(valueset_t< I >::size(std::get< I >(v)))
The size of the Ith element, if its valueset features a size() function.
friend self_t meet(const self_t &lhs, const b &)
The meet with the B weightset.
static constexpr bool is_free_(seq< I... >)
static constexpr bool has_lightening_weights()
zip_sequences< Sequences... > zip(Sequences &&...seqs)
static constexpr bool is_letterized()
valuesets_t sets_
The tupled valuesets.
static bool is_one_(const value_t &l, seq< I... >)
valueset_t< 0 >::value_t lnormalize_here(value_t &v) const
Eliminate the LGCD between all the tapes.
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
bool is_zero_(const value_t &l, seq< I... >) const
typename labelset_types< ValueSets... >::letter_t letter_t
A tuple of base letters if meaningful, void otherwise.
Print as rich UTF-8 text, escaped.
Value transpose_(const Value &l, seq< I... >) const
static constexpr bool has_one_(seq< I... >)
A structure that implements the computation of join(V1, V2).
static constexpr bool is_idempotent_(seq< I... >)
From a labelset, its non-nullable labelset.
std::enable_if_t<!is_letterized_t< labelset_t_of< Aut > >{}, bool > is_letterized(const Aut &aut)
static bool equal_(const value_t &l, const value_t &r, seq< I... >)
static constexpr star_status_t star_status()
std::tuple< typename ValueSets::letter_t... > letter_t
auto make_gcc_tuple(Ts &&...ts) -> decltype(reverse_tuple(std::make_tuple(std::forward< Ts >(ts)...)))
Same as make_tuple, unless the evaluation of arguments if right-to-left, in which case reverse the re...
static type value(const labelset_t &ls)
Print as plain (ASCII) text, escaped.
std::tuple< typename ValueSets::genset_ptr... > genset_ptr
static value_t special_(seq< I... >)
Implementation of labels are nullables (letter or empty).
tupleset_impl(valuesets_t vs)
auto word(const std::tuple< Args... > &v) const -> word_t
Convert to a word.
std::tuple< typename ValueSets::word_t... > word_t
static auto one_(seq< I... >) -> decltype(value_t
static constexpr bool is_commutative()
void print_(std::ostream &o, const T &arg, long)
Serialize arg into o.
std::integral_constant< bool, B > bool_constant
value_t conv_(std::istream &i, bool quoted, seq< I... >) const
static constexpr bool is_free()
std::ostream & print_set(std::ostream &o, format fmt={}) const
auto tuple(const Auts &...as)
Build the (accessible part of the) tuple.
const valueset_t< I > & set() const
The Ith component valueset.
auto letters_of_padded(const Value &v, const std::tuple< Defaults... > &def) const -> decltype(this->letters_of_padded_(v, def, indices))
Iterate over the letters of v.
genset_ptr genset() const
valueset_t< I > project_t
The type of the I-th tape valueset.
static constexpr bool has_one()
static value_t conv(self_t, value_t v)
tuple_element_t< I, valuesets_t > valueset_t
The Ith valueset type.
bool open(bool o) const
Whether unknown letters should be added, or rejected.
static std::string sname_(seq< I... >)
Provide a range that allows to iterate over the cross product of the provided ranges.
boost::optional< value_t > maybe_rdivide(const value_t &l, const value_t &r) const
static size_t size_(const Value &v, seq< I... >)
value_t conv(std::istream &i, bool quoted=true) const
Read one label from i, return the corresponding value.
const valuesets_t & sets() const
The componants valuesets, as a tuple.
typename std::tuple_element< I, T >::type tuple_element_t
C++14.
value_t tuple(Args &&...args) const
Construct a value.
value_t lgcd(const value_t &l, const value_t &r) const
Pointwise left GCD.
static constexpr auto size_(const Value &,...) -> size_t
The size of the Ith element, if its valueset does not feature a size() function.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
tupleset< LabelSet... >::value_t random_label_(const tupleset< LabelSet... > &ls, RandomGenerator &gen, detail::index_sequence< I... >)
Implementation detail for random label from tupleset.
weightset_mixin< detail::tupleset_impl< LabelSets... >> tupleset
static self_t make_(std::istream &i, seq< I... >)
static auto letters_of_(const Value &v, seq< I... >) -> decltype(zip(valueset_t< I >::letters_of(std::get< I >(v))...))
Must be declared before, as we use its result in decltype.
auto conv(const ValueSet &vs, const std::string &str, Args &&...args) -> decltype(vs.conv(std::declval< std::istream & >(), std::forward< Args >(args)...))
Parse str via vs.conv.
typename valueset_t::template project_t< Tape > type
static size_t size(const Value &v)
Get the max of the sizes of the tapes.
std::set< letter_t, vcsn::less< tupleset< ValueSets... >, letter_t >> letters_t
cross_sequences< Sequences... > cross(Sequences &&...seqs)
auto join(const ValueSet &vs) -> ValueSet
The join of a single valueset.
static type value(const labelset_t &ls)
Value undelimit_(const Value &l, seq< I... >) const
LabelSet::letters_t conv_label_class_(const LabelSet &ls, std::istream &i)
Read a set of letters (hence, guaranteed in order, and unique).
static auto less(const LhsValue &l, const RhsValue &r) -> bool
Whether l < r.
auto get_letter_(std::istream &i, bool quoted, seq< I... >) const -> letter_t
Must be declared before, as we use its result in decltype.
auto get_letter(std::istream &i, bool quoted=true) const -> decltype(this->get_letter_(i, quoted, indices))
std::tuple< typename ValueSets::value_t... > value_t
A tuple of values.
expressionset< Context >::value_t random_label(const expressionset< Context > &rs, RandomGenerator &gen=RandomGenerator())
Random label from expressionset: limited to a single label.
value_t map_impl_(const value_t &v, Fun &&fun, seq< I... >) const
typename valueset_t::template project_t< Tape > type
auto letters_of_padded_(const Value &v, const std::tuple< Defaults... > &def, seq< I... >) const -> decltype(zip_with_padding(def, this->set< I >().letters_of_padded(std::get< I >(v), std::get< I >(def))...))
Must be declared before, as we use its result in decltype.
value_t rdivide(const value_t &l, const value_t &r) const
Pointwise right division (l / r).
void hash_combine(std::size_t &seed, const T &v)
const valueset_t< I > & project() const
The Ith component valueset.
zip_sequences_padded< zip_sequences< Sequences... > > zip_with_padding(const std::tuple< typename Sequences::value_type... > &pad, const Sequences &...seq)
value_t map_(const value_t &l, const value_t &r, Fun &&fun) const
Apply a binary function pointwise, and return the tuple of results.
auto generators() const
The generators. Meaningful for labelsets only.
Value transpose(const Value &l) const
Transpose a word_t or a value_t.
boost::optional< value_t > maybe_ldivide(const value_t &l, const value_t &r) const
static constexpr bool is_letterized_(seq< I... >)
auto project(const value_t &v) const
The I-th component of the value.
Value undelimit(const Value &l) const
Remove first and last characters, that must be "special".
typename labelset_types< ValueSets... >::letters_t letters_t
A set of letters if meaningful, void otherwise.
value_t star(const value_t &v) const
Pointwise star.
static std::size_t hash_(const value_t &v, seq< I... >)
typename labelset_types< ValueSets... >::genset_ptr genset_ptr
A tuple of generators if meaningful, void otherwise.
static self_t make(std::istream &is)
Build from the description in is.
auto meet(const expressionset< Ctx1 > &a, const expressionset< Ctx2 > &b) -> expressionset< meet_t< Ctx1, Ctx2 >>
The meet of two expressionsets.
std::ostream & print_set_(std::ostream &o, format fmt, seq< I... >) const
letterized_t< LabelSet > make_letterized(const LabelSet &ls)
bool open_(bool o, seq< I... >) const
A ValueSet which is a Cartesian product of ValueSets.
Whether a ValueSet, or a context, is multitape.
static type value(const labelset_t &ls, index_sequence< I... >)
self_t meet_(const self_t &rhs, seq< I... >) const
The intersection with another tupleset.
static type value(const labelset_t &ls)
word_t word_(const std::tuple< Args... > &l, seq< I... >) const
static constexpr bool is_idempotent()
Request the set implementation (bool weights).
law_t< LabelSet > make_wordset(const LabelSet &ls)
The wordset of a labelset.
static type value(const tupleset< LabelSet > &ls)
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.
static type join(const vs1_t &lhs, const vs2_t &rhs, index_sequence< I... >)
filter_automaton< Aut, Trans > filter(const Aut &aut, boost::optional< dynamic_bitset > ss={}, boost::optional< dynamic_bitset > ts={})
Get an automaton who is a part state set ss of aut.
value_t conv_(const tupleset< VS... > &vs, const typename tupleset< VS... >::value_t &v, seq< I... >) const
auto mul_(const LhsValue &l, const RhsValue &r, seq< I... >) const -> word_t