sallam-ahmed / Polynomial-Calculator

Data Structure 2015 Course Project
Apache License 2.0
0 stars 3 forks source link

PolynomialSolver Constructor #7

Closed sallam-ahmed closed 8 years ago

sallam-ahmed commented 8 years ago

The constructor takes a double array of coefficients

Enhance it to take PolynomialClass instead then extract the coeffs. out of it .

khaledkee commented 8 years ago

PolynomialSolver has a constructor that takes a Polynomial class, it's just set to private, see lines 31-37:

private Solver(Polynomial p)
{
    Complex[] _cn = new Complex[p.Count];
    for (int i = 0; i < p.Count; i++)
        _cn[i] = p[i].Coefficient;
    cof = _cn;
}
sallam-ahmed commented 8 years ago

I'll make it public then.