V
- the graph vertex typeE
- the graph edge typepublic class BarYehudaEvenTwoApproxVCImpl<V,E> extends Object implements MinimumWeightedVertexCoverAlgorithm<V,E>
BarYehudaEvenTwoApproxVCImpl
.
TODO: Remove the UndirectedSubgraph dependency! Querying vertex degrees on these graphs is
actually slow! This does affect the runtime complexity. Better would be to just work on a clone
of the original graph!MinimumVertexCoverAlgorithm.VertexCover<V>, MinimumVertexCoverAlgorithm.VertexCoverImpl<V>
Constructor and Description |
---|
BarYehudaEvenTwoApproxVCImpl() |
Modifier and Type | Method and Description |
---|---|
MinimumVertexCoverAlgorithm.VertexCover<V> |
getVertexCover(UndirectedGraph<V,E> graph,
Map<V,Double> vertexWeightMap)
Computes a vertex cover; the weight of each vertex is provided in the in the
vertexWeightMap . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVertexCover
public MinimumVertexCoverAlgorithm.VertexCover<V> getVertexCover(UndirectedGraph<V,E> graph, Map<V,Double> vertexWeightMap)
MinimumWeightedVertexCoverAlgorithm
vertexWeightMap
.getVertexCover
in interface MinimumWeightedVertexCoverAlgorithm<V,E>
graph
- the input graphvertexWeightMap
- map containing non-negative weights for each vertexCopyright © 2016. All rights reserved.