MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / toString

Method toString

JSAT/src/jsat/linear/SparseVector.java:516–535  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

514 }
515
516 @Override
517 public String toString()
518 {
519 StringBuilder sb = new StringBuilder("[");
520
521 int p = 0;
522 for(int i = 0; i < length(); i++)
523 {
524 if(i != 0)
525 sb.append(", ");
526
527 if(p < used && indexes[p] == i)
528 sb.append(values[p++]);
529 else
530 sb.append("0.0");
531 }
532 sb.append("]");
533
534 return sb.toString();
535 }
536
537 @Override
538 public void multiply(double c, Matrix A, Vec b)

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected