Giter Site home page Giter Site logo

task3_flattenedmatrix's Introduction

Task3_FlattenedMatrix

A c++ program for flattening a 3 d matrix to a 1d vector.

Code Explaination:

The whole code is encapsulated in MatrixFlatteing class, which has the following methods:

There are two major methods (the required in the task) which are:

ConvertIndex and Create1DVec.

And four minor methods which are:

Fill3DMatrix, Print3D, Print1D, Run.

1- Fill3DMatrix : assigning values in the 3d matrix.

2- Create1DVec : Intializing and filling 1d vector from values in 3d matrix.

3- ConvertIndex : converts the indexes of the 3d matrix to an equivelant index in the 1d vector.

4- ExpectedOut: prints the ExpectedOut.

5- Print1D : prints the 1d vector

6- Run : an algorithm for calling other methods in MatrixFlatteing class for getting the desired task done.  

Testing:

Two test samples are provided in cmake-build-debug directory with the following names: input1.txt, input2.txt, output1.txt, output2.txt.

task3_flattenedmatrix's People

Contributors

abdelhakiem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.