|
Stratax 0.4.0rc1
|
Header: include/stratax/io/Print.hpp; Shape insertion is in core/Shape.hpp.
Vector, Matrix, Tensor, and ArrayView stream insertion call the same logical formatter directly, without converting the input to an owning Tensor. Values follow row-major logical order, including for noncontiguous views.
Empty arrays print [] regardless of rank or zero-axis position. Nonempty arrays use nested brackets. Rank-two siblings are newline-separated without commas; higher-rank siblings use commas and newlines. Nesting adds four spaces. Booleans print true/false and int8/uint8 print numerically. Other values use the stream's scalar formatting. Formatting is for inspection, not a serialization format that can reconstruct every empty shape.
Shape prints tuple notation, including (5,) for rank one and () for rank zero. Array output depends on rank, not whether the type is Matrix or Tensor. All insertion operators return the stream and do not mutate the array.
Cost includes scalar output, separator/indentation text, and repeated O(r) logical-stride construction at recursion nodes. View element lookup adds O(r) per value. Metadata allocation and configured stream exceptions propagate. There is no output truncation option. See Shape and ArrayView.