Code Monkey home page Code Monkey logo

matrix's Introduction

Matrix

How it works

Create Matrix-Structure

The constructor takes int rows and int columns

MatrixStructure<int> matrix = new MatrixStructure<int>(2, 2);

Multiply matrix with integers

var matrix = new MatrixStructure<int>(2, 2);

var newMatrix = matrix * 6;

Multiply matrix with other matrix

MatrixStructure<int> matrix = new MatrixStructure<int>(2, 2);
matrix[0, 0] = 2;
matrix[0, 1] = 2;
matrix[1, 0] = 2;
matrix[1, 1] = 2;

MatrixStructure<int> matrix2 = new MatrixStructure<int>(2, 2);
matrix2[0, 0] = 2;
matrix2[0, 1] = 2;
matrix2[1, 0] = 2;
matrix2[1, 1] = 2;

MatrixStructure<int> result = matrix * matrix2;

Print matrix

MatrixStructure<int> matrix = new MatrixStructure<int>(2, 2);
matrix[0, 0] = 2;
matrix[0, 1] = 2;
matrix[1, 0] = 2;
matrix[1, 1] = 2;

matrix.PrintMatrix();

Output:

2 2 
2 2

matrix's People

Contributors

luckyone-cc 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.