[mlpack] 155/207: refine comments

Barak A. Pearlmutter barak+git at pearlmutter.net
Thu Mar 23 17:53:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit ff58df8a1983c9806a4e03a59928aaeec4873fad
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date:   Mon Jun 6 12:33:09 2016 +0800

    refine comments
---
 src/mlpack/core/data/load_csv.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mlpack/core/data/load_csv.hpp b/src/mlpack/core/data/load_csv.hpp
index 2804662..7a4a0a7 100644
--- a/src/mlpack/core/data/load_csv.hpp
+++ b/src/mlpack/core/data/load_csv.hpp
@@ -187,6 +187,8 @@ private:
     while(std::getline(inFile, line))
     {
       auto begin = line.begin();
+	  //parse the numbers from a line(ex : 1,2,3,4), if the parser find the number
+	  //it will execute the setNum function
       const bool allNumber =
           qi::parse(begin, line.end(), numRule[setNum] % ",");
       //input like 2-200 or 2DM will make the parser fail,
@@ -288,6 +290,8 @@ private:
       row = 0;
       progress = 0;
       const size_t oldSize = mapCols.size();
+	  //parse number of characters from a line, it will execute setNum if it is number,
+	  //else execute setCharClass, "|" means "if not a, then b"
       const bool canParse = qi::parse(begin, line.end(),
                                       (numRule[setNum] | charRule[setCharClass]) % ",");
       //std::cout<<std::endl;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list