Package org.nlpub.watset.graph
Class MarkovClusteringExternal.Builder<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.MarkovClusteringExternal.Builder<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
ClusteringBuilder<V,E,MarkovClusteringExternal<V,E>>
- Enclosing class:
- MarkovClusteringExternal<V,E>
public static class MarkovClusteringExternal.Builder<V,E> extends Object implements ClusteringBuilder<V,E,MarkovClusteringExternal<V,E>>
Builder forMarkovClusteringExternal.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarkovClusteringExternal<V,E>build(org.jgrapht.Graph<V,E> graph)Construct an instance of the clustering algorithm with the parameters specified in the builder.Function<org.jgrapht.Graph<V,E>,Clustering<V>>provider()Construct a factory function that sets up the algorithm for the given graph.MarkovClusteringExternal.Builder<V,E>setPath(Path path)Set the path to the MCL binary.MarkovClusteringExternal.Builder<V,E>setR(double r)Set the inflation parameter.MarkovClusteringExternal.Builder<V,E>setThreads(int threads)Set the number of threads.
-
-
-
Field Detail
-
R
public static final int R
The default value of the inflation parameter.- See Also:
- Constant Field Values
-
THREADS
public static final int THREADS
The default number of threads.- See Also:
- Constant Field Values
-
-
Method Detail
-
build
public MarkovClusteringExternal<V,E> build(org.jgrapht.Graph<V,E> graph)
Description copied from interface:ClusteringBuilderConstruct an instance of the clustering algorithm with the parameters specified in the builder.- Specified by:
buildin interfaceClusteringBuilder<V,E,MarkovClusteringExternal<V,E>>- Parameters:
graph- the graph- Returns:
- a fully-configured clustering algorithm
-
provider
public Function<org.jgrapht.Graph<V,E>,Clustering<V>> provider()
Description copied from interface:ClusteringBuilderConstruct a factory function that sets up the algorithm for the given graph.- Specified by:
providerin interfaceClusteringBuilder<V,E,MarkovClusteringExternal<V,E>>- Returns:
- a factory function that sets up the algorithm for the given graph
-
setPath
public MarkovClusteringExternal.Builder<V,E> setPath(Path path)
Set the path to the MCL binary.- Parameters:
path- the path to the MCL binary- Returns:
- the builder
-
setR
public MarkovClusteringExternal.Builder<V,E> setR(double r)
Set the inflation parameter.- Parameters:
r- the inflation parameter- Returns:
- the builder
-
setThreads
public MarkovClusteringExternal.Builder<V,E> setThreads(int threads)
Set the number of threads.- Parameters:
threads- the number of threads- Returns:
- the builder
-
-