diff options
author | Patrick Simianer <p@simianer.de> | 2014-09-16 10:23:14 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-09-16 10:23:14 +0100 |
commit | 129a22cfcc7651daa4b11ed52e7870249f6373a5 (patch) | |
tree | 78de4649396ab0d37a325b7598f9873c2d65f4c9 /fast/semiring.hh | |
parent | df70006a07fb67b17fb39aa56762c50c2e7b8131 (diff) |
spring cleaning
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 - |