toString method

  1. @override
String toString()
override

Convert an Array3d object to a String representation

Examples

var book = Array3d.empty();
var page = Array2d.empty();

page.add(Array([1.0 ,2.0 , 3.0]));
page.add(Array([1.0 ,2.0 , 3.0]));
page.add(Array([1.0 ,2.0 , 3.0]));
book.add(page);
book.add(page);
book.add(page);

print(book);

/* output:
Array3d([Array2d([Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0])]), Array2d([Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0])]), Array2d([Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0]), Array([1.0, 2.0, 3.0])])])
*/

Implementation

@override
String toString() {
  var str = IterableBase.iterableToFullString(this, '[', ']');
  return 'Array3d($str)';
}