Commit 0598604e authored by Sina Samangooei's avatar Sina Samangooei
Browse files

Added an equivilant function to getIR() in MLSparse for columns. I thought...

Added an equivilant function to getIR() in MLSparse for columns. I thought getJC would do this but looking at the code it did something else. Therefore I added getIC (this is possibly named badly) which literally gives you the column index as an array whose i_th value is the column of the i_th entry in pr. I've also changed the pom.xml so that its version wasn't snapshot. This was so i could create the artifact and serve it off our nexus
parent 588f1358
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

    <groupId>net.sourceforge.jmatio</groupId>
    <artifactId>jmatio</artifactId>
    <version>1.1-SNAPSHOT</version>
    <version>1.1</version>
    <packaging>jar</packaging>
    <description>
        Matlab's MAT-file I/O API in JAVA. Supports Matlab 5 MAT-flie format reading and writing. Written in pure JAVA.
@@ -73,7 +73,7 @@
                    </execution>
                </executions>
            </plugin>
            <plugin>
<!--             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.1</version>
@@ -90,7 +90,7 @@
                        </goals>
                    </execution>
                </executions>
            </plugin>
            </plugin> -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
+18 −0
Original line number Diff line number Diff line
@@ -60,6 +60,24 @@ public class MLSparse extends MLNumericArray<Double>
        }
        return ir;
    }
    
    /**
     * Gets column indices
     * 
     * <tt>ic</tt> points to an integer array of length nzmax containing the column indices of
     * the corresponding elements in <tt>pr</tt> and <tt>pi</tt>.
     */
    public int[] getIC()
    {
        int[] ic = new int[nzmax];
        int i = 0;
        for ( IndexMN index : indexSet )
        {
            ic[i++] = index.n;
        }
        return ic;
    }
    
    /**
     * Gets column indices. 
     *