V - the graph vertex typeE - the graph edge typepublic class GreedyVCImpl<V,E> extends Object implements MinimumWeightedVertexCoverAlgorithm<V,E>, VertexCoverAlgorithm<V>
ClarksonTwoApproxVCImpl.MinimumVertexCoverAlgorithm.VertexCover<V>, MinimumVertexCoverAlgorithm.VertexCoverImpl<V>VertexCoverAlgorithm.VertexCover<V>, VertexCoverAlgorithm.VertexCoverImpl<V>| Constructor and Description |
|---|
GreedyVCImpl()
Deprecated.
this constructor will be removed in the next release
|
GreedyVCImpl(Graph<V,E> graph)
Constructs a new GreedyVCImpl instance where all vertices have uniform weights.
|
GreedyVCImpl(Graph<V,E> graph,
Map<V,Double> vertexWeightMap)
Constructs a new GreedyVCImpl instance
|
| Modifier and Type | Method and Description |
|---|---|
VertexCoverAlgorithm.VertexCover<V> |
getVertexCover()
Finds a greedy solution to the minimum weighted vertex cover problem.
|
MinimumVertexCoverAlgorithm.VertexCover<V> |
getVertexCover(Graph<V,E> graph,
Map<V,Double> vertexWeightMap)
Deprecated.
replaced by
getVertexCover() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVertexCover@Deprecated public GreedyVCImpl()
public GreedyVCImpl(Graph<V,E> graph)
graph - input graphpublic VertexCoverAlgorithm.VertexCover<V> getVertexCover()
weight(v)/degree(v) and adds it
to the cover. Next vertex v and all edges incident to it are removed. The process repeats
until all vertices are covered. Runtime: O(|E|*log|V|)getVertexCover in interface VertexCoverAlgorithm<V>@Deprecated public MinimumVertexCoverAlgorithm.VertexCover<V> getVertexCover(Graph<V,E> graph, Map<V,Double> vertexWeightMap)
getVertexCover()weight(v)/degree(v) and adds it
to the cover. Next vertex v and all edges incident to it are removed. The process repeats
until all vertices are covered. Runtime: $O(|E| \log |V|)$getVertexCover in interface MinimumWeightedVertexCoverAlgorithm<V,E>graph - input graphvertexWeightMap - mapping of vertex weightsCopyright © 2018. All rights reserved.