paradiseo/tutorial/edo/common/ggobi.py
Adèle Harrissart 490e837f7a * New tree configuration of the project:
.../
   ...           + -- EO
   |             |
   |             |
   +-- src ----- + -- EDO
   |             |
   |             |
   +-- test      + -- MO
   |             |
   |             |
   +-- tutorial  + -- MOEO
   |             |
   |             |
   +-- doc       + -- SMP
   |             |
   |             |
   ...           + -- EOMPI
                 |
                 |
                 + -- EOSERIAL

Question for current maintainers: ./README: new release?

Also:

* Moving out eompi & eoserial modules (issue #2).

* Correction of the errors when executing "make doc" command.

* Adding a solution for the conflicting headers problem (see the two CMake Cache
 Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)

* Header inclusions:
        ** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
        ** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')

* Moving out some scripts from EDO -> to the root

* Add a new script for compilation and installation (see build_gcc_linux_install)

* Compilation with uBLAS library or EDO module: now ok

* Minor modifications on README & INSTALL files

* Comment eompi failed tests with no end

*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
2014-09-06 13:04:35 +02:00

68 lines
1.2 KiB
Python
Executable file

#!/usr/bin/env python
from pprint import *
import sys, os
if __name__ == '__main__':
# parameter phase
if len(sys.argv) < 2:
print 'Usage: %s [FILE]' % sys.argv[0]
sys.exit()
filename = sys.argv[1]
lines = open(filename).readlines()
# formatting phase
try:
results = [ x.split() for x in lines[1:-1] ]
except IOError, e:
print 'Error: %s' % e
sys.exit()
# dimension estimating phase
popsize = int(lines[0].split()[0])
dimsize = int(results[0][1])
# printing phase
print 'popsize: %d' % popsize
print 'dimsize: %d' % dimsize
print
pprint( results )
# cvs converting phase
i = 1
for x in results:
x.insert(0, '"%d"' % i)
i += 1
header = ['""', '"fitness"', '"dimsize"']
for i in range(0, dimsize):
header.append( '"dim%d"' % i )
results.insert(0, header)
# cvs printing phase
file_results = '\n'.join( [ ','.join( x ) for x in results ] )
print
print file_results
try:
open('%s.csv' % filename, 'w').write(file_results + '\n')
except IOError, e:
print 'Error: %s' % e
sys.exit()
# ggobi plotting phase
os.system('ggobi %s.csv' % filename)