File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -808,8 +808,7 @@ def get_coordination_of_site(self, n: int) -> int:
808
808
Returns:
809
809
int: number of neighbors of site n.
810
810
"""
811
- n_self_loops = sum (1 for n , v in self .graph .edges (n ) if n == v )
812
- return self .graph .degree (n ) - n_self_loops
811
+ return self .graph .degree (n )
813
812
814
813
def draw_graph_to_file (
815
814
self ,
@@ -2478,8 +2477,7 @@ def get_coordination_of_site(self, n) -> int:
2478
2477
Returns:
2479
2478
int: the number of neighbors of site n.
2480
2479
"""
2481
- n_self_loops = sum (1 for n , v in self .graph .edges (n ) if n == v )
2482
- return self .graph .degree (n ) - n_self_loops
2480
+ return self .graph .degree (n )
2483
2481
2484
2482
def draw_graph_to_file (
2485
2483
self ,
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ def test_from_local_env_and_equality_and_diff(self):
409
409
diff = struct_graph .diff (sg2 )
410
410
assert diff ["dist" ] == 0
411
411
412
- assert self .square_sg .get_coordination_of_site (0 ) == 2
412
+ assert self .square_sg .get_coordination_of_site (0 ) == 4
413
413
414
414
def test_from_edges (self ):
415
415
edges = {
You can’t perform that action at this time.
0 commit comments