phylonet.riatahgt
Class HgtEvent

java.lang.Object
  extended by phylonet.riatahgt.HgtEvent
All Implemented Interfaces:
java.io.Serializable

public class HgtEvent
extends java.lang.Object
implements java.io.Serializable

This class models a single HGT event. An HGT event occurs between two edges in a tree. This is encoded by providing the child of the edge involved in the HGT event. Therefore, if the HGT source was the edge between nodes p->c (where p is the parent and c is the child), then the source will be reported as c. In the notation of this object, source is the node which accepts the node and destination is the donator of the node.

Author:
Derek Ruths, Cuong Than
See Also:
Serialized Form

Constructor Summary
HgtEvent(TNode src, TNode dest)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 TNode getDestEdge()
           
 TNode getSourceEdge()
           
 int hashCode()
           
 boolean isBad()
          If an event is bad, this function returns true.
 boolean isViolated()
          If an event is time-violated, this function returns true.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HgtEvent

public HgtEvent(TNode src,
                TNode dest)
Method Detail

isBad

public boolean isBad()
If an event is bad, this function returns true. See comments for function checkBad for what a bad event is.

Returns:
true if this event is bad.

isViolated

public boolean isViolated()
If an event is time-violated, this function returns true. See comments for function checkViolation for what a violated event is.

Returns:
true if this event is time-violated.

getSourceEdge

public TNode getSourceEdge()

getDestEdge

public TNode getDestEdge()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object