Awali
Another Weighted Automata library
is_finite.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef AWALI_WEIGHTSETS_IS_FINITE_HH
18 #define AWALI_WEIGHTSETS_IS_FINITE_HH
19 
20 #include <awali/common/priority.hh>
21 
22 namespace awali {
23  namespace sttc {
24  namespace internal {
25  template<typename WS, typename P>
26  constexpr auto is_finite(const WS&, priority::TWO<P>) -> typename WS::finite_t {
27  return WS::finite;
28  }
29 
30  template<typename WS, typename P>
31  constexpr bool is_finite(const WS&, priority::ONE<P>) {
32  return false;
33  }
34 
35  template<typename WS, typename P>
36  constexpr auto is_locally_finite(const WS&, priority::TWO<P>) -> typename WS::locally_finite_t {
37  return WS::locally_finite;
38  }
39 
40  template<typename WS, typename P>
41  constexpr bool is_locally_finite(const WS& ws, priority::ONE<P>) {
42  return is_finite(ws);
43  }
44  }
45 
46  template<typename WS>
47  constexpr bool is_finite(const WS& ws) {
49  }
50 
51  template<typename WS>
52  constexpr bool is_locally_finite(const WS& ws) {
54  }
55 
56  }
57 }
58 
59 #endif
static constexpr TOP< void > value
Definition: priority.hh:93
Definition: priority.hh:52
constexpr auto is_finite(const WS &, priority::TWO< P >) -> typename WS::finite_t
Definition: is_finite.hh:26
constexpr auto is_locally_finite(const WS &, priority::TWO< P >) -> typename WS::locally_finite_t
Definition: is_finite.hh:36
constexpr bool is_finite(const WS &ws)
Definition: is_finite.hh:47
constexpr bool is_locally_finite(const WS &ws)
Definition: is_finite.hh:52
Main namespace of Awali.
Definition: ato.hh:22