protected override bool AllowEdge(DirectedAdjMatrixGraphVertex <T> vertex1, DirectedAdjMatrixGraphVertex <T> vertex2) { if (Data.AreVerticesAdjacent(vertex1, vertex2)) { return(false); } return(true); }
internal override void UpdateEdgeData(DirectedAdjMatrixGraphVertex <T> vertex1, DirectedAdjMatrixGraphVertex <T> vertex2, Func <EdgeData, EdgeData> updateFunc) { Matrix[vertex1.Handle, vertex2.Handle] = updateFunc(GetEdgeDataCore(vertex1, vertex2)); }
internal override void CreateEdge(DirectedAdjMatrixGraphVertex <T> vertex1, DirectedAdjMatrixGraphVertex <T> vertex2, double weight) { Matrix[vertex1.Handle, vertex2.Handle] = new EdgeData(weight); }