/** * Constructs a matrix view with a given number of parameters. * * @param size the number of cells the matrix shall have. * @param elements the cells. * @param offset the index of the first element. * @param stride the number of indexes between any two elements, i.e. <tt>index(i+1)-index(i)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ protected SparseDoubleMatrix1D(int size, AbstractIntDoubleMap elements, int offset, int stride) { setUp(size,offset,stride); this.elements = elements; this.isNoView = false; } /**
/** * Constructs a matrix view with a given number of parameters. * * @param size the number of cells the matrix shall have. * @param elements the cells. * @param offset the index of the first element. * @param stride the number of indexes between any two elements, i.e. <tt>index(i+1)-index(i)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ protected SparseDoubleMatrix1D(int size, AbstractIntDoubleMap elements, int offset, int stride) { setUp(size,offset,stride); this.elements = elements; this.isNoView = false; } /**
/** * Constructs a matrix with a given number of parameters. * All entries are initially <tt>0</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntDoubleHashMap}. * * @param size the number of cells the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ public SparseDoubleMatrix1D(int size, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(size); this.elements = new OpenIntDoubleHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
/** * Constructs a matrix with a given number of parameters. * All entries are initially <tt>0</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntDoubleHashMap}. * * @param size the number of cells the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ public SparseDoubleMatrix1D(int size, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(size); this.elements = new OpenIntDoubleHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**