projects
/
libdai.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c9ad00a
)
[Frederik Eaton] Added unary minus to TProb<>
author
Joris Mooij
<joris.mooij@tuebingen.mpg.de>
Fri, 27 Nov 2009 21:12:07 +0000
(22:12 +0100)
committer
Joris Mooij
<joris.mooij@tuebingen.mpg.de>
Fri, 27 Nov 2009 21:12:07 +0000
(22:12 +0100)
include/dai/prob.h
patch
|
blob
|
history
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>() ); }