public abstract class ParameterizedConstraint extends Classifier
FirstOrderConstraint.
ParameterizedConstraints are also Boolean Classifiers.
ParameterizedConstraint depends on extending classes to override the
discreteValue(Object) method so that it returns "true" or
"false" as appropriate. When this is done, there is no need to override the
classify(Object) method.
containingPackage, name| Constructor and Description |
|---|
ParameterizedConstraint()
Default constructor.
|
ParameterizedConstraint(String n)
Initializes the name.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
allowableValues()
Returns the array of allowable values that a feature returned by this classifier may take.
|
FeatureVector |
classify(Object o)
This method makes one or more decisions about a single object, returning those decisions as
Features in a vector. |
Feature |
featureValue(Object o)
Returns the classification of the given example object as a single feature instead of a
FeatureVector. |
abstract FirstOrderConstraint |
makeConstraint(Object o)
This method builds a first order constraint based on the given input object.
|
short |
shortValue(Object o)
Returns the prediction of this classifier as a
short that acts as a pointer into
DiscreteFeature.BooleanValues. |
classify, clone, discreteValue, discreteValueArray, getCompositeChildren, getInputType, getOutputType, realValue, realValueArray, test, toString, valueIndexOfpublic ParameterizedConstraint()
public ParameterizedConstraint(String n)
n - The name of this constraint.public FeatureVector classify(Object o)
Features in a vector.classify in class Classifiero - The object to make decisions about.Features about the input object.public Feature featureValue(Object o)
FeatureVector.featureValue in class Classifiero - The object to classify.o as a feature.public short shortValue(Object o)
short that acts as a pointer into
DiscreteFeature.BooleanValues.o - The object to classify.o as a short.public String[] allowableValues()
allowableValues in class Classifierpublic abstract FirstOrderConstraint makeConstraint(Object o)
o - The object to build a constraint with respect to.Copyright © 2016. All rights reserved.