Class GraphAlgorithms
- Namespace
- AlgorithmsSW.Graph
- Assembly
- AlgorithmsSW.dll
public static class GraphAlgorithms
- Inheritance
-
GraphAlgorithms
- Inherited Members
Methods
AllDegreesEven(IReadOnlyGraph)
public static bool AllDegreesEven(this IReadOnlyGraph graph)
Parameters
graph
IReadOnlyGraph
Returns
ConnectComponents(IGraph)
public static void ConnectComponents(this IGraph graph)
Parameters
graph
IGraph
DistanceHistogram<T>(IReadOnlyGraph, int)
[ExerciseReference(4, 1, 23)]
public static Counter<int> DistanceHistogram<T>(this IReadOnlyGraph graph, int sourceVertex)
Parameters
graph
IReadOnlyGraphsourceVertex
int
Returns
Type Parameters
T
FindNodeSafeToDelete(IReadOnlyGraph)
[ExerciseReference(4, 1, 10)]
public static int FindNodeSafeToDelete(IReadOnlyGraph graph)
Parameters
graph
IReadOnlyGraph
Returns
GetFullGrid(int, int)
[ExerciseReference(4, 4, 33)]
public static GridGraph GetFullGrid(int width, int height)
Parameters
Returns
HasEulerCycle(IReadOnlyGraph)
public static bool HasEulerCycle(this IReadOnlyGraph graph)
Parameters
graph
IReadOnlyGraph
Returns
IsBridge(IGraph, int, int)
public static bool IsBridge(this IGraph graph, int vertex0, int vertex1)
Parameters
Returns
ShareEdge(IEnumerable<(int, int)>, IEnumerable<(int, int)>)
Checks whether two paths share an edge.
public static bool ShareEdge(IEnumerable<(int, int)> path0, IEnumerable<(int, int)> path1)
Parameters
path0
IEnumerable<(int source, int target)>The first path.
path1
IEnumerable<(int source, int target)>The second path.