ff30bea0877f1ef4b177e48a2a2b6f34b7aaa298,osmnx/simplification.py,,_build_path,#Any#Any#Any#Any#,91
Before Change
// if this successor is already in the path, ignore it, otherwise add
// it to the path
path.append(successor)
if successor not in endpoints:
// if this successor is not an endpoint, recursively call
// build_path until you find an endpoint
path = _build_path(G, successor, endpoints, path)
else:
// if this successor is an endpoint, we"ve completed the path,
// so return it
return path
if (path[-1] not in endpoints) and (path[0] in G.successors(path[-1])):
// if the end of the path is not actually an endpoint and the path"s
// first node is a successor of the path"s final node, then this is
// actually a self loop, so add path"s first node to end of path to
After Change
// it to the path
path.append(successor)
while successor not in endpoints:
nodes = [n for n in G.successors(successor) if n not in path]
// If nodes is empty, we should be on a self contained ring
// If nodes is longer than one, we fork into two paths
if len(nodes) == 1:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: gboeing/osmnx
Commit Name: ff30bea0877f1ef4b177e48a2a2b6f34b7aaa298
Time: 2020-06-04
Author: s.plakolb@gmail.com
File Name: osmnx/simplification.py
Class Name:
Method Name: _build_path
Project Name: aliyun/aliyun-odps-python-sdk
Commit Name: 98f7bac81b00256bc31e66aab2d7752bc320e67c
Time: 2017-08-03
Author: xuye.qin@alibaba-inc.com
File Name: odps/df/backends/optimize/utils.py
Class Name:
Method Name: copy_sequence
Project Name: aliyun/aliyun-odps-python-sdk
Commit Name: 98f7bac81b00256bc31e66aab2d7752bc320e67c
Time: 2017-08-03
Author: xuye.qin@alibaba-inc.com
File Name: odps/df/backends/optimize/utils.py
Class Name:
Method Name: change_input