// 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:   Sinn.java

package lt.ktu.gmj.tasks;

import lt.ktu.gmj.*;
import lt.monarch.function.FunctionParser;
import lt.monarch.function.parser.ParseException;

// Referenced classes of package lt.ktu.gmj.tasks:
//			Sinn

class SinnDomain extends DomainWithConstraint
{

	static final String dimensions[] = {
		"X Sin Argument", "Y Sin Argument", "Dummy"
	};

	SinnDomain()
	{
		super.min[0] = super.min[1] = super.min[2] = -3.1400000000000001D;
		super.max[0] = super.max[1] = super.max[2] = 0.0D;
		super.defaultPoint.x[0] = 0.0D;
		super.defaultPoint.x[1] = 0.0D;
		super.defaultPoint.x[2] = 0.0D;
		StringBuffer signature = new StringBuffer();
		signature.append("(");
		for(int i = 0; i < dimensions().length; i++)
		{
			signature.append(i != 0 ? ", " : "");
			signature.append("x" + (i + 1));
		}

		signature.append(") = 1 - x1 * x1  -  x2 * x2");
		try
		{
			super.constraint[0] = (new FunctionParser()).parseDefinition("c0" + signature.toString());
		}
		catch(ParseException _ex) { }
	}

	void ConcrDomain(double lower, double upper, double def)
	{
		super.min[0] = super.min[1] = super.min[2] = lower;
		super.max[0] = super.max[1] = super.max[2] = upper;
		super.defaultPoint.x[0] = def;
		super.defaultPoint.x[1] = def;
		super.defaultPoint.x[2] = def;
	}

	public String[] dimensions()
	{
		return dimensions;
	}

}
