Interactive
Software Engineering
EiffelMath

[ISE Home] Home ] Release Notes ] Technology Papers ] Installation Notes ] About Eiffel ]


Introduction

In this documentation we will explain you how to use EiffelMath in you Projects:

EiffelMath is a library of reusable object-oriented components for numerical computation, providing developers of scientific software with the full power of object technology. 

EiffelMath is built on top of the extensive C library of mathematical software produced by the Numerical Algorithms Group (NAG, one of the oldest and most respected collections of quality numerical software). EiffelMath is not just a straight Eiffel encapsulation of the functions of the NAG library but presents developers with a full O-O view of numerical abstractions, taking full advantage of the Eiffel method.

By adding an object-oriented layer on top of the basic NAG routines, EiffelMath provides developers of numerical applications with a much simpler, natural and elegant interface.

The benefits are due in particular to: 

  • The abstraction facilities of the Eiffel method, allowing the grouping of the available mechanisms into classes representing such concepts as integrator, matrix, discrete uniform function, exponential distribution and many others, each of which represents "objects" that are readily understandable to a financial analyst, mathematician, physicist or economist, and each of which is represented in EiffelMath by a class.
  • Single and multiple inheritance, supporting hierarchical classification.
  • The assertion mechanism and "Design by Contract" principle, which enable EiffelMath classes and routines to document their requirements and benefits precisely, and enforce them so that user errors are caught quickly.
  • The exception mechanism, providing a simple, consistent and powerful approach to the handling of errors.
  • Garbage collection, relieving numerical application developers from tedious and error-prone tasks of memory management that they must handle by themselves with solutions directly based on COBOL, Fortran, C or C++. 

Technical Information

    The EiffelMath library provides support for: 

  • Probability and Statistics 
  • Numerical Integration 
  • Solution of Nonlinear Equations 
  • Ordinary Differential Equations 
  • Solution of Linear Equations 
  • Solutions of Eigen problems 
  • Fitting and Interpolation 
  • Orthogonal Factorizations and Linear Least Squares 
  • Optimization 
  • Special Functions 
  • Fast Fourier Transforms 
  • Time Series Analysis 
  • and more....

EiffelMath is described in detail in Paul Dubois's book Object Technology for Scientific Computing, which presents the design of the library, explains how best to use it, and shows how best to use object technology for scientific developments. 

EiffelMath is fully supported on Windows, Windows NT and Windows 9x and on a wide variety of Unix platforms, including SunOS, Solaris 2.4, HP 9000, IBM RS6000, DEC Alpha OSF/1, Data General Aviion, Silicon Graphics, Linux, UnixWare and SCO. At the Moment EiffelMath is only compatible with the Mark 4 Release of the NAG library.

The library is located in $EIFFEL5/library/math .

Getting Started

  • On Windows

To install EiffelTime, you need to go to the directory $EIFFEL5\library\math\Clib and run make_msc.bat if your C compiler is Microsoft. (the Makefile for Borland does not exist yet). 

  • On Unix

Just launch finish_freezing - library in the directory $EIFFEL5/library/math/Clib.

 

How to configure your Ace file

In order to use EiffelMath in an Eiffel Project, you have to include in your project, the right clusters and the right external files. Thus, you need to configure your Ace file.

You can get all the information about Ace files here.

To include the EiffelMath clusters you need to choose which one will be useful. By default you can include all the cluster of EiffelMath:

            bvp:             "$EIFFEL5\library\math\bvp";
            eifmath:       "$EIFFEL5\library\math\eifmath";
            integrat:       "$EIFFEL5\library\math\integrat";
            interpol:       "$EIFFEL5\library\math\interpol";
            linear:          "$EIFFEL5\library\math\linear";
            ode:             "$EIFFEL5\library\math\ode";
            optima:        "$EIFFEL5\library\math\optima";
            random:       "$EIFFEL5\library\math\random";
            regress:        "$EIFFEL5\library\math\regress";
            roots:            "$EIFFEL5\library\math\roots";
            special:        "$EIFFEL5\library\math\special";
            transp:         "$EIFFEL5\library\math\transp";
            tsa:               "$EIFFEL5\library\math\tsa";

If you need more information about all these different clusters, you can consult Paul Dubois's book Object Technology for Scientific Computing.

Some Working examples

We developed some examples that you can try to see how to use EiffelMath.

All these examples are in : $EIFFEL5/examples/math