Presentation is loading. Please wait.

Presentation is loading. Please wait.

Development of numerical library software in Java Feb 8, 2000 H.Okazawa, Shizuoka Seika College, Japan and T.Sasaki, KEK,Japan.

Similar presentations


Presentation on theme: "Development of numerical library software in Java Feb 8, 2000 H.Okazawa, Shizuoka Seika College, Japan and T.Sasaki, KEK,Japan."— Presentation transcript:

1 Development of numerical library software in Java Feb 8, 2000 H.Okazawa, Shizuoka Seika College, Japan and T.Sasaki, KEK,Japan

2 Contents  Introduction  Object Oriented Programming  Analysis and Design of Numerical library  Fitting program in OOA/OOD  Summary

3 Introduction(1) We present… Our attempt on OO analysis and OO development to the general numerical library in Java The development of data fitting program with OOA/OOD The detail of the design as a first step of development of numerical analysis libraries in Java

4 Introduction(2) HEP Analysis  Software components tend to be large  Software will be used for more than 10 yeas or so. Object Oriented technique - Reuse software component - Change the specification of the software - Understand an overall of the system.

5 Introduction(3)  The need of Common Interface for numerical library Different products have different interfaces Make difficult to  Try another algorithm  Implement a new functionary  The need of well designed software Minimum effort in changing user’s code Increases reliability and production capability of software

6 Object Oriented Programming(1) Why we use Java?  C++ Illustrates high-level performance Has various runtime libraries used in C language Takes long time in understanding or developing software for no expert of C++ programming  Java, simple OO language Easy to understand and integrate the software Easily moved among computing platforms Very safe and reliable under networking condition Easy to import visualization program to many platforms

7 Object Oriented Programming(2) JavaC++ GUI AB Developing speed AB Reference to class AB Memory management BC Safety BC Multi platform BC Inheritance BA Performance CB Template(class/function) DB A: Excellent B: Good C: Available D: Not supported Ref: JAVA World 12, 1999

8 Analysis and Design of Numerical library(1) It is difficult to develop numerical library in Java because….  C++ Functions in numerical library are implemented as “Template functions”.  Java No template functionary Everything must be in class

9 Analysis and Design of Numerical library(2) We investigated 2 scenario for the development of numerical library in Java.  Scenario 1 The object is identified to manage the numerical library. The super class are prepared and all of other functionary is realized to inherit it. Only interfaces are defined in the super class.  Scenario 2 Objects are identified as variables or arrays to be used for mathematical manipulations. <= Need to define so many classes according to basic data types in Java.

10 Analysis and Design of Numerical library(3) However Scenario 1 looks a bit far from native OO concepts, it has advantage in simplicity of implementation and also maintainability. Usecase diagram from Scenario 1

11 Numeric s Integrator Fitter Sorter Evaluator Equator We plan to develop several numerics classes. As an example of implementation of a functionary of numerical library, a fitting program was developed. Development of fitting program in OOA/OOD(1)

12 Development of fitting program in OOA/OOD(2) Class diagram for fitting program PolynomialFitter GaussianFitter Numerics inputData() action() result() Matrix add() transpose() divide() subtract() Fitter leastSquare() Marquardt() chisq() UserDefinedFitter

13 Development of fitting program in OOA/OOD(3) A Sample result from polynomial fitter

14 If you want to add your own function, you just extend new function class you need. Or you can easily find out where to change the code from class diagram. Although this class library is very simple now, further iteration of analysis, design and implementation makes more elegant, widely usable software package. Development of fitting program in OOA/OOD(4) package Numerical; public class MyOwnFitter extends Fitter { public void myfunc() { double[] x; double y; double [][] a; for(int i=0; i<narray; i++){ y += a[i][0]*Math.pow() + a[i][1]*x+...; } return; }

15 Summary  Attempt OOA/OOD on the numerical library in Java  A simple Java fitting software by OOA/OOD was developed on it  prepared reusable package


Download ppt "Development of numerical library software in Java Feb 8, 2000 H.Okazawa, Shizuoka Seika College, Japan and T.Sasaki, KEK,Japan."

Similar presentations


Ads by Google