C# Class LibiadaCore.Core.BaseChain

Basic sequence class. Stores alphabet and building.
Inheritance: AbstractChain
Datei anzeigen Open project: intervals-mining-lab/libiada-core Class Usage Examples

Public Properties

Property Type Description
Id long

Protected Properties

Property Type Description
alphabet Alphabet
building int[]

Public Methods

Method Description
BaseChain ( ) : System

Initializes a new instance of the BaseChain class with 0 length.

BaseChain ( List elements ) : System

Initializes a new instance of the BaseChain class from list of elements.

BaseChain ( int length ) : System

Initializes a new instance of the BaseChain class.

BaseChain ( int building, Alphabet alphabet ) : System

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.

BaseChain ( int building, Alphabet alphabet, long id ) : System

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.

BaseChain ( string source ) : System

Initializes a new instance of the BaseChain class from string. Each character becomes element.

ClearAndSetNewLength ( int length ) : void

Deletes chain (building and alphabet) and creates new empty chain with given length.

Clone ( ) : IBaseObject

Creates clone of this chain.

DeleteAt ( int index ) : void

Removes given position.

Equals ( object other ) : bool

The equals.

Get ( int index ) : IBaseObject

Returns element by index.

GetLength ( ) : int

The length of chain.

RemoveAt ( int index ) : void

Removes element from given position.

Set ( IBaseObject item, int index ) : void

Sets or replaces element in specified position.

Protected Methods

Method Description
FillClone ( BaseChain clone ) : void

Fills the clone of chain with clones of alphabet and building.

Method Details

BaseChain() public method

Initializes a new instance of the BaseChain class with 0 length.
public BaseChain ( ) : System
return System

BaseChain() public method

Initializes a new instance of the BaseChain class from list of elements.
public BaseChain ( List elements ) : System
elements List /// The elements. ///
return System

BaseChain() public method

Initializes a new instance of the BaseChain class.
public BaseChain ( int length ) : System
length int /// The length of chain. ///
return System

BaseChain() public method

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.
public BaseChain ( int building, Alphabet alphabet ) : System
building int /// The building of chain. ///
alphabet Alphabet /// The alphabet of chain. ///
return System

BaseChain() public method

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.
public BaseChain ( int building, Alphabet alphabet, long id ) : System
building int /// The building of chain. ///
alphabet Alphabet /// The alphabet of chain. ///
id long /// Id of sequence ///
return System

BaseChain() public method

Initializes a new instance of the BaseChain class from string. Each character becomes element.
public BaseChain ( string source ) : System
source string /// The source string. ///
return System

ClearAndSetNewLength() public method

Deletes chain (building and alphabet) and creates new empty chain with given length.
/// Thrown if length of new sequence is less then zero. ///
public ClearAndSetNewLength ( int length ) : void
length int /// New chain length. ///
return void

Clone() public method

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

DeleteAt() public method

Removes given position.
public DeleteAt ( int index ) : void
index int /// Index of deleted position. ///
return void

Equals() public method

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

FillClone() protected method

Fills the clone of chain with clones of alphabet and building.
protected FillClone ( BaseChain clone ) : void
clone BaseChain /// The clone. ///
return void

Get() public method

Returns element by index.
public Get ( int index ) : IBaseObject
index int /// Index of element. ///
return IBaseObject

GetLength() public method

The length of chain.
public GetLength ( ) : int
return int

RemoveAt() public method

Removes element from given position.
public RemoveAt ( int index ) : void
index int /// Index of deleted element. ///
return void

Set() public method

Sets or replaces element in specified position.
public Set ( IBaseObject item, int index ) : void
item IBaseObject /// Element to set. ///
index int /// Position in sequence. ///
return void

Property Details

Id public_oe property

Sequence id (from database).
public long Id
return long

alphabet protected_oe property

The alphabet of chain.
protected Alphabet alphabet
return Alphabet

building protected_oe property

The building of chain.
protected int[] building
return int[]