Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If needed it is possible to register this function with the function factory's catalog, even if for performance reasons it would be better to actually code this function before registering it.

Direct Instantiation

Functions can be created by directely instantiating a given class. For a function to be used within an AIDA program it has to implement the at least the IFunction interface.
The IFunction interface is the interface for functions that need to be plotted. For functions that need to be fitted the IModelFunction interface is required.
In our implementation we provide an abstract class (AbstractIFunction) that implements most of the methods of the above interfaces. By extending the AbstractIFunction the user must provide an implementation for the double value(double x[]) method that is what defines the function.
Depending on the requirements the user might want to provide an implementation for additional methods:

  • If the function has to be used for unbinned fits and speed is an issue the analytical normalization and the gradient should be provided (the corresponding methods are part of the IModelFunction interface)
  • If the function has to be registered with the function factory's catalog an implementation of the codelet has to be provided. Please refer to the following section for more information on the codelet.