de.fuberlin.wiwiss.wiqa.extensions.tidal
Class SimpleTrustGraph

java.lang.Object
  extended byde.fuberlin.wiwiss.wiqa.extensions.tidal.SimpleTrustGraph

public class SimpleTrustGraph
extends Object

A directed graph whose edges are labeled with a strength ranging from 1 to 10. Used as the data structure for the Tidal Trust algorithm. Nodes are identified by generic Java objects.

Version:
$Id$
Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
SimpleTrustGraph()
           
 
Method Summary
 void addEdge(Object from, Object to, double strength)
           
 boolean contains(Object from, Object to)
           
 Collection neighbours(Object node)
          Returns the neighbour nodes of a node, or null if the node is not in the graph.
 int size()
           
 double strength(Object from, Object to)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleTrustGraph

public SimpleTrustGraph()
Method Detail

addEdge

public void addEdge(Object from,
                    Object to,
                    double strength)

contains

public boolean contains(Object from,
                        Object to)

strength

public double strength(Object from,
                       Object to)

neighbours

public Collection neighbours(Object node)
Returns the neighbour nodes of a node, or null if the node is not in the graph.

Parameters:
node - A node in the graph
Returns:
A collection of Objects, all neighbours of the node

size

public int size()

toString

public String toString()