commit 6bd1aef9ca97704b8f58d19ecb5044abcbd251cd
parent 04b7f185667ce70d4e6c75758c4bcda28fd48892
Author: Étienne Simon <etienne.jl.simon@gmail.com>
Date: Sun, 5 May 2013 22:23:22 +0200
Add comments for supervisor.cpp and view_ctl.cpp.
Diffstat:
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/supervisor.cpp b/src/supervisor.cpp
@@ -26,14 +26,31 @@ static char const * const usage = "usage:\n"
"\tsupervisor ( train | test ) -d database dataset configfile kind*\n"
"\tsupervisor ( train | test ) --interactive -d database dataset kind*\n";
+/** @brief Fill a given variable_map with the variable in a given configuration file. */
void detached_build_config(std::string const &configfile_path, boost::program_options::variables_map &vm);
+
+/** @brief Select a set of View interactively. */
std::vector<std::string> interactive_select_views();
+
+/** @brief Select a set of View from a given configuration. */
std::vector<std::string> detached_select_views(boost::program_options::variables_map const &vm);
+
+/** @brief Fetch the given View objects from a given database. */
std::vector<boost::shared_ptr<View> > get_views(std::string const &database_path, std::vector<std::string> const &view_str);
+
+/** @brief Train a given Model, ask for the parameters interactively. */
void interactive_train(Model &model, Data_set &data_set);
+
+/** @brief Train a given Model, get the parameters from a given configuration. */
void detached_train(Model &model, Data_set &data_set, boost::program_options::variables_map const &vm);
+
+/** @brief Test a given Model, ask for the parameters interactively. */
void interactive_test(Model &model, Data_set &data_set);
+
+/** @brief Test a given Model, get the parameters from a given configuration. */
void detached_test(Model &model, Data_set &data_set, boost::program_options::variables_map const &vm);
+
+/** @brief Update a given View database with a set of newly trained View objects. */
void save_views(std::string const &database_path, std::vector<boost::shared_ptr<View> > const &views);
int main(int argc, char **argv){
diff --git a/src/view_ctl.cpp b/src/view_ctl.cpp
@@ -28,10 +28,19 @@ static char const * const usage = "usage:\n"
"\tview_ctl del name -d database\n"
"\tview_ctl list -d database\n";
+/** @brief Construct a View interactively. */
boost::shared_ptr<View> interactive_build_view();
+
+/** @brief Construct a View from a configuration file. */
boost::shared_ptr<View> detached_build_view(std::string const &name, std::string const &config_path);
+
+/** @brief Insert a View into a given database. */
void add_view(std::string const &database_path, boost::shared_ptr<View> view);
+
+/** @brief Delete a View from a given database. */
void del_view(std::string const &database_path, std::string const &name);
+
+/** @brief List the View of a given database. */
void list_view(std::string const &database_path);
int main(int argc, char **argv){