JTP API Documentation

jtp.time.tlgraph
Class TLGraph

java.lang.Object
  |
  +--jtp.time.tlgraph.TLGraph

public class TLGraph
extends Object

Temporally labeled graph. This graph manages Nodes which in turn store pointers to TimePoints. Links between Nodes represent the temporal relations between the TimePoints stored in the Nodes.


Field Summary
protected  Map history
           
protected  Map predecessor
           
 
Constructor Summary
TLGraph()
           
TLGraph(TimePointKnowledgeStore s)
           
 
Method Summary
 Collection getAllPointsAfter(TimePoint tp)
           
 Collection getAllPointsAfter(TimePoint tp, int maxDepth)
           
 Collection getAllPointsAfterOrEqual(TimePoint tp)
           
 Collection getAllPointsAfterOrEqual(TimePoint tp, int maxDepth)
           
 Collection getAllPointsBefore(TimePoint tp)
           
 Collection getAllPointsBefore(TimePoint tp, int maxDepth)
           
 Collection getAllPointsBeforeOrEqual(TimePoint tp)
           
 Collection getAllPointsBeforeOrEqual(TimePoint tp, int maxDepth)
           
 Collection getAllPointsEqual(TimePoint tp)
           
 CalendarTimePoint getMaximumBeforeOrEqualLocation(TimePoint tp)
          Finds the CalendarTimePoint which occurs just before or at the same time as tp.
 CalendarTimePoint getMinimumAfterOrEqualLocation(TimePoint tp)
          Finds the CalendarTimePoint which occurs just after or at the same time as tp.
 UndoManager getUndoManager()
           
 ReasoningStep proveRelation(TimePoint tp1, TimePoint tp2, byte relation)
           
 byte query(Node v, Node w)
           
 byte query(TimePoint a, TimePoint b)
           
 void setUndoManager(UndoManager undo)
           
 void update(TimePoint tp1, byte relation, TimePoint tp2)
           
 void update(TimePoint tp1, byte relation, TimePoint tp2, ReasoningStep rs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

history

protected transient Map history

predecessor

protected transient Map predecessor
Constructor Detail

TLGraph

public TLGraph()

TLGraph

public TLGraph(TimePointKnowledgeStore s)
Method Detail

getUndoManager

public UndoManager getUndoManager()

setUndoManager

public void setUndoManager(UndoManager undo)

query

public byte query(TimePoint a,
                  TimePoint b)

query

public byte query(Node v,
                  Node w)

getMaximumBeforeOrEqualLocation

public CalendarTimePoint getMaximumBeforeOrEqualLocation(TimePoint tp)
Finds the CalendarTimePoint which occurs just before or at the same time as tp.

Parameters:
tp - a TimePoint
Returns:
the CalendarTimePoint that occurs just before or at the same time as tp. null if no such time point can be found.

getMinimumAfterOrEqualLocation

public CalendarTimePoint getMinimumAfterOrEqualLocation(TimePoint tp)
Finds the CalendarTimePoint which occurs just after or at the same time as tp.

Parameters:
tp - a TimePoint
Returns:
the CalendarTimePoint that occurs just after or at the same time as tp. null if no such time point can be found.

getAllPointsAfter

public Collection getAllPointsAfter(TimePoint tp)

getAllPointsAfterOrEqual

public Collection getAllPointsAfterOrEqual(TimePoint tp)

getAllPointsBefore

public Collection getAllPointsBefore(TimePoint tp)

getAllPointsBeforeOrEqual

public Collection getAllPointsBeforeOrEqual(TimePoint tp)

getAllPointsAfter

public Collection getAllPointsAfter(TimePoint tp,
                                    int maxDepth)

getAllPointsAfterOrEqual

public Collection getAllPointsAfterOrEqual(TimePoint tp,
                                           int maxDepth)

getAllPointsBefore

public Collection getAllPointsBefore(TimePoint tp,
                                     int maxDepth)

getAllPointsBeforeOrEqual

public Collection getAllPointsBeforeOrEqual(TimePoint tp,
                                            int maxDepth)

getAllPointsEqual

public Collection getAllPointsEqual(TimePoint tp)

update

public void update(TimePoint tp1,
                   byte relation,
                   TimePoint tp2)
            throws ReasoningException
ReasoningException

update

public void update(TimePoint tp1,
                   byte relation,
                   TimePoint tp2,
                   ReasoningStep rs)
            throws ReasoningException
ReasoningException

proveRelation

public ReasoningStep proveRelation(TimePoint tp1,
                                   TimePoint tp2,
                                   byte relation)

JTP API Documentation