prefixSumComputer.ts ×2
Frontier kind: Code frontier
unlabeled · c_e6c562953e07
45 tests · 3573 LOC · 20 files · introduces 0 tests · 6 LOC · 1 file
Introduces — evidence that enters the hierarchy at this concept
Code
2 ranges 6 lines · 1 files
Tests
0 tests
Contains — complete concept membership
Neighbourhood graph
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
Native relationship evidence
Every exact file and test below is linked only from the concept that introduces it.
prefixSumComputer.ts ×2 — Focused concept
Introduced files:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue then insert then remove|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer comprehensive setValue and getIndexOf|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×2 — Ancestor (broader)
Introduced files:
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue between queries re-validates correctly|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue to zero|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue increase|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer insertValues at beginning|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer insertValues into all-zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer remove then insert at same position|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer removeValues from beginning|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer removeValues from the middle|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue on first element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer set all values to zero then restore|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue multiple times on same index|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer removeValues single element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer removeValues zero-valued elements|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue decrease|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer setValue on last element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer insertValues into empty computer|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer large values|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer many elements|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×3 — Ancestor (broader)
Introduced files:
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer many elements all zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer removeValues from end|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer insertValues at end|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer insertValues with zeroes|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with typical values|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with all ones|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with interleaved zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with leading zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with trailing zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×5 — Ancestor (broader)
Introduced files:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with single element|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with large value in single element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×2 — Ancestor (broader)
Introduced files:
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getIndexOf with all zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
prefixSumComputer.ts ×4 — Ancestor (broader)
Introduced files:
prefixSumComputer.ts ×2 — Ancestor (broader)
Introduced files:
trailing zeroes|occurrence=1, prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getPrefixSum with typical values|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getPrefixSum with all zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getPrefixSum with single element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×1 — Ancestor (broader)
Introduced files:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getTotalSum with typical values|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getTotalSum with all zeroes|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.test|title=Editor ViewModel - PrefixSumComputer getTotalSum with single element|occurrence=1 — Ancestor (broader)
Introduced tests:
prefixSumComputer.ts ×1 — Ancestor (broader)
Introduced files:
prefixSumComputer.ts ×1 — Ancestor (broader)
Introduced files:
prefixSumComputer.ts ×4 — Descendant (narrower)
Introduced files:
prefixSumComputer.ts ×4 — Descendant (narrower)
Introduced files:
uint.ts ×3 — Descendant (narrower)
Introduced files:
prefixSumComputer.ts ×1 — Descendant (narrower)
Introduced files:
prefixSumComputer.ts ×20 — Descendant (narrower)
Introduced files:
uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 — Descendant (narrower)
Introduced tests:
utils.ts ×3 — Descendant (narrower)
Introduced files:
lifecycle.ts ×2 — Descendant (narrower)
Introduced files:
lifecycle.ts ×1 — Descendant (narrower)
Introduced files:
lifecycle.ts ×4 — Descendant (narrower)
Introduced files:
lifecycle.ts ×6 — Descendant (narrower)
Introduced files:
lifecycle.ts ×1 — Descendant (narrower)
Introduced files:
lifecycle.ts ×1 — Descendant (narrower)
Introduced files:
uint.ts ×2 — Descendant (narrower)
Introduced files:
lifecycle.ts ×1 — Descendant (narrower)
Introduced files:
map.ts ×97 — Descendant (narrower)
Introduced files:
Introduced tests
Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 6 introduced LOC across 2 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
src/vs/editor/common/model/prefixSumComputer.ts 6 introduced LOC · 2 ranges
Open complete file
267
268
for ( let i = this . _validEndIndex + 1 , len = this . _values . length ; i < len ; i ++ ) {
270
>
const sumAbove = i > 0 ? this . _prefixSum [ i - 1 ] : 0 ;
271
>
272
>
this . _prefixSum [ i ] = sumAbove + value ;
273
>
for ( let j = 0 ; j < value ; j ++ ) {
274
this . _indexBySum [ sumAbove + j ] = i ;
275
}
277
278
// trim things