[Insight-developers] single valued cost function
Ziv Yaniv
zivy at isis.imac.georgetown.edu
Thu Jul 15 14:32:53 EDT 2010
What was the reasoning behind having the GetValueAndDerivative and the
pure virtual GetDerivative method in the SingleValuedCostFunction class?
This does not accommodate non differentiable functions in a natural way.
I see two options:
Slight modification of the current cost function hierarchy,
1. Remove both methods from the SingleValuedCostFunction class.
2. Add a class SingleValuedCostFunctionWithDerivative adding the two
methods and inheriting from SingleValuedCostFunction
3. Modify the inheritance of the direct subclasses (7 according to
doxygen) from the old class to the new one.
No change to code base,
1. Implementation of GetDerivative in a subclass that cannot compute one
just throws an excpetion. Ugly but guaranteed to get the developers
attention.
Am I missing something? If not, I would be happy if itk-v4 adopts the
first option.
Ziv
--
Ziv Yaniv, PhD., Research Assistant Professor
Imaging Science and Information Systems (ISIS) Center
Department of Radiology
Georgetown University Medical Center
2115 Wisconsin Avenue, Suite 603
Washington, DC, 20007,
Phone: +1-202-687-7286
Fax: +1-202-784-3479
email: zivy at isis.georgetown.edu
web: http://isiswiki.georgetown.edu/zivy/
More information about the Insight-developers
mailing list