projects
/
libdai.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[Frederik Eaton] Added unary minus to TProb<>
[libdai.git]
/
include
/
dai
/
prob.h
diff --git
a/include/dai/prob.h
b/include/dai/prob.h
index
851828d
..
1627299
100644
(file)
--- a/
include/dai/prob.h
+++ b/
include/dai/prob.h
@@
-390,6
+390,9
@@
template <typename T> class TProb {
return r;
}
+ /// Returns negative of \c *this
+ TProb<T> operator- () const { return pwUnaryTr( std::negate<T>() ); }
+
/// Returns pointwise absolute value
TProb<T> abs() const { return pwUnaryTr( fo_abs<T>() ); }