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

Method exportReal

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

Returns the real part (PR) array. PR has length number-of-nonzero-values. @return real part

()

Source from the content-addressed store, hash-verified

187 * @return real part
188 */
189 public Double[] exportReal() {
190 Double[] ad = new Double[indexSet.size()];
191 int i = 0;
192 for (IndexMN index : indexSet) {
193 if (real.containsKey(index)) {
194 ad[i] = real.get(index);
195 } else {
196 ad[i] = Zeros.DOUBLE;
197 }
198 i++;
199 }
200 return ad;
201 }
202
203 /**
204 * Returns the imaginary part (PI) array. PI has length number-of-nonzero-values.

Callers 2

writeMatrixMethod · 0.80
writeMatrixMethod · 0.80

Calls 3

containsKeyMethod · 0.80
sizeMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected