Pitch: Partial Differentiation of multivariate polynomials (link to my SPM package)
- Dominant language
- Swift
- Stars
- 1.9k
- Forks
- 181
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 6
Description
Hey, I already asked in #38 about the scope of _swift-numerics_, but since I have not got a reply yet I keep on pitching some math stuff.
Last summer I wrote [EquationKit](https://github.com/Sajjon/EquationKit)(just gave SPM support to it) which offers multivariate polynomial with support for partial differentiation:
```swift
let polynomial = (3*x + 5*y - 17) * (7*x - 9*y + 23)
print(polynomial) // 21x² + 8xy - 50x - 45y² + 268y - 391)
let number = polynomial.evaluate() {[ x <- 4, y <- 1 ]}
print(number) // 0
let y' = polynomial.differentiateWithRespectTo(x)
print(y') // 42x + 8y - 50
y'.evaluate() {[ x <- 1, y <- 1 ]} // 0
let x' = polynomial.differentiateWithRespectTo(y)
print(x') // 8x - 90y + 268
x'.evaluate() {[ x <- 11.5, y <- 4 ]} // 0
```
Would that fit in here? I saw #42 and would I would mention this.
Contributor guide
Research direction
Start by reading the scope discussion in issues #38 and #42, then review the linked EquationKit package to understand the proposed multivariate-polynomial and partial-differentiation functionality. Done would require an agreed scope and a decision about whether this belongs in swift-numerics; the issue does not identify repository files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100