OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 template<> | 26 template<> |
27 Rational | 27 Rational |
28 Interval_t<Rational>::infinity () | 28 Interval_t<Rational>::infinity () |
29 { | 29 { |
30 Rational infty; | 30 Rational infty; |
31 infty.set_infinite (1); | 31 infty.set_infinite (1); |
32 return infty; | 32 return infty; |
33 } | 33 } |
34 | 34 |
35 template<> | |
36 string | |
37 Interval_t<Rational>::T_to_string (Rational a) | |
38 { | |
39 return a.to_string (); | |
40 } | |
41 | |
42 template INTERVAL__INSTANTIATE (Rational); | 35 template INTERVAL__INSTANTIATE (Rational); |
43 | 36 |
44 template<> | 37 template<> |
45 Moment | 38 Moment |
46 Interval_t<Moment>::infinity () | 39 Interval_t<Moment>::infinity () |
47 { | 40 { |
48 Moment infty; | 41 Moment infty; |
49 | 42 |
50 infty.main_part_.set_infinite (1); | 43 infty.main_part_.set_infinite (1); |
51 return infty; | 44 return infty; |
52 } | 45 } |
53 | 46 |
54 template<> | |
55 string | |
56 Interval_t<Moment>::T_to_string (Moment a) | |
57 { | |
58 return a.to_string (); | |
59 } | |
60 | |
61 template INTERVAL__INSTANTIATE (Moment); | 47 template INTERVAL__INSTANTIATE (Moment); |
62 | 48 |
63 template<> | 49 template<> |
64 Real | 50 Real |
65 Interval_t<Real>::linear_combination (Real x) const | 51 Interval_t<Real>::linear_combination (Real x) const |
66 { | 52 { |
67 Drul_array<Real> da (at (LEFT), at (RIGHT)); | 53 Drul_array<Real> da (at (LEFT), at (RIGHT)); |
68 return ::linear_combination (da, x); | 54 return ::linear_combination (da, x); |
69 } | 55 } |
OLD | NEW |