<commit_before>/**
 *
 */
package org.jmist.toolkit;

/**
 * A location in three dimensional space.
 * This class is immutable.
 * @author brad
 */
public final class Point3 {

	/**
	 * Initializes the components for the point.
	 * @param x The distance from the origin along the x axis.
	 * @param y The distance from the origin along the y axis.
	 * @param z The distance from the origin along the z axis.
	 */
	public Point3(double x, double y, double z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}

	/**
	 * Gets the distance from the origin along the x-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.I);}
	 * @return The distance from the origin along the x-axis.
	 * @see getX, I, dot
	 */
	public double x() {
		return x;
	}

	/**
	 * Gets the distance from the origin along the y-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.J);}
	 * @return The distance from the origin along the y-axis.
	 * @see getY, J, dot
	 */
	public double y() {
		return y;
	}

	/**
	 * Gets the distance from the origin along the z-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.K);}
	 * @return The distance from the origin along the z-axis.
	 * @see getZ, K, dot
	 */
	public double z() {
		return z;
	}

	/**
	 * Gets the distance from the origin along the x-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.I);}
	 * @return The distance from the origin along the x-axis.
	 * @see x, I, dot
	 */
	public double getX() {
		return x;
	}

	/**
	 * Gets the distance from the origin along the y-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.J);}
	 * @return The distance from the origin along the y-axis.
	 * @see y, J, dot
	 */
	public double getY() {
		return y;
	}

	/**
	 * Gets the distance from the origin along the z-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.K);}
	 * @return The distance from the origin along the z-axis.
	 * @see z, K, dot
	 */
	public double getZ() {
		return z;
	}

	/**
	 * Computes the square of the distance from this point to the
	 * specified point.
	 * @param p The point to compute the square of the distance to.
	 * @return The square of the distance between this point and
	 * the specified point.
	 */
	public double squaredDistanceTo(Point3 p) {
		return ((x - p.x) * (x - p.x)) + ((y - p.y) * (y - p.y)) + ((z - p.z) * (z - p.z));
	}

	/**
	 * Computes the distance between this point and the specified point.
	 * @param p The point to compute the distance to.
	 * @return The distance between this point and p.
	 */
	public double distanceTo(Point3 p) {
		return Math.sqrt(squaredDistanceTo(p));
	}

	/**
	 * Computes the vector from this point to the specified point.<commit_msg>Made links from cross references in Point3.<commit_after>/**
 *
 */
package org.jmist.toolkit;

/**
 * A location in three dimensional space.
 * This class is immutable.
 * @author brad
 */
public final class Point3 {

	/**
	 * Initializes the components for the point.
	 * @param x The distance from the origin along the x axis.
	 * @param y The distance from the origin along the y axis.
	 * @param z The distance from the origin along the z axis.
	 */
	public Point3(double x, double y, double z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}

	/**
	 * Gets the distance from the origin along the x-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.I);}
	 * @return The distance from the origin along the x-axis.
	 * @see {@link #getX()}, {@link Vector3#I},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double x() {
		return x;
	}

	/**
	 * Gets the distance from the origin along the y-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.J);}
	 * @return The distance from the origin along the y-axis.
	 * @see {@link #getY()}, {@link Vector3#J},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double y() {
		return y;
	}

	/**
	 * Gets the distance from the origin along the z-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.K);}
	 * @return The distance from the origin along the z-axis.
	 * @see {@link #getZ()}, {@link Vector3#K},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double z() {
		return z;
	}

	/**
	 * Gets the distance from the origin along the x-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.I);}
	 * @return The distance from the origin along the x-axis.
	 * @see {@link #x()}, {@link Vector3#I},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double getX() {
		return x;
	}

	/**
	 * Gets the distance from the origin along the y-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.J);}
	 * @return The distance from the origin along the y-axis.
	 * @see {@link #y()}, {@link Vector3#J},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double getY() {
		return y;
	}

	/**
	 * Gets the distance from the origin along the z-axis.
	 * Equivalent to {@code this.minus(Point3.ORIGIN).dot(Vector3.K);}
	 * @return The distance from the origin along the z-axis.
	 * @see {@link #z()}, {@link Vector3#K},
	 * 		{@link Vector3#dot(Vector3)}.
	 */
	public double getZ() {
		return z;
	}

	/**
	 * Computes the square of the distance from this point to the
	 * specified point.
	 * @param p The point to compute the square of the distance to.
	 * @return The square of the distance between this point and
	 * the specified point.
	 */
	public double squaredDistanceTo(Point3 p) {
		return ((x - p.x) * (x - p.x)) + ((y - p.y) * (y - p.y)) + ((z - p.z) * (z - p.z));
	}

	/**
	 * Computes the distance between this point and the specified point.
	 * @param p The point to compute the distance to.
	 * @return The distance between this point and p.
	 */
	public double distanceTo(Point3 p) {
		return Math.sqrt(squaredDistanceTo(p));
	}

	/**
	 * Computes the vector from this point to the specified point.
{'fraction_non_alphanumeric': 0.13500170241743276, 'fraction_numerical': 0.008682328907048007, 'mean_word_length': 2.9588948787061993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6254704', 'n_tokens_mistral': 2076, 'n_tokens_neox': 1920, 'n_words': 733}