sumolib.miscutils
index
/build/buildd/sumo-0.19.0+dfsg/tools/sumolib/miscutils.py

@file    miscutils.py
@author  Jakob.Erdmann@dlr.de
@date    2012-05-08
@version $Id: miscutils.py 15214 2013-11-25 15:17:51Z behrisch $
 
Common utility functions
 
Copyright (C) 2007-2013 DLR/FS, Germany
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This is a duplicate of tools/util/miscutils.py from the VABENE repository

 
Modules
       
StringIO
csv
imp
math
os
subprocess
sys
time

 
Classes
       
Statistics
working_dir

 
class Statistics
     Methods defined here:
__init__(self, label=None, abs=False, histogram=False, printMin=True)
__str__(self)
add(self, v, label=None)
average_absolute_deviation_from_mean(self)
avg(self)
return the mean value
avg_abs(self)
return the mean of absolute values
count(self)
mean(self)
return the median value
mean_abs(self)
return the median of absolute values
median(self)
median_abs(self)
quartiles(self)
rank(self, fraction)

 
class working_dir
    # temporarily change working directory using 'with' statement
 
  Methods defined here:
__enter__(self)
__exit__(self, type, value, traceback)
__init__(self, dir)

 
Functions
       
benchmark(func)
# decorator for timing a function
geh(m, c)
Error function for hourly traffic flow measures after Geoffrey E. Havers

 
Data
        uMax = uMax
uMin = uMin