Пример #1
0
 internal GraphEdge(GraphVertex v0, GraphVertex graphVertex, float v)
 {
     this.From  = v0;
     this.To    = graphVertex;
     this.Value = v;
     IsValid    = true;
 }
Пример #2
0
        public IEnumerable <GraphEdge> GetNeighbors(GraphVertex v0)
        {
            var neighbors = new List <GraphEdge>();

            for (var i = 0; i < adjacencyMatrix.ColumnCount; ++i)
            {
                neighbors.Add(new GraphEdge(v0, new GraphVertex(i), adjacencyMatrix[v0.Index, i]));
            }
            return(neighbors);
        }
Пример #3
0
 public abstract GraphPath FindPath(GraphVertex start);
Пример #4
0
 public GraphEdge GetEdge(GraphVertex v0, GraphVertex v1)
 {
     return(new GraphEdge(v0, new GraphVertex(v1.Index), adjacencyMatrix[v0.Index, v1.Index]));
 }