org.hd.d.pg2k.ai.scorer
Class AbstractNonParamScorer

java.lang.Object
  extended by org.hd.d.pg2k.ai.scorer.AbstractScorer
      extended by org.hd.d.pg2k.ai.scorer.AbstractNonParamScorer
All Implemented Interfaces:
ScorerIF
Direct Known Subclasses:
MaxScore, MinScore, NoConfidence, RandomPositiveScore, RandomScore, ZeroScore

public abstract class AbstractNonParamScorer
extends AbstractScorer

Simple abstract super class for some non-parameterised Scorers. Prevents creation of parameterised instances.

Author:
dhd

Field Summary
 
Fields inherited from class org.hd.d.pg2k.ai.scorer.AbstractScorer
nameAndParameters, parameterNameRegex, parameterSepRegex, scorerNameRegex, SEPARATOR
 
Constructor Summary
protected AbstractNonParamScorer()
          Default constructor uses class-based name and allows no parameterisation.
protected AbstractNonParamScorer(java.lang.String nameAndParameters)
          Construct instance with name and optional parameters.
protected AbstractNonParamScorer(java.lang.String baseName, java.util.List<ScorerParam> parameters)
          Construct instance with name and optional parameters.
 
Method Summary
 ScorerIF createVariant(java.lang.String nameAndParameters)
          Insists that the name is the default non-parameterised name, and returns the original.
 ScorerIF createVariant(java.lang.String baseName, java.util.List<ScorerParam> parameters)
          Insists that the base name is correct, and that there are no parameters, and returns the original.
 
Methods inherited from class org.hd.d.pg2k.ai.scorer.AbstractScorer
canonicalise, createPerturbedVariant, getBaseName, getDefaultName, getNameAndParameters, getParameterDefsAndValues, getPerturbedDefsAndValues, isValidParameterName, isValidScorerName, paramListAsMap, paramListAsString, parseNameAndParameters, similarNParams, verySimilar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hd.d.pg2k.ai.scorer.ScorerIF
computeScoreAndConfidence
 

Constructor Detail

AbstractNonParamScorer

protected AbstractNonParamScorer()
Default constructor uses class-based name and allows no parameterisation.


AbstractNonParamScorer

protected AbstractNonParamScorer(java.lang.String nameAndParameters)
                          throws java.lang.IllegalArgumentException
Construct instance with name and optional parameters. Insists on the parameter being exactly the default (non-parameterised) name.

Throws:
java.lang.IllegalArgumentException - if parameter is wrong

AbstractNonParamScorer

protected AbstractNonParamScorer(java.lang.String baseName,
                                 java.util.List<ScorerParam> parameters)
                          throws java.lang.IllegalArgumentException
Construct instance with name and optional parameters. Insists on the parameter being exactly the default (non-parameterised) name.

Throws:
java.lang.IllegalArgumentException - if parameter is wrong
Method Detail

createVariant

public ScorerIF createVariant(java.lang.String nameAndParameters)
                       throws java.lang.IllegalArgumentException
Insists that the name is the default non-parameterised name, and returns the original.

Throws:
java.lang.IllegalArgumentException - for unparsable or inappropriate input

createVariant

public ScorerIF createVariant(java.lang.String baseName,
                              java.util.List<ScorerParam> parameters)
                       throws java.lang.IllegalArgumentException
Insists that the base name is correct, and that there are no parameters, and returns the original.

Throws:
java.lang.IllegalArgumentException - for unparsable or inappropriate input

DHD Multimedia Gallery V1.50.55

Copyright (c) 1996-2008, Damon Hart-Davis. All rights reserved.