Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.mit.media.hive.support.graph
Class GraphDifferenceHelper  view GraphDifferenceHelper download GraphDifferenceHelper.java

java.lang.Object
  extended byedu.mit.media.hive.support.graph.GraphDifferenceHelper

public class GraphDifferenceHelper
extends java.lang.Object

this is a class of static methods which are just useful to help out when we need to know the "difference" between two graphs. this will help us tell the list of agents which have disappeared, the list of agents that have been added, the list of connections that have disappeared, and the list of connections that have been added


Constructor Summary
GraphDifferenceHelper()
           
 
Method Summary
static Edge[] getAddedConnections(Graph oldGraph, Graph newGraph)
          get a list of all the connections which have been made to this graph
static java.lang.Object[] getAddedObjects(Graph oldGraph, Graph newGraph)
          get a list of all the objects that have been added to the newGraph (ie -- are not in the old graph)
static Edge[] getRemovedConnections(Graph oldGraph, Graph newGraph)
          get a list of all the edges which have been removed.
static java.lang.Object[] getRemovedObjects(Graph oldGraph, Graph newGraph)
          get a list of objects which are in the old graph but not in the new graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphDifferenceHelper

public GraphDifferenceHelper()
Method Detail

getAddedObjects

public static java.lang.Object[] getAddedObjects(Graph oldGraph,
                                                 Graph newGraph)
get a list of all the objects that have been added to the newGraph (ie -- are not in the old graph)


getRemovedObjects

public static java.lang.Object[] getRemovedObjects(Graph oldGraph,
                                                   Graph newGraph)
get a list of objects which are in the old graph but not in the new graph. this is just a shortcut that will make the code look like it makes sense -- in reality you just need to switch the order in which we are testing the graphs in getAddedObjects


getAddedConnections

public static Edge[] getAddedConnections(Graph oldGraph,
                                         Graph newGraph)
get a list of all the connections which have been made to this graph


getRemovedConnections

public static Edge[] getRemovedConnections(Graph oldGraph,
                                           Graph newGraph)
get a list of all the edges which have been removed. thsi is the getAddedConnections method just in reverse