nenok.va
Class Identity

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

public final class Identity
extends Object
implements 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. Since identity elements are unique, the constructor's visibility is set to private and the single instance is avaiable through the constant Identity.INSTANCE.

Version:
$LastChangedRevision: 559 $
$LastChangedDate: 2008-03-26 14:25:18 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly
See Also:
Serialized Form

Nested Class Summary
 
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.
 Separativity inverse()
          Returns an inverse element for the current valuation.
 Domain label()
           
 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()
          Weight function:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

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

Method Detail

weight

public int weight()
Description copied from interface: Valuation
Weight function:

Specified by:
weight in interface Valuation
Returns:
The valuation's weight.
See Also:
Valuation.weight()

label

public Domain label()
Specified by:
label in interface Labeled
Returns:
The domain of this object.
See Also:
Labeled.label()

combine

public Valuation combine(Valuation val)
Description copied from interface: Valuation
Combination of valuations.

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. Throwing this exception is the recommended way to implement partial marginalization.
See Also:
Valuation.marginalize(nenok.va.Domain)

toString

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

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 Separativity inverse()
Description copied from interface: Separativity
Returns an inverse element for the current valuation.

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