mathcomp.la
Interface Index

All Known Implementing Classes:
CollectionIndex

public interface Index

An Index is a set with an enumeration. We use it in all our la-classes. The main methods are iterator() and size(). The Iterator comes from the java.util package and is part of the Collections-API. If you've already got an Index you should create new matrices and new Vectors with the createMatrix() and createVector() Methods. The toList() is used primarily internal.

Author:
pht
See Also:
Iterator

Method Summary
 Matrix createMatrix()
          Creates a new Matrix indexed by this Index.
 Vector createVector()
          Creates a new Vector indexed by this Index.
 java.util.Iterator iterator()
          This returns a enumeration of the index.
 int size()
          This returns the cardinality of the index.
 java.util.List toList()
           
 

Method Detail

iterator

java.util.Iterator iterator()
This returns a enumeration of the index.

Returns:
enumeration of the index

size

int size()
This returns the cardinality of the index.

Returns:
the cardinality of the index, a number >= 0

createMatrix

Matrix createMatrix()
Creates a new Matrix indexed by this Index.

Returns:
a new Matrix indexed by this Index

createVector

Vector createVector()
Creates a new Vector indexed by this Index.

Returns:
a new Vector indexed by this Index

toList

java.util.List toList()
Returns:
a java.util.List containing the index.