cz.cuni.jagrlib.eval
Class Ex2005_01_b

java.lang.Object
  extended by cz.cuni.jagrlib.eval.DefaultPlugin
      extended by cz.cuni.jagrlib.eval.Ex2005_01_b
All Implemented Interfaces:
EvalPlugin

public class Ex2005_01_b
extends DefaultPlugin

Evaluation plugin for MainEval: exercise 01, comparison with exact drawing.

Since:
0.24
See Also:
MainEval, Ex2005_01_b.java

Field Summary
static java.lang.String ETALON
          Etalon file-name.
static java.lang.String INT
          Use integer coordinates?
protected  boolean integer
          Use integer coordinates?
static java.lang.String REPEAT
          Number of items to draw.
protected  RandomJames rnd
          Pseudo-random generator.
static java.lang.String SAVE
          Save the result as etalon?
static java.lang.String SEED1
          Random seed (for RandomJames).
static java.lang.String SEED2
           
 
Fields inherited from class cz.cuni.jagrlib.eval.DefaultPlugin
HTML
 
Fields inherited from interface cz.cuni.jagrlib.eval.EvalPlugin
BASE, CLASS_NAME, OUTPUT_FILE_NAME
 
Constructor Summary
Ex2005_01_b()
           
 
Method Summary
 java.lang.Object createResults()
          Create result object (whatever it is).
protected  void generate(double[] p, int line)
          Generates one random point on the given line.
protected  boolean internalTest(java.util.Map<java.lang.String,java.lang.String> env, java.util.Map<java.lang.String,java.lang.String> param, java.io.PrintStream out, java.util.SortedSet<cz.cuni.jagrlib.eval.Ex2005_01_bEntry> results)
          Internal test routine.
 void interpretResults(java.util.Map<java.lang.String,java.lang.String> env, java.lang.Object results, java.io.PrintStream out)
          Interpret the result object.
 boolean runTest(java.util.Map<java.lang.String,java.lang.String> env, java.util.Map<java.lang.String,java.lang.String> param, java.lang.Object results)
          Runs one instance of the test (results are stored in the given result object).
 boolean runTest(java.util.Map<java.lang.String,java.lang.String> env, java.util.Map<java.lang.String,java.lang.String> param, java.io.PrintStream out)
          Runs one instance of the test (simple variant, w/o global result storage).
 
Methods inherited from class cz.cuni.jagrlib.eval.DefaultPlugin
booleanParam, doubleParam, integerParam, stringParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPEAT

public static final java.lang.String REPEAT
Number of items to draw.

See Also:
Constant Field Values

SEED1

public static final java.lang.String SEED1
Random seed (for RandomJames).

See Also:
Constant Field Values

SEED2

public static final java.lang.String SEED2
See Also:
Constant Field Values

INT

public static final java.lang.String INT
Use integer coordinates?

See Also:
Constant Field Values

ETALON

public static final java.lang.String ETALON
Etalon file-name.

See Also:
Constant Field Values

SAVE

public static final java.lang.String SAVE
Save the result as etalon?

See Also:
Constant Field Values

integer

protected boolean integer
Use integer coordinates?


rnd

protected RandomJames rnd
Pseudo-random generator.

Constructor Detail

Ex2005_01_b

public Ex2005_01_b()
Method Detail

generate

protected void generate(double[] p,
                        int line)
Generates one random point on the given line.


internalTest

protected boolean internalTest(java.util.Map<java.lang.String,java.lang.String> env,
                               java.util.Map<java.lang.String,java.lang.String> param,
                               java.io.PrintStream out,
                               java.util.SortedSet<cz.cuni.jagrlib.eval.Ex2005_01_bEntry> results)
Internal test routine.


runTest

public boolean runTest(java.util.Map<java.lang.String,java.lang.String> env,
                       java.util.Map<java.lang.String,java.lang.String> param,
                       java.io.PrintStream out)
Runs one instance of the test (simple variant, w/o global result storage).

Specified by:
runTest in interface EvalPlugin
Overrides:
runTest in class DefaultPlugin
Parameters:
env - Environment map (global params).
param - Individual params.
out - Text stream for output messages.
Returns:
True if test was successful, false in case of fatal error (instantiation, e.g.).

createResults

public java.lang.Object createResults()
Create result object (whatever it is).

Specified by:
createResults in interface EvalPlugin
Overrides:
createResults in class DefaultPlugin

runTest

public boolean runTest(java.util.Map<java.lang.String,java.lang.String> env,
                       java.util.Map<java.lang.String,java.lang.String> param,
                       java.lang.Object results)
Runs one instance of the test (results are stored in the given result object).

Specified by:
runTest in interface EvalPlugin
Overrides:
runTest in class DefaultPlugin
Parameters:
env - Environment map (global params).
param - Individual params.
results - Object for collecting results.
Returns:
True if another test instance sould be eecuted, false in case of fatal error.

interpretResults

public void interpretResults(java.util.Map<java.lang.String,java.lang.String> env,
                             java.lang.Object results,
                             java.io.PrintStream out)
Interpret the result object.

Specified by:
interpretResults in interface EvalPlugin
Overrides:
interpretResults in class DefaultPlugin
Parameters:
env - Environment map (global params).
results - Object with collected results.
out - Text stream for output messages.