Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
alib2algo
src
automaton
simplify
Trim.h
Go to the documentation of this file.
1
6
/*
7
* This file is part of Algorithms library toolkit.
8
* Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10
* Algorithms library toolkit is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
15
* Algorithms library toolkit is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
20
* You should have received a copy of the GNU General Public License
21
* along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
24
#pragma once
25
26
#include "
UselessStatesRemover.h
"
27
#include "
UnreachableStatesRemover.h
"
28
29
namespace
automaton
{
30
31
namespace
simplify {
32
40
class
Trim
{
41
public
:
51
template
<
class
T >
52
static
T
trim
(
const
T & fsm );
53
};
54
55
template
<
class
T >
56
T
Trim::trim
(
const
T & fsm ) {
57
return
UselessStatesRemover::remove
(
UnreachableStatesRemover::remove
( fsm ) );
58
}
59
60
}
/* namespace simplify */
61
62
}
/* namespace automaton */
63
UnreachableStatesRemover.h
UselessStatesRemover.h
automaton::simplify::Trim
Definition:
Trim.h:40
automaton::simplify::Trim::trim
static T trim(const T &fsm)
Definition:
Trim.h:56
automaton::simplify::UnreachableStatesRemover::remove
static T remove(const T &fsm)
Definition:
UnreachableStatesRemover.h:113
automaton::simplify::UselessStatesRemover::remove
static T remove(const T &fsm)
Definition:
UselessStatesRemover.h:114
automaton
Definition:
ToGrammar.h:31
Generated on Mon Dec 27 2021 10:21:51 for Algorithms Library Toolkit by
1.9.2