Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-koyama committed Feb 15, 2022
1 parent 34dab00 commit 7dd79b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/sequential-line-search/preference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ namespace sequential_line_search
/// \brief Struct for storing preference among 2 or more data points
struct Preference : public std::vector<unsigned>
{
/// \details A pair (i, j) means that the i-th data point is preferable to the j-th data point
/// \details A pair (i, j) means that the data point i is preferable to the data point j.
Preference(unsigned i, unsigned j) : std::vector<unsigned>{i, j} {}

/// \details A tuple (i, j, k) means that the i-th data point is preferable to both the j-th and k-th data
/// points
/// \details A tuple (i, j, k) means that the data point i is preferable to both the data points j and k.
Preference(unsigned i, unsigned j, unsigned k) : std::vector<unsigned>{i, j, k} {}

/// \details A list (i, j, k, ...) means that the i-th data point is preferable to any other data points
/// \details A list (i, j, k, ...) means that data point i is preferable to any other data points.
Preference(const std::vector<unsigned>& indices) : std::vector<unsigned>{indices} {}
};
} // namespace sequential_line_search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ namespace sequential_line_search
const int num_map_estimation_iters = 0);

/// \brief Determine the preferential query for the next iteration by using an acquisition function.
///
/// \details This method is expected to be called right after `SubmitFeedbackData` is called.
void DetermineNextQuery(const int num_global_search_iters = 0, const int num_local_search_iters = 0);

/// \brief Get the current options.
Expand All @@ -97,6 +99,8 @@ namespace sequential_line_search
const std::vector<Eigen::VectorXd>& GetCurrentOptions() const { return m_current_options; }

/// \brief Get the point that has the highest value among the observed points.
///
/// \details The point is selected according to `CurrentBestSelectionStrategy`.
Eigen::VectorXd GetMaximizer() const;

double GetPreferenceValueMean(const Eigen::VectorXd& point) const;
Expand Down
2 changes: 2 additions & 0 deletions include/sequential-line-search/sequential-line-search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ namespace sequential_line_search
Eigen::VectorXd CalcPointFromSliderPosition(const double slider_position) const;

/// \brief Get the point that has the highest value among the observed points.
///
/// \details The point is selected according to `CurrentBestSelectionStrategy`.
Eigen::VectorXd GetMaximizer() const;

double GetPreferenceValueMean(const Eigen::VectorXd& point) const;
Expand Down

0 comments on commit 7dd79b2

Please sign in to comment.