Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macasteglione/linear-algebra
C++ implementation of common linear algebra operations
https://github.com/macasteglione/linear-algebra
algebra cpp linear-algebra math mathematical-expressions mathematical-modelling mathematical-programming mathematics mathematics-education
Last synced: 12 days ago
JSON representation
C++ implementation of common linear algebra operations
- Host: GitHub
- URL: https://github.com/macasteglione/linear-algebra
- Owner: macasteglione
- License: mit
- Created: 2024-03-07T17:10:33.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-02T17:26:32.000Z (11 months ago)
- Last Synced: 2024-12-14T07:13:35.216Z (2 months ago)
- Topics: algebra, cpp, linear-algebra, math, mathematical-expressions, mathematical-modelling, mathematical-programming, mathematics, mathematics-education
- Language: C++
- Homepage:
- Size: 317 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linear Algebra Operations Library
This library provides a set of basic operations for linear algebra in C++. It includes operations such as vector addition, subtraction, dot product, cross product, vector magnitude, and finding perpendicular vectors.
## Requirements
C++11 or later is required. Tested with C++20, C++17, C++14 and C++11.
## Installation
To use this library in your C++ project, simply include the appropriate header files in your source code and link against the library during compilation.
## Usage
Here's a quick guide on how to use the library:
1. Include the necessary header files in your C++ code:
```cpp
#include "include/vector_operations.hpp"
```2. Perform vector operations using the provided functions:
```cpp
Vector2 v1(1, 2);
Vector2 v2(3, 4);
Vector2 result = add(v1, v2);
std::cout << "Addition of vectors: " << result.toString() << '\n';
```3. Make sure to compile your code with the library linked properly.
```shell
g++ main.cpp src/*.cpp -o bin/main
```