public AStarNode removeMin() {
		final AStarNode z = this.min;
		if (z != null) {
			int i = z.degree;
			AStarNode x = z.child;
			while (i > 0) {
				final AStarNode nextChild = x.right;
				x.left.right = x.right;
				x.right.left = x.left;
				x.left = this.min;
				x.right = this.min.right;
				this.min.right = x;
				x.right.left = x;
				x.parent = null;
				x = nextChild;
				--i;
			}
			z.left.right = z.right;
			z.right.left = z.left;
			if (z == z.right) {
				this.min = null;
			} else {
				this.min = z.right;
				consolidate();
			}
			--this.n;
		}
		return z;
	}