cern.colt.matrix.impl.SparseDoubleMatrix1D Java Examples

The following examples show how to use cern.colt.matrix.impl.SparseDoubleMatrix1D. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DoubleFactory1D.java    From database with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Constructs a matrix with the given shape, each cell initialized with zero.
 */
public DoubleMatrix1D make(int size) {
	if (this==sparse) return new SparseDoubleMatrix1D(size);
	return new DenseDoubleMatrix1D(size);
}
 
Example #2
Source File: DoubleFactory1D.java    From jAudioGIT with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * Constructs a matrix with the given shape, each cell initialized with zero.
 */
public DoubleMatrix1D make(int size) {
	if (this==sparse) return new SparseDoubleMatrix1D(size);
	return new DenseDoubleMatrix1D(size);
}
 
Example #3
Source File: DoubleFactory1D.java    From database with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a matrix with the given cell values.
 * The values are copied. So subsequent changes in <tt>values</tt> are not reflected in the matrix, and vice-versa.
 *
 * @param values The values to be filled into the new matrix.
 */
public DoubleMatrix1D make(double[] values) {
	if (this==sparse) return new SparseDoubleMatrix1D(values);
	else return new DenseDoubleMatrix1D(values);
}
 
Example #4
Source File: DoubleFactory1D.java    From jAudioGIT with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Constructs a matrix with the given cell values.
 * The values are copied. So subsequent changes in <tt>values</tt> are not reflected in the matrix, and vice-versa.
 *
 * @param values The values to be filled into the new matrix.
 */
public DoubleMatrix1D make(double[] values) {
	if (this==sparse) return new SparseDoubleMatrix1D(values);
	else return new DenseDoubleMatrix1D(values);
}