@Tobias wrote:
I am currently working on a few features for MathNet.Numerics.
For these features I require a Polynomial class implementations for numeric values (basically just an array of double values stored within a class with a bunch of methods and operators for Polynomial operations).
I browsed through MathNet.Numerics and could not find anything mathcing what I look for. From
this post I can see that this is a still requested feature.I have a pretty well imlemented class in my own code that I would like to migrate to MathNet Numerics for that. Where would you propose to put that? I would propose
MathNet.Numerics.Polynomial
as a location. What do you think?Features the class would have:
- Only real values (double[]) are supported (as a first implementation)
- Polynomial operations + - * /
- Method:
Complex[] Roots()
- Method:
Polynomial Differentiate()
- Method:
Polynomial Integrate()
- Static Method:
Polynomial FitFromData(double x)
usage example:
var x = new double[] {5, 4, 3, 0, 2}; var p = new Polynomial(x); p.ToString() // "2 x^3 + 0 x^2 + 3 x^2 + 4 x^1 + 5" var x = new double[] {5, 4, 3, 0, 2}; var p2 = new Polynomial(x, isFlip:true); p2.ToString() // 5 x^3 + 4 x^2 + 3 x^2 + 0 x^1 + 2
Posts: 3
Participants: 2