C# Class LibiadaCore.Core.CongenericChain

The congeneric chain.
Inheritance: AbstractChain
Mostra file Open project: intervals-mining-lab/libiada-core Class Usage Examples

Public Methods

Method Description
ClearAndSetNewLength ( int newLength ) : void

Deletes chain (building and alphabet) and creates new empty chain with given length. Saves old element (alphabet) of chain.

Clone ( ) : IBaseObject

Creates clone of this chain.

CongenericChain ( IBaseObject element ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( IBaseObject element, int length ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( IEnumerable positions, IBaseObject element, int length ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( bool map, IBaseObject element ) : System

Initializes a new instance of the CongenericChain class.

DeleteAt ( int index ) : void

Deletes given position. Clears element from position if any. Reduces chain length by 1. The delete at.

Equals ( object other ) : bool

The equals.

Get ( int index ) : IBaseObject

Gets element by position index. If position is empty returns NullValue.

GetFirstAfter ( int index ) : int

Returns position of first occurrence of element after given position.

GetIntervals ( Link link ) : int[]

Returns clone of intervals array including interval of given link.

GetLength ( ) : int

The get length.

GetOccurrence ( int occurrence ) : int

Returns position of given occurrence of element of this chain. If occurrence not found returns -1.

RemoveAt ( int index ) : void

Removes element from given position. Also clears interval manager of chain.

Set ( IBaseObject item, int index ) : void

Sets item in provided position. Clears position if element not from this chain. Does nothing if position is empty and element not from this chain.

Set ( int index ) : void

Sets item in provided position.

SetIntervalManager ( CongenericIntervalsManager manager ) : void

Sets interval manager of chain.

Method Details

ClearAndSetNewLength() public method

Deletes chain (building and alphabet) and creates new empty chain with given length. Saves old element (alphabet) of chain.
/// Thrown if new length is less than 0. ///
public ClearAndSetNewLength ( int newLength ) : void
newLength int /// New chain length. ///
return void

Clone() public method

Creates clone of this chain.
public Clone ( ) : IBaseObject
return IBaseObject

CongenericChain() public method

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IBaseObject element ) : System
element IBaseObject /// The element. ///
return System

CongenericChain() public method

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IBaseObject element, int length ) : System
element IBaseObject /// Element of this congeneric sequence. ///
length int /// Length of this chain. ///
return System

CongenericChain() public method

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IEnumerable positions, IBaseObject element, int length ) : System
positions IEnumerable /// The positions of all elements in congeneric sequence. ///
element IBaseObject /// Element of this congeneric sequence. ///
length int /// Length of this chain. ///
return System

CongenericChain() public method

Initializes a new instance of the CongenericChain class.
public CongenericChain ( bool map, IBaseObject element ) : System
map bool /// The map of elements. ///
element IBaseObject /// Element of this congeneric sequence. ///
return System

DeleteAt() public method

Deletes given position. Clears element from position if any. Reduces chain length by 1. The delete at.
public DeleteAt ( int index ) : void
index int /// The index of position. ///
return void

Equals() public method

The equals.
public Equals ( object other ) : bool
other object /// The other. ///
return bool

Get() public method

Gets element by position index. If position is empty returns NullValue.
public Get ( int index ) : IBaseObject
index int /// Index of position. ///
return IBaseObject

GetFirstAfter() public method

Returns position of first occurrence of element after given position.
public GetFirstAfter ( int index ) : int
index int /// Starting position for search. ///
return int

GetIntervals() public method

Returns clone of intervals array including interval of given link.
public GetIntervals ( Link link ) : int[]
link Link /// The link. ///
return int[]

GetLength() public method

The get length.
public GetLength ( ) : int
return int

GetOccurrence() public method

Returns position of given occurrence of element of this chain. If occurrence not found returns -1.
public GetOccurrence ( int occurrence ) : int
occurrence int /// Occurrence to find. ///
return int

RemoveAt() public method

Removes element from given position. Also clears interval manager of chain.
public RemoveAt ( int index ) : void
index int /// Index of position. ///
return void

Set() public method

Sets item in provided position. Clears position if element not from this chain. Does nothing if position is empty and element not from this chain.
public Set ( IBaseObject item, int index ) : void
item IBaseObject /// The item. ///
index int /// The index of position. ///
return void

Set() public method

Sets item in provided position.
public Set ( int index ) : void
index int /// The index. ///
return void

SetIntervalManager() public method

Sets interval manager of chain.
public SetIntervalManager ( CongenericIntervalsManager manager ) : void
manager CongenericIntervalsManager /// The manager. ///
return void