sumolib.miscutils
index
/home/delphi/gcc/sumo/tools/sumolib/miscutils.py

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-2019 German Aerospace Center (DLR) and others.
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

 
Modules
       
colorsys
math
os
random
socket
sys
time

 
Classes
       
Colorgen
Statistics
working_dir

 
class Colorgen
     Methods defined here:
__call__(self)
return constant or randomized rgb-color string
__init__(self, hsv, cycleLength=10.67)
byteTuple(self)
return color as a tuple of bytes each in [0,255]
floatTuple(self)
return color as a tuple of floats each in [0,1]
get_value(self, opt, index)

Data and other attributes defined here:
DISTINCT = [(0.17, 1.0, 0.5), (0.0, 0.9, 1.0), (0.35, 0.67, 0.71), (0.14, 0.9, 1.0), (0.56, 1.0, 0.78), (0.07, 0.8, 0.96), (0.79, 0.83, 0.71), (0.5, 0.71, 0.94), (0.84, 0.79, 0.94), (0.2, 0.76, 0.96), (0.0, 0.24, 0.98), (0.5, 1.0, 0.5), (0.77, 0.25, 1.0), (0.09, 0.76, 0.67), (0.15, 0.22, 1.0), (0.0, 1.0, 0.5), (0.38, 0.33, 1.0), (0.67, 1.0, 0.5)]

 
class Statistics
     Methods defined here:
__init__(self, label=None, abs=False, histogram=False, printMin=True, scale=1)
__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
clear(self)
count(self)
histogram(self)
mean(self)
return the median value
meanAndStdDev(self, limit=None)
return the mean and the standard deviation optionally limited to the last limit values
mean_abs(self)
return the median of absolute values
median(self)
median_abs(self)
quartiles(self)
rank(self, fraction)
relStdDev(self, limit=None)
return the relative standard deviation optionally limited to the last limit values
update(self, other)

 
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)
euclidean(a, b)
# euclidean distance between two coordinates in the plane
geh(m, c)
Error function for hourly traffic flow measures after Geoffrey E. Havers
getFreeSocketPort(numTries=10)
getSocketStream(port, mode='rb')
parseTime(t)
round(value)

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
uMax = uMax
uMin = uMin