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
Version:
0.26 $Rev: 439 $ $Date: 2007-05-05 12:29:50 +0200 (so, 05 V 2007) $ $Author: pepca $
See Also:
MainEval, Ex2005_01_b.java

Field Summary
static String ETALON
          Etalon file-name.
static String INT
          Use integer coordinates?
protected  boolean integer
          Use integer coordinates?
static String REPEAT
          Number of items to draw.
protected  RandomJames rnd
          Pseudo-random generator.
static String SAVE
          Save the result as etalon?
static String SEED1
          Random seed (for RandomJames).
static 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
 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(Map<String,String> env, Map<String,String> param, PrintStream out, SortedSet<cz.cuni.jagrlib.eval.Ex2005_01_bEntry> results)
          Internal test routine.
 void interpretResults(Map<String,String> env, Object results, PrintStream out)
          Interpret the result object.
 boolean runTest(Map<String,String> env, Map<String,String> param, Object results)
          Runs one instance of the test (results are stored in the given result object).
 boolean runTest(Map<String,String> env, Map<String,String> param, 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 String REPEAT
Number of items to draw.

See Also:
Constant Field Values

SEED1

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

See Also:
Constant Field Values

SEED2

public static final String SEED2
See Also:
Constant Field Values

INT

public static final String INT
Use integer coordinates?

See Also:
Constant Field Values

ETALON

public static final String ETALON
Etalon file-name.

See Also:
Constant Field Values

SAVE

public static final 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(Map<String,String> env,
                               Map<String,String> param,
                               PrintStream out,
                               SortedSet<cz.cuni.jagrlib.eval.Ex2005_01_bEntry> results)
Internal test routine.


runTest

public boolean runTest(Map<String,String> env,
                       Map<String,String> param,
                       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 Object createResults()
Create result object (whatever it is).

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

runTest

public boolean runTest(Map<String,String> env,
                       Map<String,String> param,
                       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(Map<String,String> env,
                             Object results,
                             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.