tramway.feature package¶
The modules and subpackages in this package are almost never used and can considered as deprecated.
tramway.feature.adjacency module¶
-
exception
tramway.feature.adjacency.
NoSolutionError
¶ Bases:
ValueError
-
tramway.feature.adjacency.
contour
(cell, adjacency, distance=1, nodes=None, dilation_adjacency=None, fallback=False, debug=False, cells=None)¶
-
tramway.feature.adjacency.
dilation
(node, graph, step=1, boundary=None)¶ Expand across a graph from a node, or equivalently from a cell across an adjacency matrix.
Graph expansions can be further expanded:
crawled_nodes = dilation(node, graph, step=slice(3)) more_crawled_nodes = dilation(crawled_nodes, graph, step=slice(8))
Parameters: - node (int or dict of sets) – row/column index in graph (node/cell index) or partial dilation crawl.
- graph (scipy.sparse.csr_matrix) – square adjacency matrix.
- step (int or (int, int)) – minimum and maximum (+1) numbers of dilation steps.
- boundary (list or set) – nodes to be excluded.
Returns: sets of node indices in a
dict
with steps as keys.Return type: dict of sets
-
tramway.feature.adjacency.
memoize
(f)¶
tramway.feature.curl module¶
-
class
tramway.feature.curl.
Curl
(cells=None, map=None)¶ Bases:
object
-
cell_adjacency
¶
-
cell_centers
¶
-
cell_count
¶
-
curl_integral
(variable, contour, inner)¶
-
dilation_adjacency
¶
-
extract
(label, variable=None, distance=1)¶
-
field
(v, cs)¶
-
local_curl
(variable, cell, distance)¶
-
map
¶
-
map_index
¶
-
surface_area
(contour, inner)¶
-
tangent
(cs)¶
-
variables
¶
-