Class Correspondences

java.lang.Object
  |
  +--Correspondences

public class Correspondences
extends java.lang.Object

The class `Correspondences' contains the methods to record a correspondence between two frames, to retract a correspondence between two frames, and to test whether two frames correspond to each other. This class is not meant to be instantiated.


Field Summary
static int _numberOfCorrespondences
           
static int _numberOfHLCCorrespondences
           
 
Constructor Summary
Correspondences()
           
 
Method Summary
static boolean alreadyComparedAndFailed(Frame frame1, Frame frame2)
          Returns true iff two given frames have already been compared and failed to correspond.
static Frame correspondenceFrame(Frame frame1, Frame frame2)
          If two given frames correspond to each other then returns the correspondence frame if one exists, otherwise returns null.
static boolean correspondToEachOther(Frame frame1, Frame frame2)
          Returns true iff two given frames correspond to each other (i.e.
static void recordCorrespondence(Frame frame1, Frame frame2, byte mode)
          Records a correspondence between two frames by setting their "corresponds_to" slots to each other.
static void retractCorrespondence(Frame frame1, Frame frame2)
          Retracts a correspondence between two frames by deleting them from each other's "corresponds_to" slot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_numberOfCorrespondences

public static int _numberOfCorrespondences

_numberOfHLCCorrespondences

public static int _numberOfHLCCorrespondences
Constructor Detail

Correspondences

public Correspondences()
Method Detail

recordCorrespondence

public static void recordCorrespondence(Frame frame1,
                                        Frame frame2,
                                        byte mode)
Records a correspondence between two frames by setting their "corresponds_to" slots to each other. However, if it's a plausible correspondence, creates a frame to represent the correspondences, and sets the two frames' "corresponds_to" slots to point to the correspondence frame. The correspondence frame may be tagged with extra information about the correspondence later.
Parameters:
frame1 - The first frame.
frame2 - The second frame.
mode - CORRESPONDENCE or PLAUSIBLE_CORRESPONDENCE.

retractCorrespondence

public static void retractCorrespondence(Frame frame1,
                                         Frame frame2)
Retracts a correspondence between two frames by deleting them from each other's "corresponds_to" slot.
Parameters:
frame1 - The first frame.
frame2 - The second frame.

correspondToEachOther

public static boolean correspondToEachOther(Frame frame1,
                                            Frame frame2)
Returns true iff two given frames correspond to each other (i.e. iff they are in each other's "corresponds_to" slots, or if they have a reified correspondence frame between them).
Parameters:
frame1 - The first frame.
frame2 - The second frame.
Returns:
Whether they correspond.

correspondenceFrame

public static Frame correspondenceFrame(Frame frame1,
                                        Frame frame2)
If two given frames correspond to each other then returns the correspondence frame if one exists, otherwise returns null.
Parameters:
frame1 - The first frame.
frame2 - The second frame.
Returns:
The correspondence frame between them if there is one, otherwise null.

alreadyComparedAndFailed

public static boolean alreadyComparedAndFailed(Frame frame1,
                                               Frame frame2)
Returns true iff two given frames have already been compared and failed to correspond.
Parameters:
frame1 - The first frame.
frame2 - The second frame.
Returns:
Whether they have already been compared and failed to correspond.