Columns may be added via the {@code addColumn} method until the matrix has the desired data. The underlyingmatrix structure will expand to match the dimensions of the input data. Great care should be taken when using {@link SparseArray} and {@link DoubleVector} instances to ensure that the values returned by theirrespective {@code length} methods are fixed to the actual data structuresize, rather than the a possible maximum size of the struture. This is necessary to determine this matrix's dimension; passing in an array or vector with a maximum size bound will greatly distort the matrix's size.
After all the data has been added, the {@code finish} method should beinvoked. Instances should use this as a signal to finish any last remaining writes or perform any necessary post processing for the matrix. Once this method returns the {@code getMatrixFile} method will allow access to thefinished data in its correct format.
Implementations may cache all, part, or none of the data prior to finishing the matrix data. However, all implementations are expected to be have a low memory overhead, especially when building large matrices.
All implementations are expected to be thread-safe. @author David Jurgens
|
|
|
|
|
|