Class Trait_fonction

Class Trait_fonction

java.lang.Object
   |
   +----Trait_fonction

public class Trait_fonction
extends Object
class made to evaluate a function of t, it s instanciated in an item of class Point_courbe
Version:
1.0 02/98
Author:
Stephane Verlet verlet@cadet.esstin.u-nancy.fr
See Also:
Point_courbe

Constructor Index

 o Trait_fonction(String, double)

Method Index

 o COS(String)
 o dirac(String)
 o eval(Double)
handle the evaluation
 o random()
 o recherche_chif_prec(String, int)
reshearch for the previous number in the string
 o recherche_chif_suiv(String, int)
reshearch for the following number in the string
 o recherche_parenthese(String, int)
reshearch for the next ')' of the same level
 o RECT(String)
 o replace_fonct(String)
recursive fonction which evaluate the value represented by a String
 o replace_t(Double)
replace t by it s value
 o SIN(String)
 o SINC(String)
 o TRI(String)

Constructors

 o Trait_fonction
  public Trait_fonction(String fct,
                        double per)

Methods

 o eval
  public double eval(Double t)
handle the evaluation
Parameters:
t - : poit where the evaluation is performed
Returns:
double : value of the function at t
 o replace_t
  public String replace_t(Double t)
replace t by it s value
 o replace_fonct
  public String replace_fonct(String fct)
recursive fonction which evaluate the value represented by a String
Parameters:
fct - string to evaulate
Returns:
evaluation on a string form
 o recherche_parenthese
  public int recherche_parenthese(String str,
                                  int deb)
reshearch for the next ')' of the same level
Parameters:
str - string to shearch in
deb - point to start the shearch from
Returns:
int index
 o recherche_chif_prec
  public int recherche_chif_prec(String fct,
                                 int i)
reshearch for the previous number in the string
Parameters:
fct - string to shearch in
i - point to start the shearch from
Returns:
int index
 o recherche_chif_suiv
  public int recherche_chif_suiv(String fct,
                                 int i)
reshearch for the following number in the string
Parameters:
fct - string to shearch in
i - point to start the shearch from
Returns:
int index
 o SIN
  public String SIN(String fct)
 o COS
  public String COS(String fct)
 o RECT
  public String RECT(String fct)
 o TRI
  public String TRI(String fct)
 o SINC
  public String SINC(String fct)
 o random
  public String random()
 o dirac
  public String dirac(String fct)