Skip to content
ForceBru edited this page Mar 29, 2016 · 4 revisions

#Matrix Documentation

##Building Matrix

  1. Clone this repo or download the zipfile

    1. Unzip the downloaded file if any
  2. Open console and change directory to where you've got a copy of Matrix

  3. Change directory to Matrix-master: cd Matrix-master

  4. Generate object files and create a library

  5. Run tests (optional)

    cd ../Matrix_test
    $CXX -std=c++0x -L ../Matrix -I ../Matrix main.cpp Tests.cpp -o Test -lMatrix
  6. Use Matrix in your project

    All you need is a header called Matrix.hpp.

    Source file

    // main.cpp
    
    #include <iostream>
    
    #include "Matrix.hpp"
    
    
    int main() {
        Matrix a;
        a.Random();
    
        std::cout << a << '\n';
    
        return 0;
    }

    Compile it

    # if you're still in Matrix/Matrix_tests
    cd ..
    $CXX -I Matrix main.cpp -o main
  7. If you still have questions about how to compile Matrix or link with the library, please have a look at the .travis.yml file.

Clone this wiki locally