V
- Vertices typeE
- Edges typepublic class MVC<V,E> extends Algorithms<V,E>
Constructor and Description |
---|
MVC(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<V> |
getVertexCoverSolution()
Returns the last computed vertex cover set, null if the called
Parameterized algorithms cannot find such a set.
|
java.util.Set<V> |
greedyCoverMaxDegree(edu.uci.ics.jung.graph.Graph<V,E> g)
Finds a greedy approximation for a minimal vertex cover of a specified
graph.
|
boolean |
kVertexCoverBruteForce(edu.uci.ics.jung.graph.Graph<V,E> g,
int k)
Returns true if a vertex cover of size k exists in graph G.
|
boolean |
kVertexCoverBussGoldsmith(edu.uci.ics.jung.graph.Graph<V,E> g,
int k)
Returns true if a vertex cover of size k exists in graph G.
|
boolean |
kVertexCoverDegreeBranchingStrategy(edu.uci.ics.jung.graph.Graph<V,E> g,
int k)
Returns true if a vertex cover of size k exists in graph G.
|
boolean |
kVertexCoverNiedermeier(edu.uci.ics.jung.graph.Graph<V,E> g,
int k)
Returns true if a vertex cover of size k exists in graph G.
|
java.util.Set<V> |
twoApproximationCover(edu.uci.ics.jung.graph.Graph<V,E> g)
Finds a 2-approximation for a minimal vertex cover of the specified
graph.
|
getEdgeFactory, getGraphFactory, getVertexFactory, setEdgeFactoy, setGraphFactoy, setVertexFactoy
public java.util.Set<V> getVertexCoverSolution()
public java.util.Set<V> twoApproximationCover(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- the graph for which vertex cover approximation has to be foundpublic java.util.Set<V> greedyCoverMaxDegree(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- the graph for which vertex cover approximation has to be foundpublic boolean kVertexCoverBruteForce(edu.uci.ics.jung.graph.Graph<V,E> g, int k)
g
- graphk
- vertex cover sizepublic boolean kVertexCoverDegreeBranchingStrategy(edu.uci.ics.jung.graph.Graph<V,E> g, int k)
g
- graphk
- vertex cover sizepublic boolean kVertexCoverBussGoldsmith(edu.uci.ics.jung.graph.Graph<V,E> g, int k)
g
- graphk
- vertex cover sizepublic boolean kVertexCoverNiedermeier(edu.uci.ics.jung.graph.Graph<V,E> g, int k)
g
- graphk
- vertex cover size