de.upb.swt.mcie.robdds
Class NodePair

java.lang.Object
  extended by de.upb.swt.mcie.robdds.NodePair

 class NodePair
extends java.lang.Object

This class represents a pair of nodes. It is used in the hash table for such pairs of nodes when applying a binary operation BinOp.apply on two ROBDDs.

Author:
Ekkart Kindler, kindler@upb.de

Field Summary
private  ROBDD n1
          The first node of the pair.
private  ROBDD n2
          The second node of the pair.
 
Constructor Summary
NodePair(ROBDD n1, ROBDD n2)
          Constructs a pair of two ROBDD nodes.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks whether this pair node is equal to an other pair.
 int hashCode()
          Returns the hash code of this pair.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n1

private ROBDD n1
The first node of the pair.


n2

private ROBDD n2
The second node of the pair.

Constructor Detail

NodePair

NodePair(ROBDD n1,
         ROBDD n2)
Constructs a pair of two ROBDD nodes.

Parameters:
n1 - first component of the pair
n2 - second component of the pair
Method Detail

hashCode

public int hashCode()
Returns the hash code of this pair. The implementation is necessary for the proper use of pairs with HashMap. It is a very simple minded calculation, which guarantees that the symmetric pair has a different hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code of this pair

equals

public boolean equals(java.lang.Object o)
Checks whether this pair node is equal to an other pair. This method must be implemented in order to guarantee proper operation of the hash tables (see HashMap).

Overrides:
equals in class java.lang.Object
Parameters:
o - object to be compared with
Returns:
true if the object is an identical pair; false otherwise