|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_leipzig.bf.cluster.BorderFlow
public class BorderFlow
![]() |
![]() |
![]() |
![]() |
Field Summary | |
---|---|
protected ClusterCache |
cache
|
protected java.sql.Connection |
con
|
protected java.lang.String |
database
|
protected ClusterGraph |
graph
|
protected Harden |
harden
|
protected java.lang.String |
ip
|
protected java.lang.String |
password
|
protected java.lang.String |
user
|
Constructor Summary | |
---|---|
BorderFlow(java.lang.String file,
Harden p_harden)
Constructs new instance for tabulator separated files. |
|
BorderFlow(java.lang.String file,
java.lang.String separator,
Harden p_harden)
Constructs new instance. |
Method Summary | |
---|---|
void |
closeConnection()
Close connection to database. |
java.lang.String |
cluster(double connThreshold,
boolean testOne,
boolean heuristic,
boolean caching)
Starts Borderflow with the given configuration to write in String. |
java.lang.String |
cluster(java.lang.String[] p_seeds,
boolean testOne,
boolean heuristic,
boolean caching)
Starts Borderflow with the given configuration to write in String. |
void |
clusterToDatabase(double connThreshold)
Clusters to the database found under connection |
void |
clusterToFile(java.lang.String outputFile,
double connThreshold,
boolean testOne,
boolean heuristic,
boolean caching)
Starts Borderflow with the given configuration to write in file. |
double |
compareSet(java.util.Set<java.lang.Integer> set1,
java.util.Set<java.lang.Integer> set2)
|
double |
getAbsoluteFlow(Cluster c,
java.lang.Integer node)
Computes the inverse relative flow to make sure that no division by zero is carried out |
java.sql.Connection |
getConnection()
Get connection to database |
double |
getFlowFromNodeToSet(java.util.TreeSet<java.lang.Integer> nodeSet,
java.lang.Integer node)
Compute flow from node to set of nodes |
double |
getInverseRelativeFlow(Cluster c,
java.lang.Integer node)
Computes the inverse relative flow to make sure that no division by zero is carried out |
double |
getRelativerFlow(java.util.TreeSet<java.lang.Integer> nodes)
|
java.lang.String |
getSilhouetteAndRelativeFlow(java.util.TreeSet<java.lang.Integer> nodes)
Computes the silhouette for a set of nodes |
protected java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> |
harden(java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> clusterSeedMap)
Harden method used a Harden instance. |
java.util.TreeSet<java.lang.Integer> |
heuristicGetCluster(java.lang.Integer seed)
Compute cluster for a given seed using heuristic version of BorderFlow. |
java.util.TreeSet<java.lang.Integer> |
heuristicGetClusterTestOne(java.lang.Integer seed)
Compute cluster for a given seed using heuristic and test one version of BorderFlow. |
java.util.TreeSet<java.lang.Integer> |
knnCluster(java.lang.Integer seed,
int k)
Compute cluster for a given seed. |
void |
knnToFile(java.lang.String outputFile,
double connThreshold,
int k)
Starts knn with the given configuration to write in file. |
java.lang.String |
knnToString(double connThreshold,
int k)
Starts knn with the given configuration to write in String. |
java.lang.String |
knnToString(java.lang.String[] p_seeds,
int k)
Starts knn with the given configuration to write in String. |
java.util.TreeSet<java.lang.Integer> |
optimalGetCluster(java.lang.Integer seed)
Compute cluster for a given seed using optimal version of BorderFlow. |
java.util.TreeSet<java.lang.Integer> |
optimalGetClusterTestOne(java.lang.Integer seed)
Compute cluster for a given seed using optimal and test one version of BorderFlow. |
void |
setDatabaseVariables(java.lang.String _ip,
java.lang.String _database,
java.lang.String _user,
java.lang.String _password)
Set database variables. |
protected java.lang.String |
writeToString(java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> clusterSeedMap)
Writes clusterSeedMap to String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClusterCache cache
protected java.sql.Connection con
protected java.lang.String database
protected ClusterGraph graph
protected Harden harden
protected java.lang.String ip
protected java.lang.String password
protected java.lang.String user
Constructor Detail |
---|
public BorderFlow(java.lang.String file, Harden p_harden)
file
- path to filep_harden
- a Harden
instance.public BorderFlow(java.lang.String file, java.lang.String separator, Harden p_harden)
file
- path to fileseparator
- file separatorp_harden
- a Harden
instance.Method Detail |
---|
public void closeConnection()
public java.lang.String cluster(double connThreshold, boolean testOne, boolean heuristic, boolean caching)
connThreshold
- gives the percentage of the maximal connectivity that a node
can maximally have to be used as seedtestOne
- sets the type of test to useheuristic
- heuristic or the optimal version of borderflowcaching
- sets cache version or not
public java.lang.String cluster(java.lang.String[] p_seeds, boolean testOne, boolean heuristic, boolean caching)
p_seeds
- Strings to be used as seedtestOne
- sets the type of test to useheuristic
- heuristic or the optimal version of borderflowcaching
- sets cache version or not
public void clusterToDatabase(double connThreshold)
public void clusterToFile(java.lang.String outputFile, double connThreshold, boolean testOne, boolean heuristic, boolean caching)
outputFile
- Output is written in outputFileconnThreshold
- gives the percentage of the maximal connectivity that a node
can maximally have to be used as seedtestOne
- sets the type of test to useheuristic
- heuristic or the optimal version of borderflowcaching
- sets cache version or notpublic double compareSet(java.util.Set<java.lang.Integer> set1, java.util.Set<java.lang.Integer> set2)
public double getAbsoluteFlow(Cluster c, java.lang.Integer node)
public java.sql.Connection getConnection()
public double getFlowFromNodeToSet(java.util.TreeSet<java.lang.Integer> nodeSet, java.lang.Integer node)
public double getInverseRelativeFlow(Cluster c, java.lang.Integer node)
public double getRelativerFlow(java.util.TreeSet<java.lang.Integer> nodes)
public java.lang.String getSilhouetteAndRelativeFlow(java.util.TreeSet<java.lang.Integer> nodes)
protected java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> harden(java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> clusterSeedMap)
Harden
instance.
clusterSeedMap
- soft clusters
public java.util.TreeSet<java.lang.Integer> heuristicGetCluster(java.lang.Integer seed)
public java.util.TreeSet<java.lang.Integer> heuristicGetClusterTestOne(java.lang.Integer seed)
public java.util.TreeSet<java.lang.Integer> knnCluster(java.lang.Integer seed, int k)
public void knnToFile(java.lang.String outputFile, double connThreshold, int k)
public java.lang.String knnToString(double connThreshold, int k)
public java.lang.String knnToString(java.lang.String[] p_seeds, int k)
public java.util.TreeSet<java.lang.Integer> optimalGetCluster(java.lang.Integer seed)
public java.util.TreeSet<java.lang.Integer> optimalGetClusterTestOne(java.lang.Integer seed)
public void setDatabaseVariables(java.lang.String _ip, java.lang.String _database, java.lang.String _user, java.lang.String _password)
protected java.lang.String writeToString(java.util.HashMap<java.util.TreeSet<java.lang.Integer>,java.util.TreeSet<java.lang.Integer>> clusterSeedMap)
clusterSeedMap
- with clusters and seeds
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |