[Insight-developers] Amoeba optimizer,

Miller, James V (CRD) millerjv@crd.ge.com
Tue, 27 Mar 2001 17:12:09 -0500


I'm not seeing that.

It looks as though itkAmoebaOptimizer has two ivars, a cost function adaptor (which is a subclass of
vnl_cost_function) and a vnl_amoeba. Upon construction of itkAmoebaOptimizer is passes the
cost_function_adaptor ivar to the vnl_amoeba ivar.  vnl_amoeba caches a pointer to this
cost_function_adaptor.  An itk user, can then set the cost function to use on the itkAmoebaOptimizer
which is stored in the cost_function_adaptor.  When vnl_amoeba references its function to optimize
(which is the cost_function_adaptor), the cost_function_adaptor delegates the call to the cost cost
function that the itk user specified to the itkAmoebaOptimizer.

So, it looks to me that the itkAmoebaOptimizer should work fine.  While the real optimizer never
accesses the real cost function, the calls should be delegated properly.

Jim

-----Original Message-----
From: Luis Ibanez [mailto:ibanez@cs.unc.edu]
Sent: Tuesday, March 27, 2001 3:11 PM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] Amoeba optimizer,


Hi,

I'm having trouble with the Amoeba optimizer.

vnl optimizers have been adapted by creating
an adaptor cost function like:


  +-------------------+
  | vnl_cost_function |
  +-------------------+
            ^
            |
+-----------------------------+
| vnlCostFunctionAdaptor      |   +--------------+
| has a CostFunction::Pointer |-->| CostFunction |
+-----------------------------+   +--------------+


Then, the pointer to vnlCostFunction is passed
to the specific vnl_optimizer.

It seems that Amoeba makes a copy of itself,
and assumes that with the cost_function has
no state associated with it.  So, it basically
creates brand new vnl_cost_function (only respecting
the type).  That causes that the real CostFunction
pointer is never passed to the real optimizer...


Any suggestions ...


Thanks


Luis

_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers