An open API service indexing awesome lists of open source software.

https://github.com/nivindulakshitha/array-manipulations

A collection of C++ programs focused on practical operations with arrays, including sorting, hash table creation, moving averages, matrix multiplication, and image processing using filters.
https://github.com/nivindulakshitha/array-manipulations

Last synced: about 2 months ago
JSON representation

A collection of C++ programs focused on practical operations with arrays, including sorting, hash table creation, moving averages, matrix multiplication, and image processing using filters.

Awesome Lists containing this project

README

        

# Array-Manipulations

This project includes a collection of practical exercises using arrays in C++. The exercises focus on sorting, hash table creation, moving averages, matrix multiplication, and image filtering. It is designed for students to gain hands-on experience with array operations as part of the **Programming for Engineers** course at the University of Sri Jayewardenepura.

---

## Table of Contents

- [Features](#features)
- [Exercises](#exercises)
- [Usage](#usage)
- [Requirements](#requirements)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
- [License](#license)

---

## Features

- **Array Sorting**: Ascending and descending order.
- **Hash Table Creation**: Generate a hash table representation of an array.
- **Moving Average**: Calculate moving averages for an array.
- **Matrix Multiplication**: Multiply two user-defined 2x2 matrices.
- **Image Filtering**: Apply a filter to a predefined 10x10 array (image matrix) and compute results.

---

## Exercises

### Exercise 1: Array Manipulation
- Store and process a predefined integer array.
- Implement the following operations:
- Ascending Sort
- Descending Sort
- Hash Table Representation
- Moving Average
- Display Original Array

### Exercise 2: Matrix Multiplication
- Accept two 2x2 matrices as input from the user.
- Perform matrix multiplication and display the result.

### Exercise 3: Image Filtering
- Work with a predefined 10x10 integer array (`img`).
- Allow the user to input a 2x2 filter matrix.
- Apply the filter to `img` and calculate a resulting 9x9 matrix (`rarr`).
- Demonstrate results with example filter matrices.

---

## Usage

1. Clone the repository:
```bash
git clone https://github.com/yourusername/Array-Manipulations.git
cd Array-Manipulations
```

2. Compile the program using a C++ compiler (e.g., `g++`):
```bash
g++ main.cpp -o main
```

3. Run the executable:
```bash
./main
```

4. Follow the prompts to interact with the program.

---

## Requirements

- C++11 or later
- GCC, Clang, or MinGW compiler
- A terminal or IDE (e.g., VS Code, CLion)

---

## Project Structure

```
.
├── 01.cpp
├── 02.cpp
├── 03.cpp
└── README.md
```

---

## Contributing

Contributions to improve or extend the project are welcome! Follow these steps to contribute:

1. Fork the repository.
2. Create a new branch for your changes.
3. Commit your changes and push them to your branch.
4. Open a pull request.

---

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---

## Acknowledgments

- Developed for the **Programming for Engineers** course at the **University of Sri Jayewardenepura**.
- Guided by the **Department of Computer Engineering**.