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

package lt.ktu.gmj.methods;

import lt.ktu.gmj.*;

// Referenced classes of package lt.ktu.gmj.methods:
//			MethodBase, RandomPoint

public class Mig1 extends MethodBase
{

	public Mig1()
	{
		super.iterations = 1000;
	}

	public Result run(ResultLogger resultlogger, Task task)
	{
		lt.ktu.gmj.Domain domain = task.domain();
		//Result result = new Result();//neturetu kiek galima padidint reiksmes?
		Result result = null;
		for(int i = 0; i < super.iterations; i++)
		{
			RandomPoint randompoint = new RandomPoint(domain);
			Result result1 = new Result(i, randompoint, task.f(randompoint));
			resultlogger.log(result1);
			if(result == null || result1.value.fx() < result.value.fx())
				result = result1;
		}

		return result;
	}
}
