Skip to content

spebern/rust-poly

 
 

Repository files navigation

rust-poly

Crates.io

Numeric manipulation of real and complex polynomials.

Note: this crate is still in development and might change in the future.

Basic Goals:

  • addition, subtraction and multiplication of complex and real univariate polynomials
  • long division of complex and real univariate polynomials
  • finding complex roots of polynomials
  • indexing, slicing and iterating
  • from/into traits
  • cross-compatibility with num types and others
    • primitive floats
    • Complex
    • Ratio
    • BigFloat
    • easily implementable traits for custom types

Future Goals:

  • Generating important polynomial sequences
    • Chebyshev type 1 polynomials
    • Chebyshev type 2 polynomials
    • Bessel polynomials
    • Reverse Bessel polynomials
    • Hermite polynomials
    • Lagrange polynomials
    • Bezier polynomials
    • Legendre polynomials
    • more to come...
  • Random integration
  • Real polynomial type
    • Real polynomial factoring
  • Rational functions
    • Simplification
  • Multivariate polynomials
  • Interpolation
  • Integer polynomials
  • Stabilize API
  • no_std support
  • Rayon support
  • Fixed point support
  • SIMD support
  • Make it go fast (fastest polynomial root finder?)
    • use GCD method for determining multiplicity of roots

Non-Goals:

  • Symbolic polynomial manipulation (use a symbolic algebra crate)
  • LAPACK or BLAS integration (compiling shared libraries in a portable way is a pain and I don't want to do it. You're welcome to contribute)

Development

We don't do GitHub actions over here, because I'm a solo developer and actions are expensive.

Automation is performed using nushell scripts found in devops/

Conventional Commits

Commit messages must adhere to the conventional commits specification and additionally to the commitlint conventional config.

Breaking Changes:

  • Any other type that ends in a bang, like feat! or fix!. Note that feat! can also be used to mark removal of features.

Minor Changes:

  • feat: any new functionality that is visible to the user

Patch Changes:

  • fix: a bugfix
  • docs: documentation changes
  • build: changes to build scripts
  • ci: changes to CI pipelines
  • test: adding tests or benchmarks
  • perf: changes that affect performance
  • refactor: major refactoring
  • revert: reverting a change
  • style: stylistic changes
  • chore: any changes that are mostly administrative, e.g. small refactors, code style, comments, semver adjustments, etc...

Changelog

The changelog is generated automatically from commit messages. During the publishing process of a new release, the generated changelog can be manually edited to include additional information or rephrase the changes.

Right now, changelogs are generated with git-cliff. Configurations for how this happens are in cliff.toml.

Releasing a New Version

TODO

Benchmarking

cargo flamegraph --bench bench -- <name-of-bench> --bench

Licensing

This library is covered by the MIT license, see LICENSE.

Parts of the source code are based on the NumPy library for Python, used in accordance to the original license, see licenses/numpy/LICENSE.txt.

The __utils/linalg.rs module is based on the Rulinalg crate, used in accordance to the original license, see licenses/rulinalg/LICENSE.md.

About

Numeric manipulation of real and complex polynomials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.6%
  • Other 0.4%