public class ADMMObjectiveTerm extends Object implements ReasonerTerm
Modifier and Type | Class and Description |
---|---|
static class |
ADMMObjectiveTerm.TermType
The specific type of term represented by this instance.
|
Modifier and Type | Field and Description |
---|---|
protected Rule |
rule |
protected int |
size |
protected ADMMObjectiveTerm.TermType |
termType |
Modifier and Type | Method and Description |
---|---|
void |
adjustConstant(float oldValue,
float newValue)
Adjust the term's internal constant by removing the old value and inserting the new value.
|
static ADMMObjectiveTerm |
createCollectiveDeterTerm(Hyperplane<LocalVariable> hyperplane,
float deterWeight,
float deterConstant) |
static ADMMObjectiveTerm |
createHingeLossTerm(Hyperplane<LocalVariable> hyperplane,
Rule rule) |
static ADMMObjectiveTerm |
createIndependentDeterTerm(Hyperplane<LocalVariable> hyperplane,
float deterWeight,
float deterConstant) |
static ADMMObjectiveTerm |
createLinearConstraintTerm(Hyperplane<LocalVariable> hyperplane,
Rule rule,
FunctionComparator comparator) |
static ADMMObjectiveTerm |
createLinearLossTerm(Hyperplane<LocalVariable> hyperplane,
Rule rule) |
static ADMMObjectiveTerm |
createSquaredHingeLossTerm(Hyperplane<LocalVariable> hyperplane,
Rule rule) |
static ADMMObjectiveTerm |
createSquaredLinearLossTerm(Hyperplane<LocalVariable> hyperplane,
Rule rule) |
float |
evaluate()
Evaluate this potential using the local variables.
|
float |
evaluate(float[] consensusValues)
Evaluate this potential using the given consensus values.
|
LocalVariable[] |
getVariables()
Get the variables used in this term.
|
boolean |
isConstraint() |
boolean |
isConvex() |
void |
minimize(float stepSize,
float[] consensusValues)
Modify the local variables to minimize this term (within the bounds of the step size).
|
int |
size()
Get the number of variables in this term.
|
void |
updateLagrange(float stepSize,
float[] consensusValues) |
protected final ADMMObjectiveTerm.TermType termType
protected final Rule rule
protected int size
public static ADMMObjectiveTerm createLinearConstraintTerm(Hyperplane<LocalVariable> hyperplane, Rule rule, FunctionComparator comparator)
public static ADMMObjectiveTerm createLinearLossTerm(Hyperplane<LocalVariable> hyperplane, Rule rule)
public static ADMMObjectiveTerm createHingeLossTerm(Hyperplane<LocalVariable> hyperplane, Rule rule)
public static ADMMObjectiveTerm createSquaredLinearLossTerm(Hyperplane<LocalVariable> hyperplane, Rule rule)
public static ADMMObjectiveTerm createSquaredHingeLossTerm(Hyperplane<LocalVariable> hyperplane, Rule rule)
public static ADMMObjectiveTerm createCollectiveDeterTerm(Hyperplane<LocalVariable> hyperplane, float deterWeight, float deterConstant)
public static ADMMObjectiveTerm createIndependentDeterTerm(Hyperplane<LocalVariable> hyperplane, float deterWeight, float deterConstant)
public void updateLagrange(float stepSize, float[] consensusValues)
public LocalVariable[] getVariables()
public int size()
size
in interface ReasonerTerm
public void adjustConstant(float oldValue, float newValue)
ReasonerTerm
adjustConstant
in interface ReasonerTerm
public boolean isConstraint()
public boolean isConvex()
isConvex
in interface ReasonerTerm
public void minimize(float stepSize, float[] consensusValues)
public float evaluate()
public float evaluate(float[] consensusValues)
Copyright © 2022 University of California, Santa Cruz. All rights reserved.