-
Notifications
You must be signed in to change notification settings - Fork 35
Methods_T_CodeJam_Algorithms
andrewvk edited this page Mar 29, 2016
·
9 revisions
[This is preliminary documentation and is subject to change.]
The Algorithms type exposes the following members.
Name | Description | |
---|---|---|
EqualRange(TElement)(IList(TElement), TElement) |
Returns the tuple of [i, j] where i is the smallest index in the range [0, list.Count - 1] such that list[i] >= value or list.Count if no such i exists j is the smallest index in the range [0, list.Count - 1] such that list[i] > value or list.Count if no such j exists
Comparer.Default is being used for comparison |
|
EqualRange(TElement)(IList(TElement), TElement, Int32) |
Returns the tuple of [i, j] where i is the smallest index in the range [from, list.Count - 1] such that list[i] >= value or list.Count if no such i exists j is the smallest index in the range [from, list.Count - 1] such that list[i] > value or list.Count if no such j exists
Comparer.Default is being used for comparison |
|
EqualRange(TElement, TValue)(IList(TElement), TValue, Func(TElement, TValue, Int32)) | Returns the tuple of [i, j] where i is the smallest index in the range [0, list.Count - 1] such that list[i] >= value or list.Count if no such i exists j is the smallest index in the range [0, list.Count - 1] such that list[i] > value or list.Count if no such j exists | |
EqualRange(TElement, TValue)(IList(TElement), TValue, Int32, Int32, Func(TElement, TValue, Int32)) | Returns the tuple of [i, j] where i is the smallest index in the range [from, to - 1] such that list[i] >= value or "to" if no such i exists j is the smallest index in the range [from, to - 1] such that list[i] > value or "to" if no such j exists | |
LowerBound(TElement)(IList(TElement), TElement) |
Returns the minimum index i in the range [0, list.Count - 1] such that list[i] >= value or list.Count if no such i exists
Comparer.Default is being used for comparison |
|
LowerBound(TElement)(IList(TElement), TElement, Int32) |
Returns the minimum index i in the range [from, list.Count - 1] such that list[i] >= value or list.Count if no such i exists
Comparer.Default is being used for comparison |
|
LowerBound(TElement, TValue)(IList(TElement), TValue, Func(TElement, TValue, Int32)) | Returns the minimum index i in the range [0, list.Count - 1] such that list[i] >= value or list.Count if no such i exists | |
LowerBound(TElement, TValue)(IList(TElement), TValue, Int32, Int32, Func(TElement, TValue, Int32)) | Returns the minimum index i in the range [from, to - 1] such that list[i] >= value or "to" if no such i exists | |
Memoize(TArg, TResult)(Func(TArg, TResult), Boolean) | Caches function value for specific argument. | |
Memoize(TArg, TResult)(Func(TArg, TResult), IEqualityComparer(TArg), Boolean) | Caches function value for specific argument. | |
Memoize(TArg1, TArg2, TResult)(Func(TArg1, TArg2, TResult), Boolean) | Caches function value for specific arguments. | |
Memoize(TArg1, TArg2, TArg3, TResult)(Func(TArg1, TArg2, TArg3, TResult), Boolean) | Caches function value for specific arguments. | |
Memoize(TArg1, TArg2, TArg3, TArg4, TResult)(Func(TArg1, TArg2, TArg3, TArg4, TResult), Boolean) | Caches function value for specific arguments. | |
Memoize(TArg1, TArg2, TArg3, TArg4, TArg5, TResult)(Func(TArg1, TArg2, TArg3, TArg4, TArg5, TResult), Boolean) | Caches function value for specific arguments. | |
PartitionPoint(T)(IList(T), Predicate(T)) |
Returns the index i in the range [0, list.Count - 1] such that predicate(list[j]) = true for j < i and predicate(list[k]) = false for k >= i or list.Count if no such i exists
The list should be partitioned according to the predicate |
|
PartitionPoint(T)(IList(T), Int32, Predicate(T)) |
Returns the index i in the range [from, list.Count - 1] such that predicate(list[j]) = true for j < i and predicate(list[k]) = false for k >= i or list.Count if no such i exists
The list should be partitioned according to the predicate |
|
PartitionPoint(T)(IList(T), Int32, Int32, Predicate(T)) |
Returns the index i in the range [from, to - 1] such that predicate(list[j]) = true for j < i and predicate(list[k]) = false for k >= i or "to" if no such i exists
The list should be partitioned according to the predicate |
|
Swap(T) | Swaps two objects | |
UpperBound(TElement)(IList(TElement), TElement) |
Returns the minimum index i in the range [0, list.Count - 1] such that list[i] > value or list.Count if no such i exists
Comparer.Default is being used for comparison |
|
UpperBound(TElement)(IList(TElement), TElement, Int32) |
Returns the minimum index i in the range [from, list.Count - 1] such that list[i] > value or list.Count if no such i exists
Comparer.Default is being used for comparison |
|
UpperBound(TElement, TValue)(IList(TElement), TValue, Func(TElement, TValue, Int32)) | Returns the minimum index i in the range [0, list.Count - 1] such that list[i] > value or list.Count if no such i exists | |
UpperBound(TElement, TValue)(IList(TElement), TValue, Int32, Int32, Func(TElement, TValue, Int32)) | Returns the minimum index i in the range [from, to - 1] such that list[i] > value or "to" if no such i exists |