https://github.com/lezcano/alcp
Computational Algebra Library
https://github.com/lezcano/alcp
Last synced: about 1 year ago
JSON representation
Computational Algebra Library
- Host: GitHub
- URL: https://github.com/lezcano/alcp
- Owner: lezcano
- License: gpl-3.0
- Created: 2016-03-02T14:47:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T00:08:26.000Z (over 9 years ago)
- Last Synced: 2025-02-08T08:47:43.762Z (over 1 year ago)
- Language: C++
- Size: 11.3 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ALCP [](https://travis-ci.org/Lezcano/alcp)
> Classical Computer Algebra Algorithms
## Overview
This library gives a modern, efficient and scalable implementation of algebraic data structures and algorithms on them via the use of templates.
The field and ring classes mimic the integral C++ types. This provides an interface that allows the implementation of algorithms that work for both basic integral types and arbitrary rings.
## Building ALCP
In order to build ALCP you will need [CMake][], a C++14 compiler and
an updated version of the Boost libraries.
In general, you will need to specify a path to a modern C++14 complaint
compiler using the `-DCMAKE_CXX_COMPILER` variable if the default compiler
is too old.
The library also makes use of the Boost libraries for multiprecision
integers support. In the case that boost libraries are not in the path
you will have to specify the path using the `-DBOOST_ROOT` variable.
Gtest 1.8.0 is already provided in the repository. Then it is just a
matter of `cd` to the root directory and setup the build directory
```shell
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/path/to/compiler -DBOOST_ROOT=/path/to/boost
```
The `-DCMAKE_BUILD_TYPE=Release` option will allow to output the highest performance, but it will not check if operations between two elements are compatible (i.e. the elements are in the same field / ring), this might lead into undefined behavior of the library. If we configure the library using just
```shell
cmake ..
```
we will get the version of the library suitable for debugging, that will throw exceptions at runtime if the elements of two operations are not compatible.
We can deactivate the checks passing the argument `-DALCP_NO_CHECKS` to Cmake
## Basic data structures:
Quotient of an ED by a principal ideal: R / \
- Finite field GF(p) = Z / \
- Finite field GF(q) = GF(p)[X] / \
Polynomial ring of an ED: R[X]
- Polynomial ring GF(p)[X]
- Polynomial ring GF(q)[X]
- Polynomial ring Z[X]
## Main algorithms:
- Extended euclides algorithm for an ED
- Chinese remainder algorithm
- Berlekamp
- Cantor-Zassenhaus
- Hensel
- Modular Euclidean algorithm
- BCH codification. General Berlekamp-Massey algorithm. BCH decodification using Berlekamp-Massey
## Misc:
- Addition and multiplication of 63-bit numbers using 64-bit registers - Russian peasant algorithm
- Irreducibility criterion for GF(p)[X]
- Pollard's ρ algorithm for integer factorization
- Discrete logarithm in GF(q) - Pollard's ρ algorithm for logarithms
- Miller-Rabin
# Developers:
This project was developed by [Lezcano](https://github.com/Lezcano) and [damaru2](https://github.com/damaru2)
[CMake]: http://www.cmake.org