MCPcopy Create free account
hub / github.com/BaseXdb/basex / updateDist

Method updateDist

basex-core/src/main/java/org/basex/data/Data.java:845–855  ·  view source on GitHub ↗

This method updates the distance values of the specified PRE value and the following siblings of all ancestor-or-self nodes. @param pre root node @param size size to be added/removed

(final int pre, final int size)

Source from the content-addressed store, hash-verified

843 * @param size size to be added/removed
844 */
845 private void updateDist(final int pre, final int size) {
846 if(updateDists) {
847 int p = pre;
848 while(p < meta.size) {
849 final int k = kind(p);
850 if(k == DOC) break;
851 dist(p, k, dist(p, k) + size);
852 p += size(p, k);
853 }
854 }
855 }
856
857 /**
858 * Sets the node ID.

Callers 3

replaceMethod · 0.95
deleteMethod · 0.95
insertMethod · 0.95

Calls 3

kindMethod · 0.95
distMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected