jchrest.lib
Class Scene

java.lang.Object
  extended by jchrest.lib.Scene

public class Scene
extends java.lang.Object


Constructor Summary
Scene(java.lang.String name, int height, int width)
           
 
Method Summary
 void addRow(int row, char[] items)
           
 int computeErrorsOfCommission(Scene scene)
          Compute errors of commission of given scene against this one.
 int computeErrorsOfOmission(Scene scene)
          Compute errors of omission of given scene against this one.
 float computePrecision(Scene scene)
          Compute precision of given scene against this one.
 float computeRecall(Scene scene)
          Compute recall of given scene against this one.
 int countItems()
          Count the number of non-empty squares in the scene.
 int countOverlappingPieces(Scene scene)
           
 int getHeight()
           
 java.lang.String getItem(int row, int column)
           
 ListPattern getItems(int startRow, int startColumn, int size)
          Retrieve all items within given row +/- size, column +/- size TODO: Convert this to use a circular field of view.
 java.lang.String getName()
           
 int getWidth()
           
 boolean isEmpty(int row, int column)
           
 void setItem(int row, int column, java.lang.String item)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scene

public Scene(java.lang.String name,
             int height,
             int width)
Method Detail

getName

public java.lang.String getName()

getHeight

public int getHeight()

getWidth

public int getWidth()

addRow

public void addRow(int row,
                   char[] items)

getItem

public java.lang.String getItem(int row,
                                int column)

setItem

public void setItem(int row,
                    int column,
                    java.lang.String item)

isEmpty

public boolean isEmpty(int row,
                       int column)

getItems

public ListPattern getItems(int startRow,
                            int startColumn,
                            int size)
Retrieve all items within given row +/- size, column +/- size TODO: Convert this to use a circular field of view.


countItems

public int countItems()
Count the number of non-empty squares in the scene.


countOverlappingPieces

public int countOverlappingPieces(Scene scene)

computePrecision

public float computePrecision(Scene scene)
Compute precision of given scene against this one. Precision is the proportion of pieces in given scene which are correct.


computeRecall

public float computeRecall(Scene scene)
Compute recall of given scene against this one. Recall is the proportion of pieces in this scene which have been correctly recalled.


computeErrorsOfOmission

public int computeErrorsOfOmission(Scene scene)
Compute errors of omission of given scene against this one. Omission is the number of pieces which are in this scene but not in the given one.


computeErrorsOfCommission

public int computeErrorsOfCommission(Scene scene)
Compute errors of commission of given scene against this one. Commission is the number of pieces which are in the given scene but not in this one.