indicators
Class Indicator
java.lang.Object
indicators.Indicator
- All Implemented Interfaces:
- Serializable, Cloneable, Idempotency, Regularity, Valuation
public class Indicator
- extends Object
- implements Idempotency
Indicator functions are an example of an idempotent valuation algebra and this
class offers a possible implementation of the valuation interface for the case
of indicator functions.
- Version:
- 1.1
- Author:
- Marc Pouly
- See Also:
- Serialized Form
Indicator
public Indicator(BinaryVariable variable,
int[] indicator)
- Constructor:
- Parameters:
variable
- The single variable of this potential.indicator
- The indicator for each possible configuration.
The size of the indicator array must be 2.
Indicator
public Indicator(BinaryVariable[] variables,
int[] indicator)
- Constructor:
- Parameters:
variables
- An array of binary variables.indicator
- An array of indicators.
The size of the indicator array must be 2*variables.length
label
public Domain label()
- Specified by:
label
in interface Valuation
- See Also:
Valuation.label()
combine
public Valuation combine(Valuation val)
- Specified by:
combine
in interface Valuation
- See Also:
Valuation.combine(nenok.va.Valuation)
marginalize
public Valuation marginalize(Domain dom)
throws VAException
- Specified by:
marginalize
in interface Valuation
- Throws:
VAException
- See Also:
Valuation.marginalize(nenok.va.Domain)
weight
public int weight()
- Specified by:
weight
in interface Valuation
- See Also:
Valuation.weight()
inverse
public Regularity inverse()
- Specified by:
inverse
in interface Regularity
- See Also:
Regularity.inverse()
equals
public boolean equals(Object o)
- Equality test:
Inequality is certain. Equality is based on heuristic for performance reasons.
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
displayFullData
public String displayFullData()
- Returns:
- The current indicator function as a string.
Displays all configurations..
displayRelevantData
public String displayRelevantData()
- Returns:
- The current indicator function as a string.
Displays only configurations with indicator == 1.
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()