nenok.va
Class Identity

java.lang.Object
  extended by nenok.va.Identity
All Implemented Interfaces:
Serializable, Cloneable, Idempotency, Regularity, Scalability, Valuation

public final class Identity
extends Object
implements Scalability, Idempotency

This implementation of the valuation interface represents an identity element in a valuation algebra. It has been shown that all valuation algebras can artificially be extended to have such an identity element.

Node, that identity elements are not weight predictable - they can be embedded in a weight predictable valuation algebra and inherit the weight predictor of the corresponding implementation.

Version:
1.3
Author:
Marc Pouly
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface nenok.va.Scalability
Scalability.Implementor
 
Nested classes/interfaces inherited from interface nenok.va.Idempotency
Idempotency.Implementor
 
Field Summary
static Identity INSTANCE
          Unique instance of an identity element.
 
Method Summary
 Valuation combine(Valuation val)
          Combination of valuations.
 String displayText()
           
 boolean equals(Object o)
           
 Regularity inverse()
          Returns an inverse element for the current valuation.
 Domain label()
          Labeling of a valuation.
 Valuation marginalize(Domain dom)
          The marginalization to the empty set is the only possible marginalization for identity elements.
 Scalability scale()
          Scales the current valuation.
 String toString()
           
 int weight()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final Identity INSTANCE
Unique instance of an identity element.

Method Detail

label

public Domain label()
Description copied from interface: Valuation
Labeling of a valuation.

Specified by:
label in interface Valuation
Returns:
The domain of the valuation
See Also:
Valuation.label()

combine

public Valuation combine(Valuation val)
Description copied from interface: Valuation
Combination of valuations. Note that the method's argument is declared to be final to prevent modifications on this object.

Specified by:
combine in interface Valuation
Parameters:
val - The second valuation involved in the combination.
Returns:
The combination of this and val.
See Also:
Valuation.combine(nenok.va.Valuation)

marginalize

public Valuation marginalize(Domain dom)
                      throws VAException
The marginalization to the empty set is the only possible marginalization for identity elements.

Specified by:
marginalize in interface Valuation
Parameters:
dom - The domain onto this valuation is marginalized.
Returns:
The marginalization of this to dom.
Throws:
VAException - Exception occuring when a marginalization is performed onto an illegal domain.
See Also:
Valuation.marginalize(nenok.va.Domain)

weight

public int weight()
Specified by:
weight in interface Valuation
Returns:
The wieght of the current valuation.
See Also:
Valuation.weight()

displayText

public String displayText()
Returns:
The string representation of identity elements.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

scale

public Scalability scale()
Description copied from interface: Scalability
Scales the current valuation.

Specified by:
scale in interface Scalability
Returns:
The scaled version of this valuation.
See Also:
Scalability.scale()

inverse

public Regularity inverse()
Description copied from interface: Regularity
Returns an inverse element for the current valuation.

Specified by:
inverse in interface Regularity
Returns:
The inverse valuation of the given domain.
See Also:
Regularity.inverse()