C# Class Clusterizator.Krab.GraphManager

Class representing graph of connected nodes.
Exibir arquivo Open project: intervals-mining-lab/libiada-core Class Usage Examples

Public Properties

Property Type Description
Connections List
Elements List

Public Methods

Method Description
Clone ( ) : GraphManager

Method creates copy of graph.

Connect ( int firstIndex, int secondIndex ) : void

Nodes connection method.

ConnectGraph ( ) : void

Method is connecting nodes into "shortest unclosed path" (snp).

Cut ( Connection connection ) : void

Removes given connection between given nodes. Also renumbers groups emerging as result of disconnection.

Cut ( GraphElement firstElement, GraphElement secondElement ) : void

Removes connection between given nodes. Also renumbers groups emerging as result of disconnection.

GetNextTaxonNumber ( ) : int

Calculates number of new group.

GraphManager ( List connections, List elements ) : System.Collections.Generic

Initializes a new instance of the GraphManager class.

SearchConnection ( GraphElement firstElement, GraphElement secondElement ) : int

Searches connection index for pair of nodes.

Private Methods

Method Description
Renumber ( int index, int newNumber ) : void

Recursive method for renumeration of connected graph nodes.

SearchConnection ( int index1, int index2 ) : int

Connection search by nodes indexes.

Method Details

Clone() public method

Method creates copy of graph.
public Clone ( ) : GraphManager
return GraphManager

Connect() public method

Nodes connection method.
public Connect ( int firstIndex, int secondIndex ) : void
firstIndex int /// First node index. ///
secondIndex int /// Second node index. ///
return void

ConnectGraph() public method

Method is connecting nodes into "shortest unclosed path" (snp).
public ConnectGraph ( ) : void
return void

Cut() public method

Removes given connection between given nodes. Also renumbers groups emerging as result of disconnection.
public Cut ( Connection connection ) : void
connection Connection /// Connected nodes pair. ///
return void

Cut() public method

Removes connection between given nodes. Also renumbers groups emerging as result of disconnection.
public Cut ( GraphElement firstElement, GraphElement secondElement ) : void
firstElement GraphElement /// First node. ///
secondElement GraphElement /// Second node. ///
return void

GetNextTaxonNumber() public method

Calculates number of new group.
public GetNextTaxonNumber ( ) : int
return int

GraphManager() public method

Initializes a new instance of the GraphManager class.
public GraphManager ( List connections, List elements ) : System.Collections.Generic
connections List /// The connections. ///
elements List /// The elements. ///
return System.Collections.Generic

SearchConnection() public method

Searches connection index for pair of nodes.
public SearchConnection ( GraphElement firstElement, GraphElement secondElement ) : int
firstElement GraphElement /// First node. ///
secondElement GraphElement /// Second node. ///
return int

Property Details

Connections public_oe property

Nodes connections in graph.
public List Connections
return List

Elements public_oe property

Nodes of graph.
public List Elements
return List