V
- Vertices typeE
- Edges typepublic class MIS<V,E> extends Algorithms<V,E>
Constructor and Description |
---|
MIS(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory) |
Modifier and Type | Method and Description |
---|---|
static <V,E> boolean |
isIndependentSet(edu.uci.ics.jung.graph.Graph<V,E> g,
java.util.Set<V> S)
This method tests if a set S of a Graph G is an independent set.
|
static <V,E> boolean |
isMaximalIndependentSet(edu.uci.ics.jung.graph.Graph<V,E> g,
java.util.Set<V> S)
This method tests if a set S of a Graph G is a maximal independent set.
|
java.util.Set<V> |
maximalIndependentSetGreedy(edu.uci.ics.jung.graph.Graph<V,E> g)
This method finds a maximal independent set in a graph using a trivial
greedy algorithm.
|
java.util.Set<V> |
maximumIndependentSetBruteForce(edu.uci.ics.jung.graph.Graph<V,E> g)
This method returns a maximum independent set of G using the naive brute
force algorithm that examines every vertex subset and checks whether it
is an independent set, which time complexity is O(n^2.2^n).
|
java.util.Set<V> |
maximumIndependentSetMaximumDegree(edu.uci.ics.jung.graph.Graph<V,E> g)
This method returns a maximum independent set of G by finding vertices with
max degrees.
|
java.util.Set<V> |
maximumIndependentSetMoonMoser(edu.uci.ics.jung.graph.Graph<V,E> g)
This method returns a maximum independent set of G based on the Moon
and Moser work ("On cliques in graphs" 1965).
|
java.util.Set<V> |
maximumIndependentSetMoonMoserNonRecursive(edu.uci.ics.jung.graph.Graph<V,E> g)
This method is the same as MaximumIndependentSetMM but in a non-recursive
version (slower).
|
java.util.Set<V> |
maximuRmIndependentSetFominGrandoniKratsch(edu.uci.ics.jung.graph.Graph<V,E> g)
This method returns a maximum independent set of G based on the Fomin and al.
|
getEdgeFactory, getGraphFactory, getVertexFactory, setEdgeFactoy, setGraphFactoy, setVertexFactoy
public java.util.Set<V> maximalIndependentSetGreedy(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- Graph in which a maximal Independent set has to be foundpublic java.util.Set<V> maximumIndependentSetBruteForce(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- Graph in which Maximum Independent sets have to be foundpublic java.util.Set<V> maximumIndependentSetMoonMoser(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- Graph in which Maximum Independent sets have to be foundpublic java.util.Set<V> maximumIndependentSetMoonMoserNonRecursive(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- Graph in which Maximum Independent sets have to be foundpublic java.util.Set<V> maximumIndependentSetMaximumDegree(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- Graph in which Maximum Independent sets have to be foundpublic java.util.Set<V> maximuRmIndependentSetFominGrandoniKratsch(edu.uci.ics.jung.graph.Graph<V,E> g)
g
- graphpublic static <V,E> boolean isIndependentSet(edu.uci.ics.jung.graph.Graph<V,E> g, java.util.Set<V> S)
g
- graphS
- set to testpublic static <V,E> boolean isMaximalIndependentSet(edu.uci.ics.jung.graph.Graph<V,E> g, java.util.Set<V> S)
g
- graphS
- set to test