Mini-progetto: studio di funzioni

Autore: marco.faella2@unina.it Java

  1. public interface PFunction {
  2. // Returns the number of parameters
  3. int getNParams();
  4. // Sets the value of the i-th parameter to val
  5. void setParam(int i, double val);
  6. // Returns the current value of the i-th parameter
  7. double getParam(int i);
  8. // Returns the name of the i-th parameter
  9. String getParamName(int i);
  10. // Returns the value of this function for the value x
  11. double eval(double x);
  12. }