Пример #1
0
 protected override void CreateEdgeCore(DirectedAdjSetGraphVertex <T> vertex1, DirectedAdjSetGraphVertex <T> vertex2, double weight)
 {
     if (!ReferenceEquals(vertex1, vertex2) && Data.AreVerticesAdjacent(vertex1, vertex2))
     {
         throw new InvalidOperationException();
     }
     base.CreateEdgeCore(vertex1, vertex2, weight);
 }
Пример #2
0
        internal override void UpdateEdgeData(DirectedAdjSetGraphVertex <T> vertex1, DirectedAdjSetGraphVertex <T> vertex2, Func <EdgeData, EdgeData> updateFunc)
        {
            VertexSetItem setItem = GetVertexSetItem(vertex1, vertex2);

            setItem.EdgeData = updateFunc(setItem.EdgeData);
        }
Пример #3
0
 protected override bool AllowEdge(VertexDisjointSet set, DirectedAdjSetGraphVertex <T> vertex)
 {
     return(true);
 }
Пример #4
0
 internal override void CreateEdge(DirectedAdjSetGraphVertex <T> vertex1, DirectedAdjSetGraphVertex <T> vertex2, double weight)
 {
     List[vertex1.Handle].AddVertex(vertex2, weight);
 }