diff options
Diffstat (limited to 'fast/semiring.hh')
-rw-r--r-- | fast/semiring.hh | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/fast/semiring.hh b/fast/semiring.hh deleted file mode 100644 index 3f4ac08..0000000 --- a/fast/semiring.hh +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - - -namespace Semiring { - -template<typename T> -struct Viterbi { - T one = 1.0; - T null = 0.0; - - T add(T x, T y); - T multiply(T x, T y); - T convert(T x); -}; - -template<typename T> T -Viterbi<T>::add(T x, T y) -{ - return max(x, y); -} - -template<typename T> T -Viterbi<T>::multiply(T x, T y) -{ - return x * y; -} - -template<typename T> T -Viterbi<T>::convert(T x) -{ - return (T)x; -} - -} // namespace - |