|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalgs.model.interval.SegmentTreeNode
algs.model.interval.StoredIntervalsNode
public class StoredIntervalsNode
When a Segment Tree uses StoredIntervalsNode as the base node type, then a reference to the actual Intervals is stored (in no specific order) with each node in the tree.
| Field Summary | |
|---|---|
static IConstructor |
constructor
Constructor to use with this node type. |
protected java.util.ArrayList<IInterval> |
intervals
Store Interval. |
| Constructor Summary | |
|---|---|
StoredIntervalsNode(int left,
int right)
Store additional information with each SegmentTreeNode |
|
| Method Summary | |
|---|---|
protected void |
dispose(IInterval interval)
Algorithms over SegmentTrees often store additional information with each node, and may wish to clear information and/or perform computations when a segment is deleted. |
boolean |
equals(java.lang.Object interval)
Determine the matching test. |
java.util.Collection<IInterval> |
gather(IInterval target)
Gather the set of stored intervals that are in common with the given target interval. |
java.util.Collection<IInterval> |
intervals()
Return all IInterval objects for this node as a collection. |
java.lang.String |
toString()
Reasonable extension to toString() method. |
protected void |
update(IInterval interval)
Algorithms over SegmentTrees often store additional information with each node, and may perform complex computations on insert. |
| Methods inherited from class algs.model.interval.SegmentTreeNode |
|---|
checkInterval, checkInterval, getCount, getLeft, getLeftSon, getNode, getRight, getRightSon, insert, intersects, remove, toTheLeft, toTheRight |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<IInterval> intervals
public static final IConstructor constructor
| Constructor Detail |
|---|
public StoredIntervalsNode(int left,
int right)
left - right - | Method Detail |
|---|
protected void update(IInterval interval)
Just append to the end.
update in class SegmentTreeNodeinterval - interval segment being updated.public boolean equals(java.lang.Object interval)
equals in class SegmentTreeNodeinterval - the interval with whom we wish to match Test.public java.util.Collection<IInterval> gather(IInterval target)
java.lang.IllegalArgumentException - if target is ill-formed.protected void dispose(IInterval interval)
dispose in class SegmentTreeNodeinterval - interval segment being disposed of.public java.util.Collection<IInterval> intervals()
IInterval objects for this node as a collection.
Collection of IInterval objects stored for this node.public java.lang.String toString()
toString in class SegmentTreeNode
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||