GithubHelp home page GithubHelp logo

linear-algebra's Introduction

Linear Algebra Library

Gitter

This library hosts C++ implementation of some of the routines which are most frequently encountered in Linear Algebra.

Installation

The project can be configured using CMake. The steps for the same are given below:

  • Create a directory where you want the binaries to build. Let's call it the build directory.
mkdir build
  • Change the working directory to the build directory and run CMake as follows:
cd build
cmake ..
  • After the configuration is complete, the Makefile is generated inside the build directory. You can now compile the project and run the executable as follows:
make
./LinearAlgebra

How to Contribute

Each new module should go into a different directory whose name must be synonymous with the module functionality.

Let us suppose, you want to add a module for Singular Value Decomposition (S.V.D.) and you have implemented two files for this purpose: svd.h and svd.cpp. Both these files should reside inside a separate directory named svd which would also contain a CMakeLists.txt. Add the follwing line to the CMakeLists.txtresiding inside the module directory :

add_library(SVD svd.cpp)

This instruction tells CMake to build a library from the function implementations in svd.cpp.

To make use of this library, we add a few statements to the top level CMakeLists.txt file, which are given below:

include_directories("${PROJECT_SOURCE_DIR}/svd")
add_subdirectory(svd)

The include_directory() command tells CMake to look inside the svd directory for the header files for this library and the add_subdirectory() call ensures that the svd library gets built.

The final step would be to add (link) the library with the executable where it's actually being used. Say, you want to reference some functions from the svd module in main.cpp. Adding the following line to the top level CMakeLists.txt serves this purpose:

# LinearAlgebra is the name of the executable built from main.cpp
# SVD is the name of the executable built from the library modules
target_link_libraries(LinearAlgebra SVD)

The module is now ready to be used with main.cpp with the inclusion of a simple #include "svd.h"

linear-algebra's People

Contributors

samyak-268 avatar abkds avatar gitter-badger avatar

Watchers

James Cloos avatar  avatar  avatar

linear-algebra's Issues

Incorporating gaussj_AbKDs.cpp into gaussj.cpp

The Gauss-Jordan elimination method implemented in gaussj_AbKDs.cpp should be incorporated within gaussj.h and gaussj.cpp. Try to re-use as many features already implemented in the module as possible to avoid potential re-inventing the wheel.

Also, double comparison should be modified to use numeric_limits<double>::epsilon() in <limits> header.

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.