Examples of VectorSize


Examples of no.uib.cipr.matrix.io.VectorSize

        VectorInfo info = null;
        if (r.hasInfo())
            info = r.readVectorInfo();
        else
            info = new VectorInfo(true, VectorField.Real);
        VectorSize size = r.readVectorSize(info);

        // Resize the vector to correct size
        this.size = size.size();
        data = new double[size.size()];

        // Check that the vector is in an acceptable format
        if (info.isPattern())
            throw new UnsupportedOperationException(
                    "Pattern vectors are not supported");
        if (info.isComplex())
            throw new UnsupportedOperationException(
                    "Complex vectors are not supported");

        // Read the entries
        if (info.isCoordinate()) {

            // Read coordinate data
            int nz = size.numEntries();
            int[] index = new int[nz];
            double[] entry = new double[nz];
            r.readCoordinate(index, entry);

            // Shift indices from 1-offset to 0-offset
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.