Skip to content

Additional assignment in Odesa I.I. Mechnikov National University (object-oriented programming) – 1st year of study

Notifications You must be signed in to change notification settings

contrub/matrix-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Additional assignment: Matrix Operations

Overview

This additional assignment implements a simple mathematical matrix class in C++. It demonstrates basic matrix operations and OOP concepts, suitable for practice in object-oriented programming.

Features

  • Initialize matrix with custom rows and columns
  • Store data in a 2D vector (std::vector<std::vector<int>>)
  • Transpose the matrix
  • Populate matrix with random integers
  • Access elements using subscript operators
  • Retrieve number of rows and columns
  • Calculate the trace of the matrix (sum of diagonal elements)
  • Support matrix addition, subtraction, multiplication, and scalar multiplication through operator overloading
  • Output matrix in a human-readable format

Technologies Used

  • C++
  • Standard Template Library (STL)
  • Object-Oriented Programming (OOP) principles

How to Build and Run

  1. Clone the repository.

  2. Create a build directory and navigate into it:

mkdir build
cd build
  1. Run CMake to generate the build files:
cmake ..
  1. Build the project:
cmake --build .
  1. Run the executable:
./main

About

Additional assignment in Odesa I.I. Mechnikov National University (object-oriented programming) – 1st year of study

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published