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:
-
ILAlgorithmitself derives fromILMath. Therefore all functions ofILMathare directly adressed from within member functions ofILAlgorithmand its derivates without theILMathidentifier. -
ILAlgorithmimplements 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: