Synchronous algorithms

The ILAlgorithm class acts as a base class for user defined synchronously executing algorithms. It is located in the ILNumerics.Algorithm namespace. Using it brings the following advantages:

  • ILAlgorithm itself derives from ILMath. Therefore all functions of ILMath are directly adressed from within member functions of ILAlgorithm and its derivates without the ILMath identifier.
  • ILAlgorithm implements an event model which can be used to inform calling applications about state and progress of your algorithm.

The first point is obvious: preventing from explicitly specifying identifiers for all computational functions ('ILMath.') vastly shortens the code and makes it much more readable. Compare the following expressions for an example:

ILArray<double> R,I,A; = ILMath.rand(5,1); 
 R = ILMath.horzcat(ILMath.randn(5,5) - 1.0,ILMath.repmat(A,1,5));
 
 // from inside ILAlgorithm this can be significantly abbreviated:      
 ILArray<double> R,I,A; = rand(5,1); 
 R = horzcat(randn(5,5) - 1.0, repmat(A,1,5));

Read about the following topics:


Valid CSS! Valid XHTML 1.0 Transitional