Email: arielsh49@gmail.com
LinkedIn: https://www.linkedin.com/in/ariel-shamay-78011a2b0
MatrixGraphsOperator extends previous implementations of adjacency matrix-based graphs by introducing extensive operator overloading, enabling arithmetic and logical operations directly on graph structures. This approach allows intuitive and mathematically precise manipulations, such as addition, subtraction, scalar multiplication, and graph comparisons, alongside traditional graph algorithms.
- Adjacency Matrix Representation: Efficient and clear representation of graphs using adjacency matrices.
- Operator Overloading: Includes arithmetic operators (
+,-,+=,-=), comparison operators (==,!=,<,<=,>,>=), increment/decrement operators (++,--), and multiplication operations. - Integration with Graph Algorithms: Supports algorithms for connectivity, cycle detection, bipartiteness checks, and more.
- Robust Exception Handling: Error handling for invalid operations, such as incompatible matrix dimensions.
- Clear Output Operator: Provides clear and readable representations of graphs.
Graph.cpp/Graph.hpp: Implementation of graph structures and overloaded operators.Algorithms.cpp/Algorithms.hpp: Common graph algorithm implementations (connectivity, shortest paths, cycles).Demo.cpp: Demonstrates functionalities and operator usage.Test.cpp: Contains automated unit tests to ensure correctness.
- C++ compiler (
g++recommended)
Clone the repository:
git clone <repository_url>
cd MatrixGraphsOperatorCompile using the provided Makefile:
makeExecute the demonstration:
./demoRun automated unit tests:
make test
./test- C++
- Doctest (Unit testing framework)
- Makefile (Build automation)
Ensure your development environment includes a compatible C++ compiler and standard libraries for successful compilation and execution.