MCPcopy Index your code
hub / github.com/diffplug/matfilerw / contentToString

Method contentToString

src/main/java/com/jmatio/types/MLSparse.java:225–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223 * @see com.paradigmdesigner.matlab.types.MLArray#contentToString()
224 */
225 @Override
226 public String contentToString() {
227 StringBuffer sb = new StringBuffer();
228 sb.append(name + " = \n");
229
230 for (IndexMN i : indexSet) {
231 sb.append("\t(");
232 sb.append(i.m + "," + i.n);
233 sb.append(")");
234 sb.append("\t" + getReal(i.m, i.n));
235 if (isComplex()) {
236 sb.append("+" + getImaginary(i.m, i.n));
237 }
238 sb.append("\n");
239
240 }
241
242 return sb.toString();
243 }
244
245 /**
246 * Matrix index (m,n)

Callers

nothing calls this directly

Calls 4

getRealMethod · 0.95
getImaginaryMethod · 0.95
isComplexMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected