C# Class CodingPractice.Graph.WeightedGraph

Inheritance: IWeightedGraph
Afficher le fichier Open project: cabhishek/algorithms-datastructures Class Usage Examples

Méthodes publiques

Свойство Type Description
NULL_EDGE int

Méthodes publiques

Méthode Description
WeightedGraph ( ) : System.Collections
WeightedGraph ( int maxV ) : System.Collections
addEdge ( object fromVertex, object toVertex, int weight ) : void

Edge(from vertex, to vertex) is stored in edges

addVertex ( object vertex ) : void

vertex has been stored in vertices.

clearMarks ( ) : void

sets marks for all vertices to false

getToVertices ( object vertex ) : Queue

returns a queue of the vertices that are adjacent from vertex

isEmpty ( ) : bool
isFull ( ) : bool
isMarked ( object vertex ) : bool

determines if vertex has been marked or not

markVertex ( object vertex ) : void

sets mark for vertex to true

weightIs ( object fromVertex, object toVertex ) : int

returns weight associated with the edge

Private Methods

Méthode Description
indexIs ( object vertex ) : int

returns index of vertex in vertices

Method Details

WeightedGraph() public méthode

public WeightedGraph ( ) : System.Collections
Résultat System.Collections

WeightedGraph() public méthode

public WeightedGraph ( int maxV ) : System.Collections
maxV int
Résultat System.Collections

addEdge() public méthode

Edge(from vertex, to vertex) is stored in edges
public addEdge ( object fromVertex, object toVertex, int weight ) : void
fromVertex object
toVertex object
weight int
Résultat void

addVertex() public méthode

vertex has been stored in vertices.
public addVertex ( object vertex ) : void
vertex object
Résultat void

clearMarks() public méthode

sets marks for all vertices to false
public clearMarks ( ) : void
Résultat void

getToVertices() public méthode

returns a queue of the vertices that are adjacent from vertex
public getToVertices ( object vertex ) : Queue
vertex object
Résultat System.Collections.Queue

isEmpty() public méthode

public isEmpty ( ) : bool
Résultat bool

isFull() public méthode

public isFull ( ) : bool
Résultat bool

isMarked() public méthode

determines if vertex has been marked or not
public isMarked ( object vertex ) : bool
vertex object
Résultat bool

markVertex() public méthode

sets mark for vertex to true
public markVertex ( object vertex ) : void
vertex object
Résultat void

weightIs() public méthode

returns weight associated with the edge
public weightIs ( object fromVertex, object toVertex ) : int
fromVertex object
toVertex object
Résultat int

Property Details

NULL_EDGE public_oe static_oe property

public static int NULL_EDGE
Résultat int