Esempio n. 1
0
        internal override void UpdateEdgeData(AdjMatrixGraphVertex <T> vertex1, AdjMatrixGraphVertex <T> vertex2, Func <EdgeData, EdgeData> updateFunc)
        {
            EdgeData edgeData = updateFunc(GetEdgeDataCore(vertex1, vertex2));

            Matrix[vertex1.Handle, vertex2.Handle] = edgeData;
            Matrix[vertex2.Handle, vertex1.Handle] = edgeData;
        }
Esempio n. 2
0
 protected override bool AllowEdge(AdjMatrixGraphVertex <T> vertex1, AdjMatrixGraphVertex <T> vertex2)
 {
     if (Data.AreVerticesAdjacent(vertex1, vertex2))
     {
         return(false);
     }
     return(true);
 }
Esempio n. 3
0
 internal override void CreateEdge(AdjMatrixGraphVertex <T> vertex1, AdjMatrixGraphVertex <T> vertex2, double weight)
 {
     Matrix[vertex1.Handle, vertex2.Handle] = new EdgeData(weight);
     Matrix[vertex2.Handle, vertex1.Handle] = new EdgeData(weight);
 }