DynamicPolynomials
Multivariate polynomials implementation of commutative and non-commutative variables
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 16 committers (6.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.5%) to scientific vocabulary
Keywords from Contributors
Repository
Multivariate polynomials implementation of commutative and non-commutative variables
Basic Info
Statistics
- Stars: 67
- Watchers: 3
- Forks: 24
- Open Issues: 34
- Releases: 54
Metadata Files
README.md
Dynamic Polynomials
| Build Status | References to cite |
|:----------------:|:----------------------:|
| |
|
|
| |
Sparse dynamic representation of multivariate polynomials that can be used with MultivariatePolynomials (see the documentation there for more information). Both commutative and non-commutative variables are supported. The following types are defined:
Variable{V,M}: A variable which is commutative with*whenV<:Commutative. Commutative variables are created using the@polyvarmacro, e.g.@polyvar x y,@polyvar x[1:8]and non-commutative variables are created likewise using the@ncpolyvarmacro. The type parameterMis the monomial ordering.Monomial{V,M}: A product of variables: e.g.x*y^2.MultivariatePolynomials.Term{T,Monomial{V,M}}: A product between an element of typeTand aMonomial{V,M}, e.g2x,3.0x*y^2.Polynomial{V,M,T}: A sum ofTerm{T,Monomial{V,M}}, e.g.2x + 3.0x*y^2 + y.
All common algebraic operations between those types are designed to be as efficient as possible without doing any assumption on T.
Typically, one imagine T to be a subtype of Number but it can be anything.
This is useful for example in the package PolyJuMP where T is often an affine expression of JuMP decision variables.
The commutativity of T with * is not assumed, even if it is the coefficient of a monomial of commutative variables.
However, commutativity of T and of the variables + is always assumed.
This allows to keep the terms sorted (Graded Lexicographic order is used) in polynomial and measure which enables more efficient operations.
Below is a simple usage example
```julia julia> using DynamicPolynomials
julia> @polyvar x y # assigns x (resp. y) to a variable of name x (resp. y) (x, y)
julia> p = 2x + 3.0x*y^2 + y # define a polynomial in variables x and y y + 2.0x + 3.0xy²
julia> differentiate(p, x) # compute the derivative of p with respect to x 2.0 + 3.0y²
julia> differentiate.(p, (x, y)) # compute the gradient of p (2.0 + 3.0y², 1.0 + 6.0xy)
julia> p((x, y)=>(y, x)) # replace any x by y and y by x 2.0y + x + 3.0x²y
julia> subs(p, y=>x^2) # replace any occurence of y by x^2 2.0x + x² + 3.0x⁵
julia> p(x=>1, y=>2) # evaluate p at [1, 2]
16.0
``
Below is an example with@polyvar x[1:n]`
```julia julia> n = 3;
julia> @polyvar x[1:n] # assign x to a tuple of variables x1, x2, x3 (Variable{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}[x₁, x₂, x₃],)
julia> p = sum(x .* x) # compute the sum of squares x₃² + x₂² + x₁²
julia> subs(p, x[1]=>2, x[3]=>3) # make a partial substitution 13 + x₂²
julia> A = reshape(1:9, 3, 3);
julia> p(x => A * vec(x)) # corresponds to dot(Ax, Ax), need vec to convert the tuple to a vector 194x₃² + 244x₂x₃ + 77x₂² + 100x₁x₃ + 64x₁x₂ + 14x₁² ```
The terms of a polynomial are ordered in increasing monomial order. The default
ordering is the graded lex order but it can be modified using the
monomial_order keyword argument of the @polyvar macro.
We illustrate this below by borrowing the example p. 59 of "Ideals, Varieties and Algorithms"
of Cox, Little and O'Shea:
```julia
julia> p(x, y, z) = 4xy^2z + 4z^2 - 5x^3 + 7x^2*z^2
p (generic function with 1 method)
julia> @polyvar x y z monomial_order = LexOrder (x, y, z)
julia> p(x, y, z) 4z² + 4xy²z + 7x²z² - 5x³
julia> @polyvar x y z (x, y, z)
julia> p(x, y, z) 4z² - 5x³ + 4xy²z + 7x²z²
julia> @polyvar x y z monomial_order = Graded{Reverse{InverseLexOrder}} (x, y, z)
julia> p(x, y, z) 4z² - 5x³ + 7x²z² + 4xy²z ```
Note that, when doing substitution, it is required to give the Variable ordering that is meant.
Indeed, the ordering between the Variable is not alphabetical but rather by order of creation
which can be undeterministic with parallel computing.
Therefore, this order cannot be used for substitution, even as a default (see here for a discussion about this).
Owner
- Name: JuliaAlgebra
- Login: JuliaAlgebra
- Kind: organization
- Repositories: 10
- Profile: https://github.com/JuliaAlgebra
Numerical Algebra
Citation (CITATION.bib)
@software{benoit_legat_2021_5294973,
author = {Benoît Legat and
Sascha Timme and
Tillmann Weisser},
title = {JuliaAlgebra/DynamicPolynomials.jl: v0.3.20},
month = aug,
year = 2021,
publisher = {Zenodo},
version = {v0.3.20},
doi = {10.5281/zenodo.5294973},
url = {https://doi.org/10.5281/zenodo.5294973}
}
GitHub Events
Total
- Create event: 7
- Commit comment event: 6
- Issues event: 6
- Release event: 2
- Watch event: 8
- Issue comment event: 18
- Push event: 25
- Pull request review event: 4
- Pull request review comment event: 3
- Pull request event: 11
- Fork event: 3
Last Year
- Create event: 7
- Commit comment event: 6
- Issues event: 6
- Release event: 2
- Watch event: 8
- Issue comment event: 18
- Push event: 25
- Pull request review event: 4
- Pull request review comment event: 3
- Pull request event: 11
- Fork event: 3
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Benoît Legat | b****t@g****m | 188 |
| Sascha Timme | s****e@g****m | 36 |
| tweisser | t****r@w****e | 3 |
| github-actions[bot] | 4****] | 3 |
| LEAXPS-15\lkape | l****h@y****u | 2 |
| Neven Sajko | s@p****m | 2 |
| Christoph Hansknecht | c****t@g****e | 1 |
| Manuel | m****b@m****e | 1 |
| Marcelo Forets | m****s@g****m | 1 |
| Alexander Demin | 6****1 | 1 |
| Benjamin Desef | p****r | 1 |
| Christopher Rackauckas | a****s@c****m | 1 |
| Julia TagBot | 5****t | 1 |
| Manuel | 5****b | 1 |
| Tim Holy | t****y@g****m | 1 |
| femtocleaner[bot] | f****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 57
- Total pull requests: 85
- Average time to close issues: about 1 month
- Average time to close pull requests: about 1 month
- Total issue authors: 33
- Total pull request authors: 18
- Average comments per issue: 2.7
- Average comments per pull request: 0.96
- Merged pull requests: 77
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 5
- Pull requests: 6
- Average time to close issues: about 17 hours
- Average time to close pull requests: 1 day
- Issue authors: 3
- Pull request authors: 3
- Average comments per issue: 1.4
- Average comments per pull request: 0.5
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- kbarros (5)
- shashi (5)
- David-Berghaus (4)
- blegat (3)
- sumiya11 (3)
- dlfivefifty (3)
- tweisser (3)
- projekter (2)
- matbesancon (2)
- manuelbb-upb (2)
- chriscoey (2)
- ahumenberger (2)
- AayushSabharwal (2)
- mforets (2)
- kaandocal (1)
Pull Request Authors
- blegat (65)
- saschatimme (10)
- github-actions[bot] (4)
- AayushSabharwal (3)
- manuelbb-upb (2)
- sumiya11 (2)
- chrhansk (2)
- asinghvi17 (2)
- projekter (2)
- bmxam (2)
- dlfivefifty (2)
- nsajko (2)
- JuliaTagBot (1)
- shashi (1)
- timholy (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 2,779 total
- Total dependent packages: 26
- Total dependent repositories: 33
- Total versions: 48
juliahub.com: DynamicPolynomials
Multivariate polynomials implementation of commutative and non-commutative variables
- Documentation: https://docs.juliahub.com/General/DynamicPolynomials/stable/
- License: MIT
-
Latest release: 0.6.3
published 7 months ago
Rankings
Dependencies
- JuliaRegistries/TagBot v1 composite
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite