Interface ISequenceManipulator<TSequence, TElement>
An interface for classes that provide functionality to manipulate sequences of a certain type.
Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public interface ISequenceManipulator<TSequence, TElement>
where TSequence : class, IEnumerable<TElement>
Type Parameters
| Name | Description |
|---|---|
| TSequence | The type of a sequence. |
| TElement | The type of a sequence element. |
Properties
SequenceEqualityComparer
Declaration
IEqualityComparer<TSequence> SequenceEqualityComparer { get; }
Property Value
| Type | Description |
|---|---|
| IEqualityComparer<TSequence> |
Methods
Concat(TSequence, TSequence)
Creates a sequence by copying the first sequence and then appending the second sequence to it.
Declaration
TSequence Concat(TSequence sequence1, TSequence sequence2)
Parameters
| Type | Name | Description |
|---|---|---|
| TSequence | sequence1 | The first sequence. |
| TSequence | sequence2 | The second sequence. |
Returns
| Type | Description |
|---|---|
| TSequence | The created sequence. |
GetElement(TSequence, Int32)
Gets the element at a given position in a given sequence.
Declaration
TElement GetElement(TSequence sequence, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| TSequence | sequence | The sequence. |
| Int32 | index | The position. |
Returns
| Type | Description |
|---|---|
| TElement | The element at the given position in the sequence. |
GetLength(TSequence)
Gets the length of a given sequence.
Declaration
int GetLength(TSequence sequence)
Parameters
| Type | Name | Description |
|---|---|---|
| TSequence | sequence | The sequence. |
Returns
| Type | Description |
|---|---|
| Int32 | The length of the sequence. |
ToSequence(IEnumerable<TElement>)
Converts a given collection of elements to a sequence.
Declaration
TSequence ToSequence(IEnumerable<TElement> elements)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TElement> | elements | The collection of elements to convert to a sequence. |
Returns
| Type | Description |
|---|---|
| TSequence | The sequence containing the elements. |