Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class GlobalDistanceFunctionPatternConstraint<D extends DistanceFunction<?,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.GlobalDistanceFunctionPatternConstraint<D>
All Implemented Interfaces:
Loggable, GlobalParameterConstraint

public class GlobalDistanceFunctionPatternConstraint<D extends DistanceFunction<?,?>>
extends AbstractLoggable
implements GlobalParameterConstraint

Global parameter constraint for testing if a given pattern parameter (PatternParameter) specifies a valid pattern for a given class parameter (ClassParameter) defining a specific distance function.

Author:
Steffi Wanka

Field Summary
private  PatternParameter pattern
          Pattern parameter to be checked for validity.
private  ClassParameter<D> restrictionClass
          Class parameter whose restriction class is used to check the validity of the pattern parameter.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
GlobalDistanceFunctionPatternConstraint(PatternParameter pattern, ClassParameter<D> restrClass)
          Constructs a global parameter constraint for testing if a given pattern parameter is a valid argument for a given distance function of a class parameter.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Tests if the pattern is valid for the distance function defined by the class parameter.
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.logging.Loggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, verbose, verbose, warning
 

Field Detail

restrictionClass

private ClassParameter<D extends DistanceFunction<?,?>> restrictionClass
Class parameter whose restriction class is used to check the validity of the pattern parameter.


pattern

private PatternParameter pattern
Pattern parameter to be checked for validity.

Constructor Detail

GlobalDistanceFunctionPatternConstraint

public GlobalDistanceFunctionPatternConstraint(PatternParameter pattern,
                                               ClassParameter<D> restrClass)
Constructs a global parameter constraint for testing if a given pattern parameter is a valid argument for a given distance function of a class parameter.

Parameters:
pattern - the pattern parameter
restrClass - the class parameter defining a distance function
Method Detail

test

public void test()
          throws ParameterException
Tests if the pattern is valid for the distance function defined by the class parameter. If not so, a parameter exception is thrown.

Specified by:
test in interface GlobalParameterConstraint
Throws:
ParameterException - if the parameters don't satisfy the parameter constraint.
See Also:
GlobalParameterConstraint.test()

getDescription

public String getDescription()
Description copied from interface: GlobalParameterConstraint
Returns a description of this global constraint.

Specified by:
getDescription in interface GlobalParameterConstraint
Returns:
a description of this global constraint
See Also:
GlobalParameterConstraint.getDescription()

Release 0.1 (2008-07-10_1838)