samer@0: /* samer@0: * Copyright (c) 2000, Samer Abdallah, King's College London. samer@0: * All rights reserved. samer@0: * samer@0: * This software is provided AS iS and WITHOUT ANY WARRANTY; samer@0: * without even the implied warranty of MERCHANTABILITY or samer@0: * FITNESS FOR A PARTICULAR PURPOSE. samer@0: */ samer@0: samer@0: package samer.maths.opt; samer@0: samer@0: /** samer@0: This is a function interface that is designed samer@0: to allow efficient implementations of minimisation samer@0: algorithms by recognising the fact that the samer@0: function and its gradient may be repeatedly samer@0: evaluated at the same point in different parts samer@0: of the code - hence we can save ourselves samer@0: some computation. samer@0: samer@0: */ samer@0: samer@0: samer@0: public interface Functionx samer@0: { samer@0: /** get value and gradient for supplied point */ samer@0: void evaluate( Datum P); samer@0: samer@0: /** set argument to x, return value and put gradient in dx */ samer@0: double evaluate( double [] x, double [] grad); samer@0: samer@0: void dispose(); samer@0: }