[avida-cvs] avida CVS commits: /current/source/tools datafile.cc datafile.hh

bdbaer avida-cvs at alife.org
Wed Jul 16 18:02:08 PDT 2003


bdbaer		Wed Jul 16 10:02:08 2003 EDT

  Modified files:              
    /avida/current/source/tools	datafile.cc datafile.hh 
  Log:
  Added integer version of WriteBlockElement
  
  
  
Index: avida/current/source/tools/datafile.cc
diff -u avida/current/source/tools/datafile.cc:1.10 avida/current/source/tools/datafile.cc:1.11
--- avida/current/source/tools/datafile.cc:1.10	Sat May 17 02:48:15 2003
+++ avida/current/source/tools/datafile.cc	Wed Jul 16 10:02:07 2003
@@ -81,6 +81,14 @@
   }
 }
 
+void cDataFile::WriteBlockElement(int i, int element, int x_size)
+{
+  m_fp << i << " ";
+  if (((element + 1) % x_size) == 0) {
+    m_fp << "\n";
+  }
+}
+
 void cDataFile::WriteColumnDesc( const char * descr )
 {
   if ( !m_descr_written ){
Index: avida/current/source/tools/datafile.hh
diff -u avida/current/source/tools/datafile.hh:1.13 avida/current/source/tools/datafile.hh:1.14
--- avida/current/source/tools/datafile.hh:1.13	Sat May 17 02:48:15 2003
+++ avida/current/source/tools/datafile.hh	Wed Jul 16 10:02:08 2003
@@ -99,6 +99,7 @@
   void Write( int i,                 const char * descr );
   void Write( const char * data_str, const char * descr );
   void WriteBlockElement (double x, int element, int x_size );
+  void WriteBlockElement (int i, int element, int x_size );
 
   /**
    * Writes a descriptive string into a data file. The string is only






More information about the Avida-cvs mailing list