Package org.nlpub.watset.util
Class AlgorithmProvider<V,E>
- java.lang.Object
-
- org.nlpub.watset.util.AlgorithmProvider<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
Function<org.jgrapht.Graph<V,E>,Clustering<V>>
public class AlgorithmProvider<V,E> extends Object implements Function<org.jgrapht.Graph<V,E>,Clustering<V>>
A utility class that creates instances of the graph clustering algorithms.
-
-
Constructor Summary
Constructors Constructor Description AlgorithmProvider(String algorithm, String params)Create an instance of this utility class.AlgorithmProvider(String algorithm, Map<String,String> params)Create an instance of this utility class.
-
-
-
Field Detail
-
SEPARATOR
public static final Pattern SEPARATOR
The default separator in parameter strings, expressed by the colon symbol.
-
-
Constructor Detail
-
AlgorithmProvider
public AlgorithmProvider(String algorithm, Map<String,String> params)
Create an instance of this utility class.- Parameters:
algorithm- the algorithm identifierparams- the parameter map for the algorithm
-
AlgorithmProvider
public AlgorithmProvider(String algorithm, String params)
Create an instance of this utility class.This constructor parses the parameter string
paramsusingparseParams(String).- Parameters:
algorithm- the algorithm identifierparams- the parameter string for the algorithm
-
-