From 862c4f6df6c8a87510a9a6bbb7eee86d35247630 Mon Sep 17 00:00:00 2001 From: tqlong Date: Sun, 15 Aug 2010 18:34:25 +0000 Subject: [PATCH] Graphical Model --- .../trunk/contrib/tqlong/GraphicalModel/logarithm.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fastlib/trunk/contrib/tqlong/GraphicalModel/logarithm.cc diff --git a/fastlib/trunk/contrib/tqlong/GraphicalModel/logarithm.cc b/fastlib/trunk/contrib/tqlong/GraphicalModel/logarithm.cc new file mode 100644 index 0000000000..ba33dce3fa --- /dev/null +++ b/fastlib/trunk/contrib/tqlong/GraphicalModel/logarithm.cc @@ -0,0 +1,11 @@ +#include "gm.h" + +ostream& operator << (ostream& os, const GM_NAMESPACE::Logarithm& x) +{ + return os << "exp(" << x.logValue() << ") = " << x.originalValue(); +} + +GM_NAMESPACE::Logarithm log(const GM_NAMESPACE::Logarithm& x) +{ + return GM_NAMESPACE::Logarithm(x.logValue()); +}