![]() |
Vcsn
2.1
Be Rational
|
Provide a variadic mul on top of a binary mul(), and one(). More...
#include <fwd.hh>
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 Types | |
template<typename T > | |
using | power_t = decltype(std::declval< T >().power(std::declval< typename T::value_t >(), 0)) |
The signature of power. More... | |
template<typename T > | |
using | has_power_mem_fn = detail::detect< T, power_t > |
Whether T features a power member function. More... | |
Private Member Functions | |
template<typename WS = super_t> | |
auto | power_ (value_t e, unsigned n) const -> vcsn::enable_if_t< 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 -> vcsn::enable_if_t<!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 |
|
private |
Whether T features a power member function.
Definition at line 56 of file weightset.hh.
|
private |
The signature of power.
Definition at line 52 of file weightset.hh.
using vcsn::weightset_mixin< WeightSet >::super_t = WeightSet |
Definition at line 25 of file weightset.hh.
|
private |
|
inline |
A variadic multiplication.
Definition at line 36 of file weightset.hh.
Referenced by vcsn::is_partial_identity(), vcsn::ss_shortest_distance(), and vcsn::rat::expand_visitor< ExpSet >::VCSN_RAT_VISIT().
|
inline |
Repeated multiplication.
Definition at line 83 of file weightset.hh.
|
inlineprivate |
Case where the weightset T features a power(value_t, unsigned) member function.
Definition at line 61 of file weightset.hh.
|
inlineprivate |
Case where the weightset T does not feature a power(value_t, unsigned) member function.
Definition at line 70 of file weightset.hh.
|
private |
Definition at line 77 of file weightset.hh.
Referenced by vcsn::weightset_mixin< expressionset_t >::mul().
|
private |
Definition at line 63 of file weightset.hh.
Referenced by vcsn::weightset_mixin< expressionset_t >::mul().