|
Stratax 0.4.0rc1
|
Workflow-focused examples for trying the current Stratax APIs from C++ and Python.
Each example is intentionally detailed enough to show the normal path through a container: construction, metadata, element access, iteration or slicing, reshape/conversion helpers, and reductions where applicable. They are still kept small enough to run and inspect quickly.
The C++ examples live under examples/cpp.
| File | Focus |
|---|---|
examples/cpp/vector.cpp | Vector construction, indexing, arithmetic, and slicing |
examples/cpp/matrix.cpp | Matrix construction, element access, and operations |
examples/cpp/tensor.cpp | Tensor construction, shape-aware access, and slicing |
examples/cpp/shape.cpp | Shape metadata basics |
Stratax is header-first. Point your target at the repository include directory and compile with C++20 enabled:
The Python examples live under examples/python.
| File | Focus |
|---|---|
examples/python/vector.py | Vector construction, indexing, arithmetic, and slicing |
examples/python/matrix.py | Matrix construction, element access, and operations |
examples/python/tensor.py | Tensor construction, shape-aware access, and slicing |
examples/python/shape.py | Shape metadata basics |
After installing the package, run examples from the repository root:
double container specializations.The Markdown C++ examples are complete programs. Python blocks are independent examples executed in separate processes. The check also runs the four C++ and four Python programs under examples/.
The Python check uses the source package and requires a current extension in python/stratax/. Build it first as described in the getting-started guide. The C++ check needs a GCC/Clang-compatible C++20 compiler; pass --compiler clang++ to select one. On MSVC-only systems use --python for the Python examples and compile C++ examples with the local compiler separately. These checks exercise examples, not every API contract or platform.