[mlpack-svn] [MLPACK] #164: Standardized concept for class output to Log
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Mon Oct 15 14:04:38 EDT 2012
#164: Standardized concept for class output to Log
------------------------------------------------------+---------------------
Reporter: rcurtin | Owner: trironk3
Type: wishlist | Status: accepted
Priority: major | Milestone: mlpack 1.1.0
Component: mlpack | Resolution:
Keywords: mlpack output model type consistent api | Blocking:
Blocked By: |
------------------------------------------------------+---------------------
Comment (by rcurtin):
One option is just to use the constructor of std::string that allows
repetition of a single character, i.e.
{{{
std::string ToString(const size_t n)
{
std::string indentation(n, ' ');
// All the other crap
}
}}}
That takes up the same amount of code as a one-line function call;
however, there may be benefits of having a standalone function. If so, my
suggestion would be that we put it in the Log class, but I'm not really
sure how much I like that solution (Log::Indent(const size_t), probably
returning a string, or maybe just Log::Indent(const size_t,
std::stringstream&) that just puts the spaces into the stringstream).
So those are a couple ideas, but if you have a better idea, go ahead and
do it.
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/164#comment:13>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.
More information about the mlpack-svn
mailing list