{{ message }}

jonas-lj / Ruffini Public

Library for computations over abstract algebraic structures such as finite fields and polynomial rings.

Switch branches/tags
Nothing to show

Files

Failed to load latest commit information.
Type
Name
Commit time

Ruffini

Computations over algebraic structures in Java made easy.

The Ruffini library is developed to make it easy to implement algorithms in Java involving various algebraic structures such as finite fields, polynomial rings, field extensions etc. The library includes an extensive library of already implemented algorithms such as the Euclidean algorithm, polynomial division etc. to make implementation even easier.

The project is named after the italian mathematician Paolo Ruffini (1765-1822) who, among other things, contributed to group theory and was the first to give a proof (incomplete) that there is no general formula to solve quintic (and higher order) equations.

Built With

The project may be build using maven,

mvn clean install

and the documentation with

Usage

The Ruffini library is organized analogous of how abstract algebra is presented in mathematics. The base of the library are a number of interfaces representing abstract algebraic structures. They are organized in an inheritance hierachy as seen in figure below. Note that E is a generic class, representing the element of the given structure.

As in abstract algebra, an algorithm may be defined for an abstract structure and then be used with any concrete structure satisfying the definition of the abstract structure. As an example, consider the implementation of the Gram-Schmidt process definded over vectors of type V and scalars of type S. Now, this code may be used with any concrete implementations of a vector space over a field.

public class GramSchmidt<V, S, F extends Field<S>> implements Function<List<V>, List<V>> {

private final VectorSpace<V, S, F> vectorSpace;
private final BiFunction<V, V, S> innerProduct;

public GramSchmidt(VectorSpace<V, S, F> V,
BiFunction<V, V, S> innerProduct) {
this.vectorSpace = V;
this.innerProduct = innerProduct;
}

@Override
public List<V> apply(List<V> vectors) {
List<V> U = new ArrayList<>();

Projection<V, S, F> proj = new Projection<>(vectorSpace, innerProduct);

for (V v : vectors) {
for (V u : U) {
V p = proj.apply(v, u);
v = vectorSpace.subtract(v, p);
}
}
return U;
}

}

There are a few demo applications showing some capabilities of the library. They are found in src/main/java/dk/jonaslindstrom/math/demo.

Contributing

If you want to help out developing new features for Ruffini or fix a bug you've stumbled upon, it may be done as follows:

1. Fork the Project
2. Create your Feature Branch (git checkout -b feature/MyFeature)
4. Push to the Branch (git push origin feature/MyFeature)
5. Open a Pull Request

Library for computations over abstract algebraic structures such as finite fields and polynomial rings.

Releases

No releases published

Packages 0

No packages published

•
•