Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_dynMat_example.cc File Reference

Educational examples for dynamic matrices with automatic resizing. More...

#include <iostream>
#include <tpl_dynMat.H>
Include dependency graph for tpl_dynMat_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Educational examples for dynamic matrices with automatic resizing.

WHAT IS DYNMATRIX?

2D matrix that automatically grows as needed Sparse storage: Only allocated cells consume memory Perfect for dynamic graphs, adjacency matrices, distance tables

KEY FEATURES:

  • Automatic resizing (no need to pre-allocate)
  • Sparse storage (unwritten cells = zero)
  • Row/column operations
  • Matrix arithmetic

WHEN TO USE:

  • Don't know matrix size in advance
  • Matrix is mostly zeros (sparse)
  • Need dynamic growth during computation
  • Building adjacency/distance matrices

COMPILE & RUN:

g++ -std=c++20 -I.. -o tpl_dynMat_example tpl_dynMat_example.cc ./tpl_dynMat_example

Definition in file tpl_dynMat_example.cc.

Function Documentation

◆ main()

int main ( )