2 implementations of IIntervalTree
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (1)
21internal readonly struct ImmutableIntervalTree<T> : IIntervalTree<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\MutableIntervalTree`1.cs (1)
21internal partial class MutableIntervalTree<T> : IIntervalTree<T>
43 references to IIntervalTree
Microsoft.CodeAnalysis.Workspaces (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (3)
16/// Implementation of an <see cref="IIntervalTree{T}"/> backed by a contiguous array of values. This is a more memory 264bool IIntervalTree<T>.Any<TIntrospector, TIntervalTester>(int start, int length, in TIntrospector introspector, in TIntervalTester intervalTester) 267int IIntervalTree<T>.FillWithIntervalsThatMatch<TIntrospector, TIntervalTester>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeAlgorithms`2.cs (2)
12/// Helpers for working with <see cref="IIntervalTree{T}"/> instances. Can be retrieved by calling <c>.Extensions</c> 17internal readonly struct IntervalTreeAlgorithms<T, TIntervalTree>(TIntervalTree tree) where TIntervalTree : IIntervalTree<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (4)
14/// Witness interface that allows transparent access to information about a specific <see cref="IIntervalTree{T}"/> 21where TIntervalTree : IIntervalTree<T> 32/// Utility helpers used to allow code sharing for the different implementations of <see cref="IIntervalTree{T}"/>s. 35where TIntervalTree : IIntervalTree<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
12where TIntervalTree : IIntervalTree<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.NodeEnumerator.cs (1)
11where TIntervalTree : IIntervalTree<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\MutableIntervalTree`1.cs (2)
43bool IIntervalTree<T>.Any<TIntrospector, TIntervalTester>(int start, int length, in TIntrospector introspector, in TIntervalTester intervalTester) 46int IIntervalTree<T>.FillWithIntervalsThatMatch<TIntrospector, TIntervalTester>(
Microsoft.CodeAnalysis.Workspaces.UnitTests (30)
UtilityTest\IntervalTreeTests.cs (30)
24private IEnumerable<IIntervalTree<Tuple<int, int, string>>> CreateTrees(params Tuple<int, int, string>[] values) 27private protected abstract IEnumerable<IIntervalTree<Tuple<int, int, string>>> CreateTrees(IEnumerable<Tuple<int, int, string>> values); 29private protected abstract ImmutableArray<Tuple<int, int, string>> GetIntervalsThatIntersectWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length); 30private protected abstract ImmutableArray<Tuple<int, int, string>> GetIntervalsThatOverlapWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length); 31private protected abstract bool HasIntervalThatIntersectsWith(IIntervalTree<Tuple<int, int, string>> tree, int position); 36foreach (var tree in CreateTrees()) 47foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 58foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 69foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 80foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 91foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 102foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 113foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 124foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 135foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 146foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 157foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"))) 168foreach (var tree in CreateTrees(Tuple.Create(5, 5, "A"), Tuple.Create(15, 5, "B"))) 215foreach (var tree in CreateTrees(spans)) 245foreach (var _ in CreateTrees(Tuple.Create(8, 1, "A"), Tuple.Create(59, 1, "B"), Tuple.Create(52, 1, "C"))) 254var tree = CreateTrees(Tuple.Create(0, 0, "A")).Last(); 312foreach (var tree in CreateTrees(spans)) 351private protected override IEnumerable<IIntervalTree<Tuple<int, int, string>>> CreateTrees(IEnumerable<Tuple<int, int, string>> values) 356private protected override bool HasIntervalThatIntersectsWith(IIntervalTree<Tuple<int, int, string>> tree, int position) 361private protected override ImmutableArray<Tuple<int, int, string>> GetIntervalsThatIntersectWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length) 366private protected override ImmutableArray<Tuple<int, int, string>> GetIntervalsThatOverlapWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length) 374private protected override IEnumerable<IIntervalTree<Tuple<int, int, string>>> CreateTrees(IEnumerable<Tuple<int, int, string>> values) 379private protected override bool HasIntervalThatIntersectsWith(IIntervalTree<Tuple<int, int, string>> tree, int position) 384private protected override ImmutableArray<Tuple<int, int, string>> GetIntervalsThatIntersectWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length) 389private protected override ImmutableArray<Tuple<int, int, string>> GetIntervalsThatOverlapWith(IIntervalTree<Tuple<int, int, string>> tree, int start, int length)