mlpack
log_add.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_MATH_LOG_ADD_HPP
13 #define MLPACK_CORE_MATH_LOG_ADD_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace math {
19 
27 template<typename T>
28 T LogAdd(T x, T y);
29 
36 template<typename T>
37 typename T::elem_type AccuLog(const T& x);
38 
52 template<typename T, bool InPlace = false>
53 void LogSumExp(const T& x, arma::Col<typename T::elem_type>& y);
54 
68 template<typename T, bool InPlace = false>
69 void LogSumExpT(const T& x, arma::Col<typename T::elem_type>& y);
70 
71 } // namespace math
72 } // namespace mlpack
73 
74 // Include implementation.
75 #include "log_add_impl.hpp"
76 
77 #endif
void LogSumExp(const T &x, arma::Col< typename T::elem_type > &y)
Compute the sum of exponentials of each element in each column, then compute the log of that...
Definition: log_add_impl.hpp:78
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
void LogSumExpT(const T &x, arma::Col< typename T::elem_type > &y)
Compute the sum of exponentials of each element in each row, then compute the log of that...
Definition: log_add_impl.hpp:111
The core includes that mlpack expects; standard C++ includes and Armadillo.
T LogAdd(T x, T y)
Internal log-addition.
Definition: log_add_impl.hpp:36
T::elem_type AccuLog(const T &x)
Log-sum a vector of log values.
Definition: log_add_impl.hpp:63