Diplo
 All Classes Namespaces Functions Variables Properties
Public Member Functions | Public Attributes | List of all members
Diplo.Graph.Graph Class Reference

Hlavný objekt grafu. Obsahuje všetky hrany a vrcholy. More...

Public Member Functions

 Graph (int nodesNum, int edgesNum)
  More...
 
void addVertex (Vertex vrchol)
  More...
 
Vertex getVerticeByIndex (int index)
  More...
 
List< VertexgetVertices ()
  More...
 
void removeVertex (int index)
  More...
 
void addEdge (int index1, int index2)
  More...
 
List< EdgegetEdges ()
  More...
 

Public Attributes

List< Vertexvertices = new List<Vertex>()
 
List< Edgeedges = new List<Edge>()
 

Detailed Description

Hlavný objekt grafu. Obsahuje všetky hrany a vrcholy.

Constructor & Destructor Documentation

Diplo.Graph.Graph.Graph ( int  nodesNum,
int  edgesNum 
)

Inicializácia grafu. Náhodne vytvorý graf s náhodným počtom vrcholov / na náhodných pozíciach a náhodne vytvorí hrany medzi nimi.

Parameters
nodesNum
edgesNum

Member Function Documentation

void Diplo.Graph.Graph.addEdge ( int  index1,
int  index2 
)

Medzi dvoma vrcholmi (dané ich ID - identifikátory) vytvorí hranu.

Parameters
index1ID prvého vrcholu.
index2ID druhého vrcholu.
void Diplo.Graph.Graph.addVertex ( Vertex  vrchol)

Pridať vrchol.

Parameters
vrcholVrchol na pridanie.
List<Edge> Diplo.Graph.Graph.getEdges ( )

Vráti zoznam hrán.

Returns
Zoznam hrán.
Vertex Diplo.Graph.Graph.getVerticeByIndex ( int  index)

Vráti vrchol podla jeho ID - indexu (ak existuje).

Parameters
indexIndex vrchola.
Returns
Ak vrchol s daným indexom funguje, vráti jeho inštanciu.
List<Vertex> Diplo.Graph.Graph.getVertices ( )

Vráti zoznam vrcholov.

Returns
Zoznam vrcholov.
void Diplo.Graph.Graph.removeVertex ( int  index)

Zmazanie vrchola podľa jeho ID - identifikátorá.

Parameters
indexID vrchola na zmazanie.

The documentation for this class was generated from the following file: