🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #1082

"Minimize any function, as long as it is named FUNC"

#1082
From: furio ercolessi
Date: Fri, 08 Jan 1993 22:44
34 lines
2114 bytes
If you program in C please skip this post  :-)

In the Fortran edition of Numerical Recipes that I have (1989), they
have implemented multidimensional minimization routines that
can minimize any function, provided that it is called FUNC.
As they cheerfully say, "the situation is reminiscent of Henry
Ford's black automobile."

Now, I am bothered by this because I need to minimize many
different, unrelated functions in the same program.
Yes, I can code my FUNC with internal switches passed
via a common block.  Ugh! *Bleah* 
No, I want to fix this in a decent way.

They have done this stupid thing because of an interface routine
between multi- and one- dimensional minimization, called LINMIN
and minimizing the original function on a line between two points
in N-space. This is in turn done by using the ordinary one variable
optimization on a function they call F1DIM, which internally calls
the user's function, but it cannot gather its name from outside
because the argument list must contain only the coordinate and
nothing else in order to be used successfully by the lower layers.
And of course a function address cannot be placed into a common block.

Rats! It sounds that to fix this one has to redesign a lot of
things! At least one day's work :-).  I was wondering if any one
out there ran across this problem and fixed it already ...
Thanks
furio
--
Furio Ercolessi
Materials Research Laboratory           |   Intl School for Advanced Studies
Univ. of Illinois at Urbana-Champaign   |   Trieste, Italy
furio@uiuc.edu                          |   furio@sissa.it
Technical Details
Message-ID: <C0K4Hx.110@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi

Show Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
Subject: "Minimize any function, as long as it is named FUNC"
Message-ID: <C0K4Hx.110@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
Organization: MRL - UIUC
Date: Fri, 8 Jan 1993 22:44:19 GMT
Lines: 34