Skip to content

Latest commit

 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumLA

C++17

NumLA is a scientific computing library designed to be easy-to-use and highly optimized, with a focus on providing a clean and modern interface for students.

Features

  • Matrix and Vector Operations: NumLA provides a comprehensive set of matrix and vector operations, including addition, subtraction, multiplication, and more.
  • Linear Algebra: NumLA includes a variety of linear algebra routines, such as solving linear systems using Gaussian elimination, Gauss-Jordan elimination, and LU decomposition. The library is currently in pre-alpha stage, and more features will be added in the future.
  • Performance: NumLA is designed to be efficient and fast, leveraging modern C++ features and optimizations to deliver high performance for scientific computing tasks.
  • Ease of Use: NumLA is designed with a focus on simplicity and ease of use, making it accessible to students and researchers who may not have extensive experience with scientific computing libraries.

Getting Started

Prerequisites

  • A C++17 compatible compiler (e.g., GCC, Clang, MSVC).
  • CMake 3.15 or later.

Using NumLA in your project

The recommended way to use NumLA is to add it as a dependency using CMake's FetchContent module. This will download and configure NumLA automatically.

  1. Create your CMakeLists.txt:

Add the following to your CMakeLists.txt file:

cmake_minimum_required(VERSION 3.15)
project(MyProject LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(FetchContent)
FetchContent_Declare(
    NumLA
    GIT_REPOSITORY https://github.com/baranwalayush/NumLA.git
    GIT_TAG        main 
)
FetchContent_MakeAvailable(NumLA)

add_executable(my_program main.cpp)

target_link_libraries(my_program PRIVATE NumLA::NumLA)
  1. Write your code (main.cpp):

Here is a simple example of how to use NumLA:

#include <iostream>
#include "NumLA/matrix.hpp"

int main() {
   // Create a 2x2 Identity Matrix
   auto I = NumLA::Matrix<double, 2, 2>::Identity();
   std::cout << "Successfully loaded NumLA!\n" << I;
   return 0;
}
  1. Build and Run:
mkdir build
cd build
cmake ..
cmake --build .
./my_program

The directory structure will look like this

my_project/
├── build/
├── CMakeLists.txt    
└── main.cpp             

About

An attempt towards building an easy-to-use and fairly optimized scientific computing library for beginners.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages