anl.aida.client.net
Class OccurrenceEdgeCreator

java.lang.Object
  extended by anl.aida.client.net.OccurrenceEdgeCreator
All Implemented Interfaces:
EdgeCreator

public class OccurrenceEdgeCreator
extends java.lang.Object
implements EdgeCreator

Creates an edge between two term nodes if the number of documents that occur in both nodes is greater than or equal to some threshold.


Field Summary
private  int threshold
           
 
Constructor Summary
OccurrenceEdgeCreator(int threshold)
          Creates an OccurenceEdgeCreator with the specified threshold.
 
Method Summary
 boolean createEdge(TermNode node1, TermNode node2, edu.uci.ics.jung.graph.Graph<TermNode,CGEdge> graph)
          Creates an edge between the two nodes if the number of documents that occur in both nodes is greater than or equal to the threshold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threshold

private int threshold
Constructor Detail

OccurrenceEdgeCreator

public OccurrenceEdgeCreator(int threshold)
Creates an OccurenceEdgeCreator with the specified threshold.

Parameters:
threshold - the threshold for document co-occurence that triggers edge creation
Method Detail

createEdge

public boolean createEdge(TermNode node1,
                          TermNode node2,
                          edu.uci.ics.jung.graph.Graph<TermNode,CGEdge> graph)
Creates an edge between the two nodes if the number of documents that occur in both nodes is greater than or equal to the threshold.

Specified by:
createEdge in interface EdgeCreator
Parameters:
node1 - the first node
node2 - the second node
graph - the graph where the edge will be created
Returns:
boolean if the edge created, otherwise false.