Examples of numEntries()


Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        // Read the entries, in either coordinate or array format
        if (info.isCoordinate()) {

            // Read coordinate data
            int nz = size.numEntries();
            int[] row = new int[nz];
            int[] column = new int[nz];
            double[] entry = new double[nz];
            r.readCoordinate(row, column, entry);
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        MatrixSize size = r.readMatrixSize(info);
        numRows = size.numRows();
        numColumns = size.numColumns();

        // Start reading entries
        int numEntries = size.numEntries();
        int[] row = new int[numEntries];
        int[] column = new int[numEntries];
        double[] entry = new double[numEntries];
        r.readCoordinate(row, column, entry);
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        // Create the sparse matrix structure
        construct(nz);

        // Insert the entries
        for (int i = 0; i < size.numEntries(); ++i)
            set(row[i], column[i], entry[i]);

        // Put in extra entries from symmetry or skew symmetry
        if (info.isSymmetric())
            for (int i = 0; i < numEntries; ++i) {
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        if (info.isComplex())
            throw new UnsupportedOperationException(
                    "Complex matrices are not supported");

        // Start reading entries
        int[] row = new int[size.numEntries()], column = new int[size
                .numEntries()];
        double[] entry = new double[size.numEntries()];
        r.readCoordinate(row, column, entry);

        // Shift the indices from 1 based to 0 based
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        if (info.isComplex())
            throw new UnsupportedOperationException(
                    "Complex matrices are not supported");

        // Start reading entries
        int[] row = new int[size.numEntries()], column = new int[size
                .numEntries()];
        double[] entry = new double[size.numEntries()];
        r.readCoordinate(row, column, entry);

        // Shift the indices from 1 based to 0 based
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

                    "Complex matrices are not supported");

        // Start reading entries
        int[] row = new int[size.numEntries()], column = new int[size
                .numEntries()];
        double[] entry = new double[size.numEntries()];
        r.readCoordinate(row, column, entry);

        // Shift the indices from 1 based to 0 based
        r.add(-1, row);
        r.add(-1, column);
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        r.add(-1, row);
        r.add(-1, column);

        // Find all the diagonals so that we can preallocate
        Set<Integer> diags = new TreeSet<Integer>();
        for (int i = 0; i < size.numEntries(); ++i)
            diags.add(getDiagonal(row[i], column[i]));

        if (info.isSymmetric() || info.isSkewSymmetric())
            for (int i = 0; i < size.numEntries(); ++i)
                if (row[i] != column[i])
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        Set<Integer> diags = new TreeSet<Integer>();
        for (int i = 0; i < size.numEntries(); ++i)
            diags.add(getDiagonal(row[i], column[i]));

        if (info.isSymmetric() || info.isSkewSymmetric())
            for (int i = 0; i < size.numEntries(); ++i)
                if (row[i] != column[i])
                    diags.add(getDiagonal(column[i], row[i]));

        // Convert into an integer array
        int[] ind = new int[diags.size()];
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        // Create the structure with preallocation
        construct(ind);

        // Insert the entries
        for (int i = 0; i < size.numEntries(); ++i)
            set(row[i], column[i], entry[i]);

        // Put in missing entries from symmetry or skew symmetry
        if (info.isSymmetric())
            for (int i = 0; i < size.numEntries(); ++i) {
View Full Code Here

Examples of no.uib.cipr.matrix.io.MatrixSize.numEntries()

        for (int i = 0; i < size.numEntries(); ++i)
            set(row[i], column[i], entry[i]);

        // Put in missing entries from symmetry or skew symmetry
        if (info.isSymmetric())
            for (int i = 0; i < size.numEntries(); ++i) {
                if (row[i] != column[i])
                    set(column[i], row[i], entry[i]);
            }
        else if (info.isSkewSymmetric())
            for (int i = 0; i < size.numEntries(); ++i) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.