Sfoglia il codice sorgente

fix EdgeBuilder.addNextEdge for loop edges

Alexander Rose 1 anno fa
parent
commit
f0ae1b3347
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 0
      CHANGELOG.md
  2. 1 2
      src/mol-math/graph/int-adjacency-graph.ts

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@ Note that since we don't clearly distinguish between a public and private interf
 
 - Make operators in `IndexPairBonds` a directed property
 - Remove erroneous bounding-box overlap test in `Structure.eachUnitPair`
+- Fix `EdgeBuilder.addNextEdge` for loop edges
 
 ## [v3.35.0] - 2023-05-14
 

+ 1 - 2
src/mol-math/graph/int-adjacency-graph.ts

@@ -149,12 +149,11 @@ export namespace IntAdjacencyGraph {
             const a = this.xs[this.current], b = this.ys[this.current];
 
             const oa = this.offsets[a] + this.bucketFill[a];
-            const ob = this.offsets[b] + this.bucketFill[b];
-
             this.a[oa] = a;
             this.b[oa] = b;
             this.bucketFill[a]++;
 
+            const ob = this.offsets[b] + this.bucketFill[b];
             this.a[ob] = b;
             this.b[ob] = a;
             this.bucketFill[b]++;