Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAles Tamchyna <tamchyna@ufal.mff.cuni.cz>2015-01-06 12:55:11 +0300
committerAles Tamchyna <tamchyna@ufal.mff.cuni.cz>2015-01-06 12:55:11 +0300
commit416c819f799654a6d2a798c8803ad8a610aa06d2 (patch)
treedf60122416f38f56fdd48d70ca5429f848f590f3 /moses/Util.h
parent4e334f2b4e11ea2a89699a72e63a01fe1f3113b5 (diff)
minor
Diffstat (limited to 'moses/Util.h')
-rw-r--r--moses/Util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/moses/Util.h b/moses/Util.h
index 11be058ae..11a929b68 100644
--- a/moses/Util.h
+++ b/moses/Util.h
@@ -483,6 +483,12 @@ T log_sum (T log_a, T log_b)
return ( v );
}
+inline bool Equals(float a, float b)
+{
+ return fabs(a - b) < FLOAT_EPSILON;
+}
+
+
/** Enforce rounding */
inline void FixPrecision(std::ostream& stream, size_t size = 3)
{