## Data Structures in Java for Matrix Computations (2002)

Citations: | 2 - 0 self |

### BibTeX

@MISC{Gundersen02datastructures,

author = {Geir Gundersen and Trond Steihaug},

title = {Data Structures in Java for Matrix Computations},

year = {2002}

}

### OpenURL

### Abstract

In this paper it is shown how to utilize Java arrays for matrix computations. We discuss the disadvantages of Java arrays when used as two-dimensional array for dense matrix computation, and how to improve the performance. We show how to create efficient dynamic data structure for sparse matrix computation using Java's native arrays. We construct a data structure for large sparse matrices that is unique for Java. This datastructure is shown to be more dynamic and efficient than the traditional storage schemes for large sparse matrices. Numerical results show that this new data structure, called Java Sparse Array (JSA), is competitive with the traditionally Compressed Row Storage scheme (CRS) on matrix computation routines. Java gives exibility without loosing efficiency. Compared to other object oriented data structures it is shown that JSA has the same flexibility.

### Citations

266 | SPARSKIT: A basic tool kit for sparse matrix computations
- Saad
- 1990
(Show Context)
Citation Context ... 553956 2525937 2401 395 642 628 Table 3: The CRS and JSA algorithms for C = AA. general matrices be found by using the datastructures of A and B. The implementation used is based on FORTRAN routines =-=[6, 14]-=- using Java's native arrays. The nonzero structure, the index and value array, are created with an a priori size. The row pointer can be created with asxed size since it is the size of the row dimensi... |

12 | Java performance tuning - Shirazi - 2003 |

11 | A comparison of three approaches to language, compiler, and library support for multidimensional arrays in Java computing
- Moreira, Midkiff, et al.
- 2001
(Show Context)
Citation Context ...cluster the row objects together in memory [15]. However this accounts for only a minor part of the dierence. Other suggestion is to make a multidimensional Java array class avoiding array of arrays [=-=16-=-]. For sparse matrices we have illustrated the eect of having the possibility to manipulate only the rows of the structure without updating the rest of the structure. We still do not know if Java Spar... |

9 |
Developing numerical libraries in Java. Concurrency: Pmctice and Experience, 10(11-13):1117-1129. [Boisvert et al
- Boisvert, Dongarra, et al.
- 1998
(Show Context)
Citation Context ...oduct C = AB is a n p matrix with elements C ij = m 1 X k=0 A ik B kj i = 0; 1; : : : ; n 1; j = 0; 1; : : : ; p 1 (2) A straightforward implementation of (2) using Java's native arrays is given in [=-=3, 4]-=-. for(int i = 0; i for(int j = 0;j for(int k = 0;k C[i][j] += A[i][k]*B[k][j]; } } } By interchanging the three for loops there are six distinct ways of doing matrix multiplication. We can group them ... |

8 |
Sparse Matrix
- Pissanetsky
- 1984
(Show Context)
Citation Context ... p . 102 4 Sparse Matrices A sparse matrix is usually dened as a matrix where "many" of its elements are equal to zero and we benet both in time and space by working only on the nonzero ele=-=ments [6]-=-. The diculty is that sparse data structures include more overhead (to store indices as well as numerical values of nonzero matrix entries) than the simple arrays used for dense matrices. There are se... |

8 |
The evolution of numerical computing
- Gosling
(Show Context)
Citation Context ... two-dimensional arrays we need to consider its row-wise layout. One proposal to make the dierence between row and column traversing less signicant, is to cluster the row objects together in memory [1=-=5-=-]. However this accounts for only a minor part of the dierence. Other suggestion is to make a multidimensional Java array class avoiding array of arrays [16]. For sparse matrices we have illustrated t... |

7 |
JAMA: A Java Matrix Package
- Hicklin, Moler, et al.
- 1999
(Show Context)
Citation Context ...ow-wise layout of a two-dimensional array and implement a straightforward matrix multiplication algorithm that takes the row-wise layout into consideration. We present a package implementation (JAMA) =-=[1]-=- of matrix multiplication and compare our straightforward matrix multiplication algorithm with JAMA. We introduce the use of Java arrays for storing sparse matrices and discuss different storage forma... |

6 | Towards automatic supports of parallel sparse computation in Java with continuous compilation. Concurrency: Practice and Experience
- Chang, Chen, et al.
- 1997
(Show Context)
Citation Context ...ordinate storage scheme. The coordinate storage scheme is the most straightforward structure to represent a sparse matrix, it simply records each nonzero entry together with its row and column index. =-=[9]-=- use the coordinate storage format as implemented in C++ in [10]. The coordinate storage format is not an ecient storage format for large sparse compared to compressed row format [5]. There are also s... |

1 |
The use of Java arrays in matrix computation, Cand
- Gundersen
- 2002
(Show Context)
Citation Context ...A. If the second factor is [n][1] we have Ab. We use lower case to denote a (column) vector. Experiments show that there is no dierence in time traversing an [1][n] array compared to an [n][1] array [=-=-=-5] of primitive elements. Figure 9 shows that JAMA's algorithm is more ecient than the pure row-oriented algorithm on input Ab with an average factor of two. There is a signicant dierence 101 0 200 40... |

1 |
JAMPACK: A Package for Matrix Computations
- Stewart
- 1999
(Show Context)
Citation Context ... structures like symmetry the storage schems must be modied. Currently there is no released packages implemented in Java for numerical computation on sparse matrices, as complete as JAMA and JAMPACK [=-=1, 7]-=- for dense matrices. But there are separate algorithms like [8] using a coordinate storage scheme. The coordinate storage scheme is the most straightforward structure to represent a sparse matrix, it ... |

1 |
SparseLib++ v. 1.5 Sparse Matrix Reference Guide. http://math.nist.gov/sparselib
- Pozo, Remington, et al.
(Show Context)
Citation Context ...ost straightforward structure to represent a sparse matrix, it simply records each nonzero entry together with its row and column index. [9] use the coordinate storage format as implemented in C++ in =-=[10]-=-. The coordinate storage format is not an ecient storage format for large sparse compared to compressed row format [5]. There are also some benchmark algorithms like [12] that performs sparse matrix c... |

1 |
Object Based Communication in Java
- Nielsen, Kielman, et al.
(Show Context)
Citation Context ...started in Figure 13. It is similar to JSA, but it does not take advantage of the feature that Java's native arrays are true objects. The Sparse Matrix Concept can be implemented in the following way =-=[11]-=-. public class SparseMatrix{ private Rows[] rows; public SparseMatrix(Rows[] rows){ this.rows = rows; } public SparseMatrix times(SparseMatrix B){...} } public class Rows{ private double[] values; pri... |