Package edu.ucla.sspace.util

Examples of edu.ucla.sspace.util.SparseIntArray


     * Creates a new vector of the specified length
     *
     * @param length the length of this vector
     */
    public CompactSparseIntegerVector(int length) {
        intArray = new SparseIntArray(length);
        magnitude = 0;
    }
View Full Code Here


     * to either will not be reflected in the other.
     *
     * @param v the intial values for this vector to have
     */
    public CompactSparseIntegerVector(IntegerVector v) {
        intArray = new SparseIntArray(v.length());
        if (v instanceof SparseVector) {
            SparseVector sv = (SparseVector)v;
            for (int i : sv.getNonZeroIndices())
                intArray.set(i, v.get(i));
        }
View Full Code Here

     * changes to either will not be reflected in the other.
     *
     * @param values the intial values for this vector to have
     */
    public CompactSparseIntegerVector(int[] values) {
        intArray = new SparseIntArray(values);
        magnitude = -1;
    }
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.util.SparseIntArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.