|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.cs.algs4.growingtree.experiments.RotationHeightLogger<P>
public class RotationHeightLogger<P extends NodeProperties>
Field Summary |
---|
Fields inherited from interface edu.princeton.cs.algs4.growingtree.experiments.IExperimentLogger |
---|
HEIGHT_UPDATE, SIZE_UPDATE |
Constructor Summary | |
---|---|
RotationHeightLogger()
|
Method Summary | |
---|---|
void |
logDeletion(ShadowNode<P> n)
Called on IDeletingNode.predecessorHibbardDelete
and IDeletingNode.successorHibbardDelete PRIOR
to the actual deletion. |
void |
logInsertion(ShadowNode<P> n)
Called on IInsertNode.insertLeft
and IInsertNode.insertRight |
void |
logOther(IAlgorithmNode<P> n,
int eventId)
Catch-all logging function for anything missed by the others. |
void |
logRotation(ShadowNode<P> n)
Called on IAlgorithmNode.rotateLeft
and IAlgorithmNode.rotateRight PRIOR
to the actual rotation. |
void |
logSearchHit(ShadowNode<P> n)
Called on ISearchingNode.markFound |
void |
printCounts()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RotationHeightLogger()
Method Detail |
---|
public void printCounts()
public void logDeletion(ShadowNode<P> n)
IExperimentLogger
IDeletingNode.predecessorHibbardDelete
and IDeletingNode.successorHibbardDelete
PRIOR
to the actual deletion.
logDeletion
in interface IExperimentLogger<P extends NodeProperties>
n
- Node being deletedpublic void logInsertion(ShadowNode<P> n)
IExperimentLogger
IInsertNode.insertLeft
and IInsertNode.insertRight
logInsertion
in interface IExperimentLogger<P extends NodeProperties>
n
- Node that was just insertedpublic void logRotation(ShadowNode<P> n)
IExperimentLogger
IAlgorithmNode.rotateLeft
and IAlgorithmNode.rotateRight
PRIOR
to the actual rotation.
logRotation
in interface IExperimentLogger<P extends NodeProperties>
n
- Node is being rotated down the treepublic void logSearchHit(ShadowNode<P> n)
IExperimentLogger
ISearchingNode.markFound
logSearchHit
in interface IExperimentLogger<P extends NodeProperties>
n
- Node that has been foundpublic void logOther(IAlgorithmNode<P> n, int eventId)
IExperimentLogger
logOther
in interface IExperimentLogger<P extends NodeProperties>
n
- Node being loggedeventId
- Used to identify the event this call represents
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |