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

Method exportImaginary

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

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

()

Source from the content-addressed store, hash-verified

206 * @return
207 */
208 public Double[] exportImaginary() {
209 Double[] ad = new Double[indexSet.size()];
210 int i = 0;
211 for (IndexMN index : indexSet) {
212 if (imaginary.containsKey(index)) {
213 ad[i] = imaginary.get(index);
214 } else {
215 ad[i] = Zeros.DOUBLE;
216 }
217 i++;
218 }
219 return ad;
220 }
221
222 /* (non-Javadoc)
223 * @see com.paradigmdesigner.matlab.types.MLArray#contentToString()

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