Code Monkey home page Code Monkey logo

matrixlib's Introduction

MatrixLib

Disclaimer: This is a simple library which I wrote in my spare time to practice setting up a full project on GitHub.

This is a basic header-only matrix library, with basic support for matrix arithmetic operations and compile time support.

CI

Actions Status

Quickstart

To get started, copy both matrixLib.hpp and utils.h into your project and #include "matrixLib.hpp" to start using the library.

Example:

#include <iostream>
#include <vector>

#include "matrixLib.hpp"

int main(int argc, char *argv[]) {

    (void)argc; (void)argv;
    
    constexpr MatrixLib::Matrix<int,3,4> matrixA{{1,2,3,4}, {6,5,4,3}, {1,3,2,5}};
    constexpr MatrixLib::Matrix<int,4,2> matrixB{{1,3}, {2,4}, {3, 5}, {6,2}};
    constexpr MatrixLib::Matrix<int,4,2> matrixC{{0,7}, {1,10}, {13, 12}, {5,2}};

    std::cout << "Matrix A is:\n";
    std::cout << matrixA << std::endl;

    std::cout << "Matrix B is:\n";
    std::cout << matrixB << std::endl;

    std::cout << "Matrix C is:\n";
    std::cout << matrixC << std::endl;

    std::cout << "Matrix B + Matrix C is:\n" << matrixB + matrixC << std::endl;
    std::cout << "Matrix B - Matrix C is:\n" << matrixB - matrixC << std::endl;
    std::cout << "Matrix A * Matrix B is:\n" << matrixA * matrixB << std::endl;

    return EXIT_SUCCESS;
}

Full Documentation

Please refer to doc/MatrixLib.pdf

matrixlib's People

Contributors

timulations 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.