V
- the graph vertex typeE
- the graph edge typepublic class BarYehudaEvenTwoApproxVCImpl<V,E> extends Object implements VertexCoverAlgorithm<V>
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!VertexCoverAlgorithm.VertexCover<V>, VertexCoverAlgorithm.VertexCoverImpl<V>
Constructor and Description |
---|
BarYehudaEvenTwoApproxVCImpl(Graph<V,E> graph)
Constructs a new BarYehudaEvenTwoApproxVCImpl instance where all vertices have uniform
weights.
|
BarYehudaEvenTwoApproxVCImpl(Graph<V,E> graph,
Map<V,Double> vertexWeightMap)
Constructs a new BarYehudaEvenTwoApproxVCImpl instance
|
Modifier and Type | Method and Description |
---|---|
VertexCoverAlgorithm.VertexCover<V> |
getVertexCover()
Computes a vertex cover.
|
public BarYehudaEvenTwoApproxVCImpl(Graph<V,E> graph)
graph
- input graphpublic VertexCoverAlgorithm.VertexCover<V> getVertexCover()
VertexCoverAlgorithm
getVertexCover
in interface VertexCoverAlgorithm<V>
Copyright © 2019. All rights reserved.