// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) fieldsfirst 
// Source File Name:   Point.java

package lt.ktu.gmj;


// Referenced classes of package lt.ktu.gmj:
//			Domain

public class Point
{

	public double x[];

	public double distance(Point point)
	{
		double d = 0.0D;
		for(int i = 0; i < x.length; i++)
		{
			double d1 = x[i] - point.x[i];
			d += d1 * d1;
		}

		return Math.sqrt(d);
	}

	public double norma()
	{
		double d = 0.0D;
		for(int i = 0; i < x.length; i++)
			d += x[i] * x[i];

		return Math.sqrt(d);
	}

	public Point(Domain domain)
	{
		x = new double[domain.dimensions().length];
	}

	public Point(Point point)
	{
		x = new double[point.x.length];
		System.arraycopy(point.x, 0, x, 0, x.length);
	}
}
