polyfactor is an open source, lightweight library whose main purpose is to solve polynomial factorization problem over
Notes: Currently, only factorization of univariate polynomials over
Implemented factorization methods:
- Berlekamp
- Cantor-Zassenhaus
- Kaltofen-Shoup
polyfactor library can be used in any .NET project that targets .net standard 2.0 or .net 6.0.
But the easiest way to use polyfactor library - Jupyter Notebook and JupyterLab notebooks.
easiest way:
.net 6:
using polyfactor.Extensions;
var factors = "x^100+1".Factor(5);.net standard 2.0:
using polyfactor.Extensions;
namespace polyfactorExample
{
class Program
{
static void Main(string[] args)
{
var factors = "x^100+1".Factor(5);
}
}
}little more detail:
.net 6:
using polyfactor.GaloisStructs;
// create galois field GF(5)
var gf = new GF(5);
// create polynomial over GF(5)
var pol = new GFPoly(gf, "x^100+1");
// apply factorization to the pol
var factors = pol.Factor();.net standard 2.0:
using polyfactor.GaloisStructs;
namespace polyfactorExample
{
class Program
{
static void Main(string[] args)
{
// create galois field GF(5)
var gf = new GF(5);
// create polynomial over GF(5)
var pol = new GFPoly(gf, "x^100+1");
// apply factorization to the pol
var factors = pol.Factor();
}
}
}The polyfactor is open source library and distributed under MIT license.