Mercurial > hg > jslab
annotate src/samer/maths/opt/Functionx.java @ 8:5e3cbbf173aa tip
Reorganise some more
author | samer |
---|---|
date | Fri, 05 Apr 2019 22:41:58 +0100 |
parents | bf79fb79ee13 |
children |
rev | line source |
---|---|
samer@0 | 1 /* |
samer@0 | 2 * Copyright (c) 2000, Samer Abdallah, King's College London. |
samer@0 | 3 * All rights reserved. |
samer@0 | 4 * |
samer@0 | 5 * This software is provided AS iS and WITHOUT ANY WARRANTY; |
samer@0 | 6 * without even the implied warranty of MERCHANTABILITY or |
samer@0 | 7 * FITNESS FOR A PARTICULAR PURPOSE. |
samer@0 | 8 */ |
samer@0 | 9 |
samer@0 | 10 package samer.maths.opt; |
samer@0 | 11 |
samer@0 | 12 /** |
samer@0 | 13 This is a function interface that is designed |
samer@0 | 14 to allow efficient implementations of minimisation |
samer@0 | 15 algorithms by recognising the fact that the |
samer@0 | 16 function and its gradient may be repeatedly |
samer@0 | 17 evaluated at the same point in different parts |
samer@0 | 18 of the code - hence we can save ourselves |
samer@0 | 19 some computation. |
samer@0 | 20 |
samer@0 | 21 */ |
samer@0 | 22 |
samer@0 | 23 |
samer@0 | 24 public interface Functionx |
samer@0 | 25 { |
samer@0 | 26 /** get value and gradient for supplied point */ |
samer@0 | 27 void evaluate( Datum P); |
samer@0 | 28 |
samer@0 | 29 /** set argument to x, return value and put gradient in dx */ |
samer@0 | 30 double evaluate( double [] x, double [] grad); |
samer@0 | 31 |
samer@0 | 32 void dispose(); |
samer@0 | 33 } |