Vcsn  2.4
Be Rational
labelset.hh File Reference
#include <boost/optional.hpp>
#include <boost/range/algorithm/find.hpp>
#include <boost/range/algorithm/find_if.hpp>
#include <boost/range/algorithm/for_each.hpp>
#include <boost/range/algorithm_ext/is_sorted.hpp>
#include <vcsn/ctx/context.hh>
#include <vcsn/ctx/traits.hh>
#include <vcsn/misc/algorithm.hh>
#include <vcsn/misc/functional.hh>
#include <vcsn/misc/random.hh>
#include <vcsn/misc/static-if.hh>
#include <vcsn/misc/type_traits.hh>
Include dependency graph for labelset.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vcsn::detail::letterized_traits< LabelSet >
 A traits to compute the letterized context. More...
 
struct  vcsn::detail::nullableset_traits< LabelSet, Enable >
 The smallest nullableset which includes LabelSet. More...
 
struct  vcsn::detail::proper_traits< LabelSet >
 From a labelset, its non-nullable labelset. More...
 
struct  vcsn::detail::law_traits< ValueSet >
 The LAW from a LAL. More...
 

Namespaces

 vcsn
 
 vcsn::detail
 

Typedefs

template<typename LabelSet >
using vcsn::detail::generators_mem_fn_t = decltype(std::declval< LabelSet >().generators())
 The type of the LabelSet::generators() member function. More...
 
template<typename LabelSet >
using vcsn::detail::has_generators_mem_fn = detect< LabelSet, generators_mem_fn_t >
 Whether LabelSet features a generators() member function. More...
 
template<typename LabelSet >
using vcsn::detail::one_t = decltype(std::declval< LabelSet >().one())
 
template<typename LabelSet >
using vcsn::detail::has_one_mem_fn = detect< LabelSet, one_t >
 
template<typename LabelSet >
using vcsn::detail::letterized_t = typename letterized_traits< LabelSet >::labelset_t
 
template<typename LabelSet >
using vcsn::detail::is_letterized_t = bool_constant< letterized_traits< LabelSet >::is_letterized >
 
template<typename Context >
using vcsn::detail::letterized_context = context< letterized_t< labelset_t_of< Context >>, weightset_t_of< Context >>
 
template<typename LabelSet >
using vcsn::detail::nullableset_t = typename nullableset_traits< LabelSet >::type
 The smallest nullableset that includes LabelSet. More...
 
template<typename Ctx >
using vcsn::detail::nullableset_context_t = context< nullableset_t< labelset_t_of< Ctx >>, weightset_t_of< Ctx >>
 
template<typename LabelSet >
using vcsn::detail::proper_t = typename proper_traits< LabelSet >::type
 The type of the corresponding proper LabelSet. More...
 
template<typename Context >
using vcsn::detail::proper_context = context< proper_t< labelset_t_of< Context >>, weightset_t_of< Context >>
 
template<typename Context >
using vcsn::detail::free_context = context< proper_t< letterized_t< labelset_t_of< Context >>>, weightset_t_of< Context >>
 
template<typename LabelSet >
using vcsn::detail::law_t = typename law_traits< LabelSet >::type
 The smallest wordset that includes LabelSet. More...
 
template<typename Ctx >
using vcsn::detail::word_context_t = context< law_t< labelset_t_of< Ctx >>, weightset_t_of< Ctx >>
 

Functions

template<typename LabelSet >
auto vcsn::detail::label_one (const LabelSet &ls) -> typename LabelSet::value_t
 Enjoy type inference. More...
 
template<typename LabelSet >
letterized_t< LabelSet > vcsn::detail::make_letterized (const LabelSet &ls)
 
template<typename LabelSet , typename WeightSet >
letterized_context< context< LabelSet, WeightSet > > vcsn::detail::make_letterized_context (const context< LabelSet, WeightSet > &c)
 The letterized context for c. More...
 
template<typename LabelSet >
nullableset_t< LabelSet > vcsn::detail::make_nullableset (const LabelSet &ls)
 The nullableset of a labelset. More...
 
template<typename LabelSet , typename WeightSet >
nullableset_context_t< context< LabelSet, WeightSet > > vcsn::detail::make_nullableset_context (const context< LabelSet, WeightSet > &ctx)
 The nullableset context of a context. More...
 
template<typename LabelSet >
proper_t< LabelSet > vcsn::detail::make_proper (const LabelSet &ls)
 The corresponding proper LabelSet. More...
 
template<typename LabelSet , typename WeightSet >
auto vcsn::detail::make_proper_context (const context< LabelSet, WeightSet > &ctx) -> proper_context< context< LabelSet, WeightSet >>
 From a context, its non-nullable context. More...
 
template<typename LabelSet , typename WeightSet >
free_context< context< LabelSet, WeightSet > > vcsn::detail::make_free_context (const context< LabelSet, WeightSet > &c)
 The free context for c. More...
 
template<typename LabelSet >
law_t< LabelSet > vcsn::detail::make_wordset (const LabelSet &ls)
 The wordset of a labelset. More...
 
template<typename LabelSet , typename WeightSet >
word_context_t< context< LabelSet, WeightSet > > vcsn::detail::make_word_context (const context< LabelSet, WeightSet > &ctx)
 The wordset context of a context. More...
 
template<typename LabelSet >
std::ostream & vcsn::detail::print_label_ranges_ (const LabelSet &ls, const std::vector< typename LabelSet::value_t > &letters, const std::vector< typename LabelSet::value_t > &alphabet, std::ostream &out, format fmt)
 Print a set of labels with ranges. More...
 
template<typename LabelSet >
std::ostream & vcsn::detail::print_label_class (const LabelSet &ls, const std::vector< typename LabelSet::value_t > &letters, std::ostream &out, format fmt)
 Print a set of labels (letterized) with classes. More...
 
template<typename LabelSet >
LabelSet::letters_t vcsn::detail::conv_label_class_ (const LabelSet &ls, std::istream &i)
 Read a set of letters (hence, guaranteed in order, and unique). More...
 
template<typename LabelSet , typename Fun >
void vcsn::detail::conv_label_class_ (const LabelSet &ls, std::istream &i, Fun fun)
 Read and process a class of letters. More...
 
template<typename LabelSet , typename RandomGenerator = std::default_random_engine>
LabelSet::value_t vcsn::random_label (const LabelSet &ls, RandomGenerator &gen=RandomGenerator())
 Random label from general case such as letterset. More...