MCPcopy Create free account
hub / github.com/diffplug/matfilerw / getJC

Method getJC

src/main/java/com/jmatio/types/MLSparse.java:94–103  ·  view source on GitHub ↗

Gets column indices. jc points to an integer array of length N+1 that contains column index information. For j, in the range 0<=j<=N , jc[j] is the index in ir and pr (and pi if it exists) of the first nonzero entry in the jth column and jc[j+1]

()

Source from the content-addressed store, hash-verified

92 * @return
93 */
94 public int[] getJC() {
95 int[] jc = new int[getN() + 1];
96 // jc[j] is the number of nonzero elements in all preceeding columns
97 for (IndexMN index : indexSet) {
98 for (int column = index.n + 1; column < jc.length; column++) {
99 jc[column]++;
100 }
101 }
102 return jc;
103 }
104
105 @Override
106 public Double getReal(int m, int n) {

Callers 2

writeMatrixMethod · 0.80
writeMatrixMethod · 0.80

Calls 1

getNMethod · 0.80

Tested by

no test coverage detected