[mlpack-svn] [MLPACK] #164: Standardized concept for class output to Log

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Mon Aug 27 18:05:25 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've promoted code that handles printing DiscreteDistribution and
 GaussianDistribution objects. Personally, I'd rather leave the ToString()
 implementations of the other objects to the developers that use them
 regularly.

 I could add a dummy ToString implementation to each of our classes, such
 as:
 {{{
 std::string SomeMLPACKObject::ToString() const
 {
   std::ostringstream convert;
   convert << "SomeMLPACKObject: " << this << std::endl;
   convert << "To print more information about this object, modify
 SomeMLPACKObject::ToString()." << std::endl;
 }
 }}}

 The framework for a standardized concept of class output is in place, but
 not all objects leverage it. Is that enough to close this ticket? Or
 should I go about adding a dummy ToString method to every class?

-- 
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/164#comment:9>
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