Package org.nlpub.watset.graph
Class SimplifiedWatset.Builder<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.SimplifiedWatset.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,SimplifiedWatset<V,E>>
- Enclosing class:
- SimplifiedWatset<V,E>
public static class SimplifiedWatset.Builder<V,E> extends Object implements ClusteringBuilder<V,E,SimplifiedWatset<V,E>>
Builder forSimplifiedWatset.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimplifiedWatset<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.SimplifiedWatset.Builder<V,E>setGlobal(Function<org.jgrapht.Graph<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge>,Clustering<Sense<V>>> global)Set the global clustering algorithm supplier.SimplifiedWatset.Builder<V,E>setGlobalBuilder(ClusteringBuilder<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge,?> globalBuilder)Set the global clustering algorithm builder.SimplifiedWatset.Builder<V,E>setLocal(Function<org.jgrapht.Graph<V,E>,Clustering<V>> local)Set the local clustering algorithm supplier.SimplifiedWatset.Builder<V,E>setLocalBuilder(ClusteringBuilder<V,E,?> localBuilder)Set the local clustering algorithm builder.
-
-
-
Method Detail
-
build
public SimplifiedWatset<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,SimplifiedWatset<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,SimplifiedWatset<V,E>>- Returns:
- a factory function that sets up the algorithm for the given graph
-
setLocal
public SimplifiedWatset.Builder<V,E> setLocal(Function<org.jgrapht.Graph<V,E>,Clustering<V>> local)
Set the local clustering algorithm supplier.- Parameters:
local- the local clustering algorithm supplier- Returns:
- the builder
-
setLocalBuilder
public SimplifiedWatset.Builder<V,E> setLocalBuilder(ClusteringBuilder<V,E,?> localBuilder)
Set the local clustering algorithm builder.- Parameters:
localBuilder- the local clustering algorithm builder- Returns:
- the builder
-
setGlobal
public SimplifiedWatset.Builder<V,E> setGlobal(Function<org.jgrapht.Graph<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge>,Clustering<Sense<V>>> global)
Set the global clustering algorithm supplier.- Parameters:
global- the global clustering algorithm supplier- Returns:
- the builder
-
setGlobalBuilder
public SimplifiedWatset.Builder<V,E> setGlobalBuilder(ClusteringBuilder<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge,?> globalBuilder)
Set the global clustering algorithm builder.- Parameters:
globalBuilder- the global clustering algorithm builder- Returns:
- the builder
-
-