amilich / Riemann-Sum

Java Riemann Sum calculator with multiple rules.
2 stars 2 forks source link

import polyfun.Polynomial; #1

Open BigFish90 opened 3 years ago

BigFish90 commented 3 years ago

Hello sir, can you give a reference where we can find the Polynomial class from exemples?

amilich commented 3 years ago

@BigFish90 had been written by a collaborator but not sure if it's open-source; I think it's a relatively basic polynomial class with coefficients and ways to compute points

BigFish90 commented 3 years ago

The problem is that most of all clases from Riemann-Sum repository has reference to Polynomial class from polyfun package. And because it is missing it is impossible to use Riemann-Sum examples. Thank you for understanding.

BigFish90 commented 3 years ago

To resolve the issue, i guess that i found some right solutions:

1) Import library from OSP import org.opensourcephysics.numerics.Polynomial;

2) change from: poly.print(); //and others object from Polynomial class to: System.out.println(poly.toString());

3) change from: poly.getDegree(); to: poly.degree();

4) change from: poly.getCoefficient(v_degs[jj]).getTerms()[0].getTermDouble(); to: poly.getCoefficient()[jj];

5) change from: p.plus(quad_poly); to: p.add(quad_poly);