Vcsn
2.4
Be Rational
Main Page
Namespaces
Classes
Files
File List
File Members
is-functional.hh
Go to the documentation of this file.
1
#pragma once
2
3
#include <
vcsn/algos/compose.hh
>
4
#include <
vcsn/algos/is-partial-identity.hh
>
5
#include <
vcsn/dyn/automaton.hh
>
6
#include <vcsn/dyn/fwd.hh>
7
8
namespace
vcsn
9
{
10
/*---------------.
11
| is-functional. |
12
`---------------*/
13
16
template
<Automaton Aut>
17
bool
is_functional
(
const
Aut& aut)
18
{
19
// Compose aut and its invert.
20
auto
c = make_compose_automaton<false, 0, 0>(aut, aut);
21
c->compose();
22
return
is_partial_identity
(c);
23
}
24
25
namespace
dyn
26
{
27
namespace
detail
28
{
30
template
<Automaton Aut>
31
bool
is_functional
(
const
automaton
& aut)
32
{
33
return
is_functional
(aut->
as
<Aut>());
34
}
35
}
36
}
37
}
vcsn::is_functional
bool is_functional(const Aut &aut)
Whether aut is functional.
Definition:
is-functional.hh:17
automaton.hh
compose.hh
vcsn::dyn::detail::is_functional
bool is_functional(const automaton &aut)
Bridge.
Definition:
is-functional.hh:31
vcsn
Definition:
a-star.hh:8
vcsn::dyn::automaton
A dyn automaton.
Definition:
automaton.hh:17
vcsn::dyn::automaton::as
auto & as()
Extract wrapped typed automaton.
Definition:
automaton.hh:37
is-partial-identity.hh
vcsn::is_partial_identity
bool is_partial_identity(const Aut &aut)
Whether transducer aut is equivalent to a partial identity function on all successful paths...
Definition:
is-partial-identity.hh:21
vcsn
algos
is-functional.hh
Generated by
1.8.10