Awali
Another Weighted Automata library
Public Types | Public Member Functions
awali::sttc::rat::variadic< Type, Label, Weight > Class Template Reference

An inner node with multiple children. More...

#include <ratexp.hh>

Inheritance diagram for awali::sttc::rat::variadic< Type, Label, Weight >:
awali::sttc::rat::inner< Label, Weight > awali::sttc::rat::node< Label, Weight > awali::sttc::rat::exp

Public Types

using const_iterator = typename ratexps_t::const_iterator
 
using const_reverse_iterator = typename ratexps_t::const_reverse_iterator
 
using iterator = const_iterator
 
using label_t = Label
 
using node_t = node< label_t, weight_t >
 
using ratexps_t = typename super_type::ratexps_t
 
using reverse_iterator = const_reverse_iterator
 
using super_type = inner< label_t, weight_t >
 
using value_t = typename super_type::value_t
 
using weight_t = Weight
 
- Public Types inherited from awali::sttc::rat::inner< Label, Weight >
using label_t = Label
 
using super_type = node< label_t, weight_t >
 
using value_t = typename super_type::value_t
 
using weight_t = Weight
 
- Public Types inherited from awali::sttc::rat::node< Label, Weight >
using const_visitor = sttc::rat::const_visitor< label_t, weight_t >
 
using label_t = Label
 
using node_t = rat::node< label_t, weight_t >
 
using ratexps_t = std::vector< value_t >
 
using value_t = std::shared_ptr< const node_t >
 
using weight_t = Weight
 
using wvalue_t = std::shared_ptr< node_t >
 Same as value_t, but writable. Use with care. More...
 
- Public Types inherited from awali::sttc::rat::exp
using type_t = rat::type_t
 The possible types of ratexps. More...
 

Public Member Functions

 variadic (const ratexps_t &ns=ratexps_t())
 
 variadic (const variadic &that)
 
virtual void accept (typename node_t::const_visitor &v) const override
 
const value_t back () const
 The last item of this variadic. More...
 
const_iterator begin () const
 
const_iterator end () const
 
const value_t head () const
 The first item of this variadic. More...
 
const value_t operator[] (size_t n) const
 Access the n-th element. More...
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
size_t size () const
 
ratexps_t subs () const
 Return a copy of children. More...
 
auto tail () const -> internal::it_cont< const_iterator >
 The non-first items. More...
 
virtual type_t type () const override
 The type of this node. More...
 
- Public Member Functions inherited from awali::sttc::rat::exp
virtual ~exp ()=default
 
bool is_leaf () const
 Whether a leaf of the ratexp tree. More...
 
bool is_unary () const
 Whether star, complement. More...
 

Detailed Description

template<exp::type_t Type, typename Label, typename Weight>
class awali::sttc::rat::variadic< Type, Label, Weight >

An inner node with multiple children.

Implements the Composite Design Pattern.

Member Typedef Documentation

◆ const_iterator

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::const_iterator = typename ratexps_t::const_iterator

◆ const_reverse_iterator

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::const_reverse_iterator = typename ratexps_t::const_reverse_iterator

◆ iterator

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::iterator = const_iterator

◆ label_t

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::label_t = Label

◆ node_t

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::node_t = node<label_t, weight_t>

◆ ratexps_t

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::ratexps_t = typename super_type::ratexps_t

◆ reverse_iterator

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::reverse_iterator = const_reverse_iterator

◆ super_type

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::super_type = inner<label_t, weight_t>

◆ value_t

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::value_t = typename super_type::value_t

◆ weight_t

template<exp::type_t Type, typename Label , typename Weight >
using awali::sttc::rat::variadic< Type, Label, Weight >::weight_t = Weight

Constructor & Destructor Documentation

◆ variadic() [1/2]

template<type_t Type, typename Label , typename Weight >
awali::sttc::rat::variadic< Type, Label, Weight >::variadic ( const ratexps_t ns = ratexps_t())

◆ variadic() [2/2]

template<exp::type_t Type, typename Label , typename Weight >
awali::sttc::rat::variadic< Type, Label, Weight >::variadic ( const variadic< Type, Label, Weight > &  that)

Member Function Documentation

◆ accept()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::accept ( typename node_t::const_visitor v) const
overridevirtual

◆ back()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::back

The last item of this variadic.

◆ begin()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::begin

◆ end()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::end

◆ head()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::head

The first item of this variadic.

◆ operator[]()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::operator[] ( size_t  n) const

Access the n-th element.

precondition 0 <= n < size.

◆ rbegin()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::rbegin

◆ rend()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::rend

◆ size()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::size

◆ subs()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::subs

Return a copy of children.

◆ tail()

template<type_t Type, typename Label , typename Weight >
auto awali::sttc::rat::variadic< Type, Label, Weight >::tail

The non-first items.

◆ type()

template<exp::type_t Type, typename Label , typename Weight >
virtual type_t awali::sttc::rat::variadic< Type, Label, Weight >::type ( ) const
overridevirtual

The type of this node.

Implements awali::sttc::rat::exp.


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