Vcsn  2.3a
Be Rational
vcsn::weightset_mixin< WeightSet > Struct Template Reference

Provide a variadic mul on top of a binary mul(), and one(). More...

#include <fwd.hh>

Inheritance diagram for vcsn::weightset_mixin< WeightSet >:
Collaboration diagram for vcsn::weightset_mixin< WeightSet >:

Public Types

using super_t = WeightSet
 

Public Member Functions

template<typename... Ts>
value_t mul (const Ts &...ts) const
 A variadic multiplication. More...
 
value_t power (value_t e, unsigned n) const
 Repeated multiplication. More...
 

Private Member Functions

template<typename WS = super_t>
auto power_ (value_t e, unsigned n) const -> std::enable_if_t< detail::has_power_mem_fn< WS >
 Case where the weightset T features a power(value_t, unsigned) member function. More...
 
template<typename WS = super_t>
auto power_ (value_t e, unsigned n) const -> std::enable_if_t<!detail::has_power_mem_fn< WS >
 Case where the weightset T does not feature a power(value_t, unsigned) member function. More...
 
 if (!super_t::is_one(e)) while(n--) res
 

Private Attributes

 value_t
 
return res
 

Detailed Description

template<typename WeightSet>
struct vcsn::weightset_mixin< WeightSet >

Provide a variadic mul on top of a binary mul(), and one().

Definition at line 46 of file fwd.hh.

Member Typedef Documentation

template<typename WeightSet>
using vcsn::weightset_mixin< WeightSet >::super_t = WeightSet

Definition at line 49 of file weightset.hh.

Member Function Documentation

template<typename WeightSet>
vcsn::weightset_mixin< WeightSet >::if ( !super_t::  is_onee)
private
template<typename WeightSet>
template<typename... Ts>
value_t vcsn::weightset_mixin< WeightSet >::mul ( const Ts &...  ts) const
inline

A variadic multiplication.

Definition at line 60 of file weightset.hh.

Referenced by vcsn::is_partial_identity(), and vcsn::ss_shortest_distance().

template<typename WeightSet>
value_t vcsn::weightset_mixin< WeightSet >::power ( value_t  e,
unsigned  n 
) const
inline

Repeated multiplication.

Definition at line 98 of file weightset.hh.

template<typename WeightSet>
template<typename WS = super_t>
auto vcsn::weightset_mixin< WeightSet >::power_ ( value_t  e,
unsigned  n 
) const -> std::enable_if_t<detail::has_power_mem_fn<WS>
inlineprivate

Case where the weightset T features a power(value_t, unsigned) member function.

Definition at line 76 of file weightset.hh.

template<typename WeightSet>
template<typename WS = super_t>
auto vcsn::weightset_mixin< WeightSet >::power_ ( value_t  e,
unsigned  n 
) const -> std::enable_if_t<!detail::has_power_mem_fn<WS>
inlineprivate

Case where the weightset T does not feature a power(value_t, unsigned) member function.

Definition at line 85 of file weightset.hh.

Member Data Documentation

template<typename WeightSet>
return vcsn::weightset_mixin< WeightSet >::res
private

Definition at line 92 of file weightset.hh.

Referenced by vcsn::weightset_mixin< expressionset_t >::mul().

template<typename WeightSet>
vcsn::weightset_mixin< WeightSet >::value_t
private
Initial value:
{
return super_t::power(e, n)

Definition at line 78 of file weightset.hh.

Referenced by vcsn::weightset_mixin< expressionset_t >::mul().


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