public abstract class VertexCovers extends Object
Constructor and Description |
---|
VertexCovers() |
Modifier and Type | Method and Description |
---|---|
static <V,E> Set<V> |
find2ApproximationCover(Graph<V,E> g)
Finds a 2-approximation for a minimal vertex cover of the specified
graph.
|
static <V,E> Set<V> |
findGreedyCover(UndirectedGraph<V,E> g)
Finds a greedy approximation for a minimal vertex cover of a specified
graph.
|
public static <V,E> Set<V> find2ApproximationCover(Graph<V,E> g)
For more details see Jenny Walter, CMPU-240: Lecture notes for Language Theory and Computation, Fall 2002, Vassar College, http://www.cs.vassar.edu/~walter/cs241index/lectures/PDF/approx.pdf.
g
- the graph for which vertex cover approximation is to be found.public static <V,E> Set<V> findGreedyCover(UndirectedGraph<V,E> g)
The algorithm works on undirected graphs, but can also work on
directed graphs when their edge-directions are ignored. To ignore edge
directions you can use Graphs.undirectedGraph(Graph)
or AsUndirectedGraph
.
g
- the graph for which vertex cover approximation is to be found.Copyright © 2016. All rights reserved.