[mlpack-svn] [MLPACK] #161: timers.hpp and timers.cpp don't follow formatting guidelines

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Fri Nov 18 15:19:18 EST 2011

#161: timers.hpp and timers.cpp don't follow formatting guidelines
 Reporter:  rcurtin  |        Owner:  mamidon                 
     Type:  defect   |       Status:  new                     
 Priority:  trivial  |    Milestone:  MLPACK 1.0              
Component:  MLPACK   |     Keywords:  spaces formatting timers
 Blocking:           |   Blocked By:                          
 I know this is pedantic, but my programs are returning things like this:

 [INFO ] Program timers:
 [INFO ]   gmm/em: 1119.834887s(18mins,39.8secs)
 [INFO ]   total_time: 1121.933867s(18mins,41.9secs)

 when really it should be like this (spaces are the key difference):

 [INFO ] Program timers:
 [INFO ]   gmm/em: 1119.834887s (18 mins, 39.8 secs)
 [INFO ]   total_time: 1121.933867s (18 mins, 41.9 secs)

 So I went and found timers.hpp and timers.cpp to see what I could do about
 it, but upon looking at them I decided I don't really want to reformat all
 the code.  It should follow the guidelines given in the
 NewStyleGuidelines.  Specifically, there is a complete lack of horizontal
 whitespace.  The more I look at this, the more I think some regex did
 something ugly:


   int days=t.tv_sec/86400;//Integerdivisionroundsdown.
   int hours=(t.tv_sec%86400)/3600;
   int minutes=(t.tv_sec%3600)/60;
   int seconds=(t.tv_sec%60);

 So, apparently, someone stole all the spaces.  We must find who is
 responsible, bring them to justice, and get our spaces back.

Ticket URL: <https://trac.research.cc.gatech.edu/fastlab/ticket/161>
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