Skip to content

Commit 9b378ee

Browse files
author
phishman3579
committed
Added QuadTree to repo
git-svn-id: https://java-algorithms-implementation.googlecode.com/svn/trunk@387 032fbc0f-8cab-eb90-e552-f08422b9a96a
1 parent 6618291 commit 9b378ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/com/jwetherell/algorithms/data_structures/QuadTree.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ public String toString() {
255255
StringBuilder builder = new StringBuilder();
256256
builder.append("(");
257257
builder.append(upperLeft.toString()).append(", ");
258-
builder.append("height").append(" = ").append(height).append(", ");
259-
builder.append("width").append(" = ").append(width);
258+
builder.append("height").append("=").append(height).append(", ");
259+
builder.append("width").append("=").append(width);
260260
builder.append(")");
261261
return builder.toString();
262262
}
263263
}
264264

265265
public static class XYPoint implements Comparable<XYPoint> {
266266

267-
private double x = Double.NEGATIVE_INFINITY;
268-
private double y = Double.NEGATIVE_INFINITY;
267+
public double x = Double.NEGATIVE_INFINITY;
268+
public double y = Double.NEGATIVE_INFINITY;
269269

270270
public XYPoint(double x, double y) {
271271
this.x = x;
@@ -352,7 +352,7 @@ public static <T extends XYPoint> String getString(QuadTree<T> tree) {
352352
private static <T extends Comparable<T>> String getString(QuadNode node, String prefix, boolean isTail) {
353353
StringBuilder builder = new StringBuilder();
354354

355-
builder.append(prefix + (isTail ? "└── " : "├── ") + " node=" + node.toString() + "\n");
355+
builder.append(prefix + (isTail ? "└── " : "├── ") + " node={" + node.toString() + "}\n");
356356
List<QuadNode> children = null;
357357
if (node.northWest != null || node.northEast != null || node.southWest != null || node.southEast != null) {
358358
children = new ArrayList<QuadNode>(4);

0 commit comments

Comments
 (0)