sumolib.miscutils
index
/build/sumo-1boz75/sumo-1.1.0+dfsg1/tools/sumolib/miscutils.py

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-2018 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)
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)

 
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