C# Класс Clusterizator.Krab.GraphManager

Class representing graph of connected nodes.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Connections List
Elements List

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Clone() публичный Метод

Method creates copy of graph.
public Clone ( ) : GraphManager
Результат GraphManager

Connect() публичный Метод

Nodes connection method.
public Connect ( int firstIndex, int secondIndex ) : void
firstIndex int /// First node index. ///
secondIndex int /// Second node index. ///
Результат void

ConnectGraph() публичный Метод

Method is connecting nodes into "shortest unclosed path" (snp).
public ConnectGraph ( ) : void
Результат void

Cut() публичный Метод

Removes given connection between given nodes. Also renumbers groups emerging as result of disconnection.
public Cut ( Connection connection ) : void
connection Connection /// Connected nodes pair. ///
Результат void

Cut() публичный Метод

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. ///
Результат void

GetNextTaxonNumber() публичный Метод

Calculates number of new group.
public GetNextTaxonNumber ( ) : int
Результат int

GraphManager() публичный Метод

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. ///
Результат System.Collections.Generic

SearchConnection() публичный Метод

Searches connection index for pair of nodes.
public SearchConnection ( GraphElement firstElement, GraphElement secondElement ) : int
firstElement GraphElement /// First node. ///
secondElement GraphElement /// Second node. ///
Результат int

Описание свойств

Connections публичное свойство

Nodes connections in graph.
public List Connections
Результат List

Elements публичное свойство

Nodes of graph.
public List Elements
Результат List