viper.comparison
Class ObjectEvaluation

java.lang.Object
  extended byviper.comparison.ObjectEvaluation
All Implemented Interfaces:
Evaluation

public class ObjectEvaluation
extends java.lang.Object
implements Evaluation

The standard evaluation that counts the number of matching descriptors.


Nested Class Summary
 
Nested classes inherited from class viper.comparison.Evaluation
Evaluation.Information
 
Constructor Summary
ObjectEvaluation(EvaluationParameters epf, int level, int targetMatch)
          Creates a new instance of ObjectEvaluation
 
Method Summary
 java.util.Map getMeasureMap()
          Return a map of DescPrototypes to their evaluations.
 java.lang.String getName()
          Gets the name of the evalutation type.
 java.io.PrintWriter getOutput()
          Gets the human readable output stream.
 int getTickerSize()
          Get an estimate on how long it will take to perform the evaluation.
 boolean isPrintingHeaders()
          Tests to see if the header and footer should be printed out.
 void parseEvaluation(VReader reader, DescriptorConfigs dcfgs)
          Parse the vreader section.
 Evaluation.Information printEvaluation()
          Print out the results of this evaluation.
 void printFooter(Evaluation.Information total)
          Prints the footer information, including overall scores.
 void printHeader()
          Prints the header information, usually about what metrics and rules were used in the evaluation.
 void printMetricsTo(java.io.PrintWriter output)
          Print out information about evaluation
 void printRawMetricsTo(java.io.PrintWriter raw)
          Print evaluation info in terse format
 void setMatrix(CompMatrix cm)
          Sets the matrix to evaluate.
 void setOutput(java.io.PrintWriter output)
          Sets where human-readable information should be printed.
 void setPrintingHeaders(boolean on)
          Set to print headers or not.
 void setRaw(java.io.PrintWriter raw)
          Sets the machine readable raw output stream.
 void setTicker(Revealer ticker)
          Sets the ui for progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectEvaluation

public ObjectEvaluation(EvaluationParameters epf,
                        int level,
                        int targetMatch)
Creates a new instance of ObjectEvaluation

Parameters:
epf - the evaluation paramters
level - the level to bring the evaluation to
targetMatch - the target match filter type, eg MULTIPLE
Method Detail

printMetricsTo

public void printMetricsTo(java.io.PrintWriter output)
Description copied from interface: Evaluation
Print out information about evaluation

Specified by:
printMetricsTo in interface Evaluation
Parameters:
output - the output stream

printRawMetricsTo

public final void printRawMetricsTo(java.io.PrintWriter raw)
Description copied from interface: Evaluation
Print evaluation info in terse format

Specified by:
printRawMetricsTo in interface Evaluation
Parameters:
raw - the raw stream

parseEvaluation

public void parseEvaluation(VReader reader,
                            DescriptorConfigs dcfgs)
                     throws java.io.IOException
Description copied from interface: Evaluation
Parse the vreader section.

Specified by:
parseEvaluation in interface Evaluation
Parameters:
reader - VReader, already pointing at the begin evaluation directive.
dcfgs - the target data - the evaluation uses the target names
Throws:
java.io.IOException
See Also:
Evaluation.parseEvaluation(VReader, DescriptorConfigs)

getOutput

public java.io.PrintWriter getOutput()
Description copied from interface: Evaluation
Gets the human readable output stream.

Specified by:
getOutput in interface Evaluation
Returns:
the human readable output stream

getTickerSize

public int getTickerSize()
Get an estimate on how long it will take to perform the evaluation. printEvaluation should call revealer.tick() exactly this many times.

Specified by:
getTickerSize in interface Evaluation
Returns:
the ticker length

isPrintingHeaders

public boolean isPrintingHeaders()
Description copied from interface: Evaluation
Tests to see if the header and footer should be printed out.

Specified by:
isPrintingHeaders in interface Evaluation
Returns:
if the header and footer should be printed

printEvaluation

public Evaluation.Information printEvaluation()
Print out the results of this evaluation. Since the evaluation operates on a CompMatrix level, the Evaluation.Information being passed back allows totals to be printed out at the end.

Specified by:
printEvaluation in interface Evaluation
Returns:
the evaluation information
See Also:
Evaluation.printEvaluation()

printFooter

public void printFooter(Evaluation.Information total)
Description copied from interface: Evaluation
Prints the footer information, including overall scores.

Specified by:
printFooter in interface Evaluation
Parameters:
total - the total

printHeader

public void printHeader()
Description copied from interface: Evaluation
Prints the header information, usually about what metrics and rules were used in the evaluation.

Specified by:
printHeader in interface Evaluation

setMatrix

public void setMatrix(CompMatrix cm)
Description copied from interface: Evaluation
Sets the matrix to evaluate.

Specified by:
setMatrix in interface Evaluation
Parameters:
cm - the matrix to evaluate

setOutput

public void setOutput(java.io.PrintWriter output)
Description copied from interface: Evaluation
Sets where human-readable information should be printed.

Specified by:
setOutput in interface Evaluation
Parameters:
output - the human readable output stream

setPrintingHeaders

public void setPrintingHeaders(boolean on)
Description copied from interface: Evaluation
Set to print headers or not.

Specified by:
setPrintingHeaders in interface Evaluation
Parameters:
on - true to print headers

setRaw

public void setRaw(java.io.PrintWriter raw)
Description copied from interface: Evaluation
Sets the machine readable raw output stream.

Specified by:
setRaw in interface Evaluation
Parameters:
raw - the machine readable stream

setTicker

public void setTicker(Revealer ticker)
Description copied from interface: Evaluation
Sets the ui for progress

Specified by:
setTicker in interface Evaluation
Parameters:
ticker - the progress ui

getMeasureMap

public java.util.Map getMeasureMap()
Return a map of DescPrototypes to their evaluations.

Specified by:
getMeasureMap in interface Evaluation
Returns:
a map of DescPrototypes to their evaluations
See Also:
Evaluation.getMeasureMap()

getName

public java.lang.String getName()
Description copied from interface: Evaluation
Gets the name of the evalutation type.

Specified by:
getName in interface Evaluation
Returns:
Object Evaluation