b2be440a78c9da841c3f1bdfa34e5dc0dc1e669c,osmnx/utils_graph.py,,_update_edge_keys,#Any#,536
Before Change
// for each set of duplicate edges
for _, group in groups:
if len(group) > 2:
// if there are more than 2 edges here, make sure to compare all
li = group["geometry"].tolist()
li.append(li[0])
geom_pairs = list(zip(li[:-1], li[1:]))
else:
// otherwise, just compare the first edge to the second edge
geom_pairs = [(group["geometry"].iloc[0], group["geometry"].iloc[1])]
// for each pair of edges to compare
for geom1, geom2 in geom_pairs:
// if they don"t have the same geometry, flag them as different streets
if not _is_same_geometry(geom1, geom2):
// add edge uvk, but not edge vuk, otherwise we"ll iterate both their keys
After Change
// for each unique different street, give it a unique key
set_different_streets = set(different_streets)
utils.log(f"Found {len(set_different_streets)} different streets")
for u, v, k in set(different_streets):
new_key = max(list(G[u][v]) + list(G[v][u])) + 1
G.add_edge(u, v, key=new_key, **G.get_edge_data(u, v, k))
G.remove_edge(u, v, key=k)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: gboeing/osmnx
Commit Name: b2be440a78c9da841c3f1bdfa34e5dc0dc1e669c
Time: 2020-11-19
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: _update_edge_keys
Project Name: Esri/raster-functions
Commit Name: c7a3873f70de3dbe8af710e1c62a5332f75725fd
Time: 2015-04-14
Author: rsumbaly@esri.com
File Name: functions/FuzzyMembership.py
Class Name: FuzzyMembership
Method Name: updatePixels
Project Name: gboeing/osmnx
Commit Name: d7b2db3c5262c82c44958afc2500efe0838f0884
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: _update_edge_keys
Project Name: openai/gym
Commit Name: 7006c7a182a991b9409c206c56abc121eaffafb5
Time: 2019-04-02
Author: andrew.melnik.git@gmail.com
File Name: gym/envs/robotics/hand/manipulate_touch_sensors.py
Class Name: ManipulateTouchSensorsEnv
Method Name: _get_obs