[mlpack-svn] [MLPACK] #164: Standardized concept for class output to Log
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Mon Aug 27 17:54:08 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 trironk3):
I looked into handling the case of the given not having a ToString method
or an operator<< method by just printing a pointer. Here's an example:
Code:
{{{
struct blank { };
int main()
{
Log::Warn << "blank object: " << blank << std::endl;
}
}}}
Output:
{{{
blank object: 0x7fff9fc551e0
}}}
As it turns out, this can be easily implemented with Boost's
has_left_shift method, but that was added in 1.48, and there are several
files involved, so we can't simply yank some lines. If we ever start
requiring a version of boost after 1.48, this would be a relatively
trivial addition, but until then, I don't think it's worth anyone's time.
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/164#comment:8>
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