public abstract class HyperplaneTermGenerator<T extends ReasonerTerm,V extends ReasonerLocalVariable> extends Object implements TermGenerator<T,V>
Constructor and Description |
---|
HyperplaneTermGenerator() |
Modifier and Type | Method and Description |
---|---|
abstract T |
createLinearConstraintTerm(TermStore<T,V> termStore,
GroundRule groundRule,
Hyperplane<V> hyperplane,
FunctionComparator comparator)
Create a hard constraint term,
|
abstract T |
createLossTerm(TermStore<T,V> termStore,
boolean isHinge,
boolean isSquared,
GroundRule groundRule,
Hyperplane<V> hyperplane)
Create a term from a ground rule and hyperplane.
|
T |
createTerm(GroundRule groundRule,
TermStore<T,V> termStore)
Create a ReasonerTerm from the ground rule.
|
int |
generateTerms(GroundRuleStore ruleStore,
TermStore<T,V> termStore)
Use the ground rules in |ruleStore| to generate optimization terms and populate |termStore|.
|
abstract Class<V> |
getLocalVariableType()
Get the class object for the local vairable type.
|
public int generateTerms(GroundRuleStore ruleStore, TermStore<T,V> termStore)
TermGenerator
generateTerms
in interface TermGenerator<T extends ReasonerTerm,V extends ReasonerLocalVariable>
public T createTerm(GroundRule groundRule, TermStore<T,V> termStore)
public abstract Class<V> getLocalVariableType()
public abstract T createLossTerm(TermStore<T,V> termStore, boolean isHinge, boolean isSquared, GroundRule groundRule, Hyperplane<V> hyperplane)
public abstract T createLinearConstraintTerm(TermStore<T,V> termStore, GroundRule groundRule, Hyperplane<V> hyperplane, FunctionComparator comparator)
Copyright © 2020 University of California, Santa Cruz. All rights reserved.