コード例 #1
0
ファイル: logarithmic_matrix_ll.hpp プロジェクト: libgm/libgm
 /**
  * Returns the log-likelihood of the specified datapoint
  * and the slope along the given direction.
  */
 real_pair<T>
 value_slope(index_pair x, const dense_matrix<T>& dir) const {
   return value_slope(x.first, x.second, dir);
 }
コード例 #2
0
ファイル: logarithmic_matrix_ll.hpp プロジェクト: libgm/libgm
 /**
  * Returns the log-likelihood of the specified datapoint
  * and the slope along the given direction.
  */
 real_pair<T>
 value_slope(const uint_vector& x, const dense_matrix<T>& dir) const {
   assert(x.size() == 2);
   return value_slope(x[0], x[1], dir);
 }
コード例 #3
0
 libgm::line_search_result<double> init(const vec_type& x, const vec_type& dir) {
   libgm::line_search_result<double> result(0);
   std::tie(result.value, result.slope) = value_slope(x, dir);
   return result;
 }