Class Mst
- Namespace
- AlgorithmsSW.EdgeWeightedGraph
- Assembly
- AlgorithmsSW.dll
public class Mst
- Inheritance
-
Mst
- Inherited Members
- Extension Methods
Methods
AddEdge<T>(EdgeWeightedGraphWithAdjacencyLists<T>, IMst<T>, Edge<T>)
Finds a new spanning tree if we add an edge the given edge from a graph, given an existing MST.
[ExerciseReference(4, 3, 15)]
public EdgeWeightedGraphWithAdjacencyLists<T> AddEdge<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph, IMst<T> mst, Edge<T> edge) where T : INumber<T>
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>The graph to delete the edge from.
mst
IMst<T>The existing MST.
edge
Edge<T>The edge to delete.
Returns
- EdgeWeightedGraphWithAdjacencyLists<T>
A new MST.
Type Parameters
T
The type of the weight.
DeleteEdge<T>(EdgeWeightedGraphWithAdjacencyLists<T>, IMst<T>, Edge<T>)
Finds a new spanning tree if we delete the given edge from a graph, given an existing MST.
[ExerciseReference(4, 3, 14)]
public EdgeWeightedGraphWithAdjacencyLists<T> DeleteEdge<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph, IMst<T> mst, Edge<T> edge) where T : INumber<T>
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>The graph to delete the edge from.
mst
IMst<T>The existing MST.
edge
Edge<T>The edge to delete.
Returns
- EdgeWeightedGraphWithAdjacencyLists<T>
A new MST.
Type Parameters
T
The type of the weight.
FindMaxWeightThat<T>(EdgeWeightedGraphWithAdjacencyLists<T>, IMst<T>, (int vertex0, int vertex1))
Finds a new spanning tree if we add an edge the given edge from a graph, given an existing MST.
[ExerciseReference(4, 3, 16)]
public T FindMaxWeightThat<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph, IMst<T> mst, (int vertex0, int vertex1) edge) where T : INumber<T>
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>The graph to delete the edge from.
mst
IMst<T>The existing MST.
edge
(int vertex0, int vertex1)The edge to delete.
Returns
- T
A new MST.
Type Parameters
T
The type of the weight.
IsBridge<T>(EdgeWeightedGraphWithAdjacencyLists<T>, int, int)
public static bool IsBridge<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph, int vertex0, int vertex1)
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>vertex0
intvertex1
int
Returns
Type Parameters
T
MstForest<T>(EdgeWeightedGraphWithAdjacencyLists<T>)
[ExerciseReference(4, 3, 22)]
public static IEnumerable<IMst<T>> MstForest<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph) where T : INumber<T>
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>
Returns
- IEnumerable<IMst<T>>
Type Parameters
T
Mst_ReverseDelete<T>(EdgeWeightedGraphWithAdjacencyLists<T>)
public EdgeWeightedGraphWithAdjacencyLists<T> Mst_ReverseDelete<T>(EdgeWeightedGraphWithAdjacencyLists<T> graph) where T : IComparisonOperators<T, T, bool>
Parameters
graph
EdgeWeightedGraphWithAdjacencyLists<T>
Returns
Type Parameters
T
MysteryMst<T>(IEdgeWeightedGraph<T>)
public static EdgeWeightedGraphWithAdjacencyLists<T> MysteryMst<T>(IEdgeWeightedGraph<T> graph)
Parameters
graph
IEdgeWeightedGraph<T>
Returns
Type Parameters
T