Lines Matching refs:depth
43 * Rebalance a rope if the depth has exceeded MAX_ROPE_DEPTH. If the
44 * rope depth is less than MAX_ROPE_DEPTH or if the rope is of unknown
50 if (r instanceof AbstractRope && ((AbstractRope) r).depth() > RopeUtilities.MAX_ROPE_DEPTH) {
102 * Returns the depth of the specified rope.
104 * @return the depth of the specified rope.
106 byte depth(final Rope r) {
108 return ((AbstractRope)r).depth();
115 final byte depth = this.depth(r);
116 if (depth >= RopeUtilities.FIBONACCI.length - 2)
118 return (RopeUtilities.FIBONACCI[depth + 2] <= r.length());
130 // begin a depth first loop.
195 private void visualize(final Rope r, final PrintStream out, final int depth) {
197 out.print(RopeUtilities.SPACES.substring(0,depth*2));
201 out.print(RopeUtilities.SPACES.substring(0,depth*2));
203 this.visualize(((SubstringRope)r).getRope(), out, depth+1);
206 out.print(RopeUtilities.SPACES.substring(0,depth*2));
208 this.visualize(((ConcatenationRope)r).getLeft(), out, depth+1);
209 out.print(RopeUtilities.SPACES.substring(0,depth*2));
211 this.visualize(((ConcatenationRope)r).getRight(), out, depth+1);