Vcsn  2.8
Be Rational
vcsn::oneset Class Reference

Implementation of labels are ones: there is a single instance of label. More...

#include <oneset.hh>

Collaboration diagram for vcsn::oneset:

Public Types

using self_t = oneset
 
using value_t = bool
 
using kind_t = labels_are_one
 

Public Member Functions

 oneset ()=default
 
bool open (bool o) const
 Does not make a lot of sense. More...
 
template<typename... Args>
value_t value (Args &&... args) const
 Value constructor. More...
 
template<typename LabelSet >
value_t conv (const LabelSet &ls, typename LabelSet::value_t v) const
 Convert from labelset to oneset. More...
 
value_t conv (std::istream &i, bool=true) const
 
template<typename Fun >
void convs (std::istream &, Fun) const
 
std::ostream & print_set (std::ostream &o, format fmt={}) const
 

Static Public Member Functions

static symbol sname ()
 
static oneset make (std::istream &is)
 Build from the description in is. More...
 
static constexpr bool is_free ()
 
static int compare (const value_t l, const value_t r)
 Three-way comparison between l and r. More...
 
static bool equal (const value_t l, const value_t r)
 Whether l == r. More...
 
static bool less (const value_t l, const value_t r)
 Whether l < r. More...
 
static value_t special ()
 
static bool is_special (const value_t v)
 The special label is indistinguishable for the others. More...
 
static constexpr bool is_expressionset ()
 
static constexpr bool has_one ()
 
static constexpr bool is_letterized ()
 
static value_t one ()
 
static bool is_one (const value_t v)
 
static value_t transpose (const value_t v)
 
static bool is_letter (const value_t)
 
static value_t mul (value_t l, value_t r)
 
static std::ostream & print (const value_t, std::ostream &o=std::cout, format={})
 
static size_t size (value_t)
 
static size_t hash (value_t v)
 
static value_t conv (self_t, value_t v)
 

Detailed Description

Implementation of labels are ones: there is a single instance of label.

Actually, this is untrue: there are two labels: one() and special().

Definition at line 19 of file oneset.hh.

Member Typedef Documentation

◆ kind_t

Definition at line 25 of file oneset.hh.

◆ self_t

Definition at line 22 of file oneset.hh.

◆ value_t

using vcsn::oneset::value_t = bool

Definition at line 23 of file oneset.hh.

Constructor & Destructor Documentation

◆ oneset()

vcsn::oneset::oneset ( )
default

Member Function Documentation

◆ compare()

static int vcsn::oneset::compare ( const value_t  l,
const value_t  r 
)
inlinestatic

Three-way comparison between l and r.

Definition at line 64 of file oneset.hh.

◆ conv() [1/3]

static value_t vcsn::oneset::conv ( self_t  ,
value_t  v 
)
inlinestatic

Definition at line 153 of file oneset.hh.

References vcsn::v.

◆ conv() [2/3]

template<typename LabelSet >
value_t vcsn::oneset::conv ( const LabelSet &  ls,
typename LabelSet::value_t  v 
) const
inline

Convert from labelset to oneset.

Definition at line 161 of file oneset.hh.

References one(), vcsn::to_string(), and VCSN_REQUIRE.

Here is the call graph for this function:

◆ conv() [3/3]

value_t vcsn::oneset::conv ( std::istream &  i,
bool  = true 
) const
inline

Definition at line 170 of file oneset.hh.

References one(), and vcsn::require().

Here is the call graph for this function:

◆ convs()

template<typename Fun >
void vcsn::oneset::convs ( std::istream &  ,
Fun   
) const
inline

Definition at line 184 of file oneset.hh.

◆ equal()

static bool vcsn::oneset::equal ( const value_t  l,
const value_t  r 
)
inlinestatic

Whether l == r.

Definition at line 71 of file oneset.hh.

◆ has_one()

static constexpr bool vcsn::oneset::has_one ( )
inlinestatic

Definition at line 100 of file oneset.hh.

◆ hash()

static size_t vcsn::oneset::hash ( value_t  v)
inlinestatic

Definition at line 147 of file oneset.hh.

References vcsn::detail::hash_value().

Here is the call graph for this function:

◆ is_expressionset()

static constexpr bool vcsn::oneset::is_expressionset ( )
inlinestatic

Definition at line 94 of file oneset.hh.

◆ is_free()

static constexpr bool vcsn::oneset::is_free ( )
inlinestatic

Definition at line 48 of file oneset.hh.

◆ is_letter()

static bool vcsn::oneset::is_letter ( const value_t  )
inlinestatic

Definition at line 126 of file oneset.hh.

◆ is_letterized()

static constexpr bool vcsn::oneset::is_letterized ( )
inlinestatic

Definition at line 106 of file oneset.hh.

◆ is_one()

static bool vcsn::oneset::is_one ( const value_t  v)
inlinestatic

Definition at line 116 of file oneset.hh.

References one().

Here is the call graph for this function:

◆ is_special()

static bool vcsn::oneset::is_special ( const value_t  v)
inlinestatic

The special label is indistinguishable for the others.

Definition at line 88 of file oneset.hh.

References special().

Here is the call graph for this function:

◆ less()

static bool vcsn::oneset::less ( const value_t  l,
const value_t  r 
)
inlinestatic

Whether l < r.

Definition at line 77 of file oneset.hh.

◆ make()

static oneset vcsn::oneset::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 36 of file oneset.hh.

References vcsn::labels_are_one::make().

Here is the call graph for this function:

◆ mul()

static value_t vcsn::oneset::mul ( value_t  l,
value_t  r 
)
inlinestatic

Definition at line 131 of file oneset.hh.

◆ one()

static value_t vcsn::oneset::one ( )
inlinestatic

◆ open()

bool vcsn::oneset::open ( bool  o) const
inline

Does not make a lot of sense.

Definition at line 43 of file oneset.hh.

◆ print()

static std::ostream& vcsn::oneset::print ( const value_t  ,
std::ostream &  o = std::cout,
format  = {} 
)
inlinestatic

Definition at line 136 of file oneset.hh.

◆ print_set()

std::ostream& vcsn::oneset::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 190 of file oneset.hh.

References vcsn::format::latex, vcsn::format::raw, vcsn::format::sname, sname(), vcsn::format::text, and vcsn::format::utf8.

Here is the call graph for this function:

◆ size()

static size_t vcsn::oneset::size ( value_t  )
inlinestatic

Definition at line 142 of file oneset.hh.

◆ sname()

static symbol vcsn::oneset::sname ( )
inlinestatic

Definition at line 29 of file oneset.hh.

References vcsn::res.

Referenced by print_set().

◆ special()

static value_t vcsn::oneset::special ( )
inlinestatic

Definition at line 82 of file oneset.hh.

Referenced by is_special().

◆ transpose()

static value_t vcsn::oneset::transpose ( const value_t  v)
inlinestatic

Definition at line 121 of file oneset.hh.

References vcsn::v.

◆ value()

template<typename... Args>
value_t vcsn::oneset::value ( Args &&...  args) const
inline

Value constructor.

Definition at line 58 of file oneset.hh.


The documentation for this class was generated from the following file: