RangeCollection Class |
Namespace: Bio.Util
The RangeCollection type exposes the following members.
Name | Description | |
---|---|---|
RangeCollection |
Create an new, empty, RangeCollection.
| |
RangeCollection(IEnumerableInt32) |
Create a new RangeCollection containing the longs from a sequence.
| |
RangeCollection(IEnumerableInt64) |
Create a new RangeCollection containing the longs from a sequence.
| |
RangeCollection(Int64) |
Create an new RangeCollection containing a single long.
| |
RangeCollection(RangeCollection) |
Create a RangeCollection by doing a deep copy of a RangeCollection
| |
RangeCollection(Int64, Int64) |
Create a new Range collection containing all the longs in a range (inclusive)
|
Name | Description | |
---|---|---|
FirstElement |
The smallest long in the RangeCollection.
| |
IsEmpty |
True if the RangeCollection contains no elements; otherwise, false.
| |
IsReadOnly |
Returns whether this collection is considered read-only.
The Range is not changeable through ICollection.
| |
LastElement |
The largest long in the RangeCollection
| |
MaxValue |
The range starting at 0 (inclusive) and going to long.MaxValue (exclusive).
| |
RangeCount |
Returns the number of contiguous ranges in this collection. Useful for memory
consumption debugging.
| |
Ranges |
The ranges as a sequence, for example, 1-10 then 333-1200 then 1300
|
Name | Description | |
---|---|---|
Add |
Add an long to the RangeCollection. The long may or may not already be in the RangeCollection.
| |
AddNew |
Add an long to the RangeCollection. An exception is thrown if the long is already in the RangeCollection.
| |
AddRange(IEnumerableInt32) |
Add a sequence of integers to the RangeCollection. Each may or may not already be in the RangeCollection.
| |
AddRange(IEnumerableInt64) |
Add a sequence of integers to the RangeCollection. Each may or may not already be in the RangeCollection.
| |
AddRange(String) |
Given a contiguous range represented as a string, for example, "1-5", add all the longs in that range to this RangeCollection.
| |
AddRange(Int64, Int64) |
Add all the longs starting at 'begin' to 'last' (inclusive) to the RangeCollection. They may or may not already be in the RangeCollection.
The number of longs added must not be more than long.MaxValue.
| |
AddRangeCollection |
Add the longs of one RangeCollection to this RangeCollection.
| |
AddRanges |
Given a sequence of strings, each of which represents a contiguous range, add all the longs in all the ranges to this RangeCollection.
| |
Clear |
Make the set empty
| |
Complement |
Returns the competeCollection - thisCollection
| |
Contains(Int64) |
Returns true if item is within the ranges of this RangeCollection.
| |
Contains(RangeCollection) |
Tells if this RangeCollection is a superset of another. An an equal RangeCollection is a superset.
| |
Contains(Int64, Int64) |
Tells if all longs from start to last (inclusive) are members of this RangeCollection.
| |
CopyTo |
Copies the contents of the range into an array.
| |
Count |
The number of long elements in the RangeCollection
| |
Count(Int64, Int64) |
The number of long elements in the RangeCollection between min and max (inclusive)
| |
ElementAt |
Returns what would be the nth element if each element were enumerated.
| |
ElementsAt |
Returns a collection of elements at what would be the nth element for i \in rangeCollectionOfIndeces.
| |
Equals(Object) |
True if and only if two RangeCollections have exactly the same elements.
(Overrides ObjectEquals(Object).) | |
Equals(RangeCollection) |
Tests equality between two range collections
| |
ExceptWith | ||
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
Returns an enumeration of the long elements in this RangeCollection.
| |
GetHashCode |
Two RangeCollections with exactly the same elements will have the same hash code.
(Overrides ObjectGetHashCode.) | |
GetSchema |
Required to override XmlSerialization. We use the default schema
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IntersectWith | ||
IsBetween |
Tells if every element of the RangeCollection is between low (inclusive) and high (inclusive)
| |
IsComplete(Int64) |
Tells if the range collection includes all longs from 0 (inclusive) to itemCount-1 (inclusive)
| |
IsComplete(Int64, Int64) |
Tells if the range collection includes all longs from firstItem to lastItem (inclusive)
| |
IsContiguous |
Tells if the range collection contains a continuous set of longs.
| |
IsProperSubsetOf | ||
IsProperSupersetOf | ||
IsSubsetOf | ||
IsSupersetOf | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Overlaps | ||
Parse |
Parses strings of the form -10--5,-2-10,12-12 . Spaces are allowed, no other characters are.
If mergeOverlappingRanges, then, for example, 2-3,4-5 is represented
as 2-5. Otherwise, they're maintained as separate ranges. The only difference is in the behavior of the ToString() call.
By extension, this will change how a RangeCollection is parsed into a RangeCollectionCollection using the latter's
GetInstance(RangeCollection) initializer.
| |
ReadXml |
Overrides default XML serialization by using the ToString representation.
| |
Remove |
Remove an item from the collection. This is not supported
with the RangeCollection.
| |
SetEquals | ||
SymmetricExceptWith | ||
ToString |
Returns RangeCollection as a string in the form. For example, the range collection containing 1, 2, 10, 11, and 12 returns "1-2,10-12".
If the set is empty, returns "Empty"
(Overrides ObjectToString.) | |
ToString(String, String) |
Returns RangeCollection as a string in the form. For example, the range collection containing 1, 2, 10, 11, and 12 returns "1-2,10-12".
If the set is empty, returns "Empty"
| |
TryAdd |
Trys to add a new element to the set.
| |
TryAddRangeCollection |
Add the longs of one RangeCollection to this RangeCollection.
| |
UnionWith | ||
WriteXml |
Overrides default XML serialization by using the ToString representation.
|
Name | Description | |
---|---|---|
AppendInt64(Int64) | Overloaded.
Yield an Enumeration of the list with the item appended to the end
(Defined by IEnumerableExtensions.) | |
AppendInt64(IEnumerableInt64) | Overloaded.
Yield a concatenation of the two Enumerable lists
(Defined by IEnumerableExtensions.) | |
ElementAtInt64 |
Returns the element at a specified index in a sequence.
(Defined by IEnumerableExtensions.) | |
ForEachInt64(ActionInt64) | Overloaded.
Calls an action on each element of a sequence. The action takes one argument: an element. It has no return value.
(Defined by IEnumerableExtensions.) | |
ForEachInt64(ActionInt64, Int32) | Overloaded.
Calls an action on each element of a sequence. The action takes two arguments: an element and the index of the element.
It has no return value.
(Defined by IEnumerableExtensions.) | |
ShuffleInt64 |
Shuffles the elements of a sequence.
(Defined by IEnumerableExtensions.) | |
StringJoin | Overloaded.
Creates a string from a sequence of elements. No delimiter is used.
(Defined by IEnumerableExtensions.) | |
StringJoin(String) | Overloaded.
Creates a delimited string from a sequence of elements.
(Defined by IEnumerableExtensions.) | |
StringJoin(String, Int32, String) | Overloaded.
Creates a delimited string from a sequence of elements. At most maxLength elements will be used and "..." shows that more elements were in the list.
(Defined by IEnumerableExtensions.) | |
SubSequenceInt64 |
Take the items from a sequence starting with item # start (index 0) and contining for count items.
(Defined by IEnumerableExtensions.) | |
ToHashSetInt64 | Overloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.) | |
ToHashSetInt64(IEqualityComparerInt64) | Overloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.) | |
ToQueueInt64 |
Creates a Queue from a sequence. If the sequence is already a Queue, a new Queue is still created.
(Defined by IEnumerableExtensions.) |