home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 509.lha / ATS_v2.0 / ats.h < prev    next >
C/C++ Source or Header  |  1991-05-06  |  2KB  |  82 lines

  1. //
  2. //    C++ Routines to manipulate Taylor series for solving a differential
  3. //  equation.
  4. //
  5. //  By Dennis J. Darland 
  6. //  10/21/90
  7. //  Public Domain
  8. //  Preliminary version 1.2
  9. //  Many enhancements expected.
  10. //  PROVIDED WITH NO WARRANTY.
  11. //  
  12. #include <stream.h>
  13. #include <my_complex.h>
  14. #include <stdlib.h>
  15. #define MAX_TERMS 60
  16. class t_s
  17.     {
  18.     friend class complex;
  19.     complex terms[MAX_TERMS];
  20.     int alloc_terms;
  21.     int first_term;
  22.     int last_term;
  23.     complex h;
  24.     complex x0;
  25. public:    
  26.      t_s();
  27.     t_s(t_s&);
  28.     ~t_s();
  29. void    set_first(int);
  30. void    set_last(int);
  31. void    set_h(complex);
  32. void    set_x0(complex);
  33. friend    void set_data(t_s&,t_s&);
  34. friend    void set_terms(t_s&,complex*);
  35. void    report_error(int);
  36. friend complex    ats(int,t_s&,t_s&,int);
  37. friend complex    att(int,t_s&,t_s&,int);
  38. friend     int get_last_term(t_s &);
  39. friend     double get_x0(t_s &);
  40. friend     double get_y0(t_s &);
  41. friend t_s operator+(t_s&,t_s&);
  42. friend t_s operator-(t_s&,t_s&);
  43. friend t_s operator*(t_s&,t_s&);
  44. friend t_s operator/(t_s&,t_s&);
  45. t_s &    operator+=(t_s &);
  46. t_s &    operator-=(t_s &);
  47. t_s &  operator=(t_s &);
  48. friend void display(t_s&,int);
  49. friend t_s    deriv(t_s&);
  50. friend void diff_eq(t_s&,t_s&);
  51. friend void higher_diff_eq(t_s&,t_s&,int);
  52. friend void    set_term_from_deriv(int,t_s&,t_s&);
  53. friend void    higher_set_term_from_deriv(int,t_s&,t_s&,int);
  54. friend void    jump(t_s&);
  55. friend void    leap(t_s&,int);
  56. friend void equation(t_s&,t_s&,...);
  57. friend t_s x(t_s &);
  58. friend t_s constant(t_s &,complex);
  59. friend t_s expt(t_s &,t_s &);
  60. friend t_s sqrt(t_s &);
  61. friend t_s exp(t_s &);
  62. friend t_s log(t_s &);
  63. friend t_s sin(t_s &);
  64. friend t_s cos(t_s &);
  65. friend t_s tan(t_s &);
  66. friend t_s sinh(t_s &);
  67. friend t_s cosh(t_s &);
  68. friend t_s tanh(t_s &);
  69. friend t_s asin(t_s &);
  70. friend t_s acos(t_s &);
  71. friend t_s atan(t_s &);
  72. friend complex radius_cp(t_s &,complex & order);
  73. friend complex radius_xx(t_s &,complex & order);
  74. friend void    adjust_h(t_s&,complex);
  75.     };
  76.     
  77.  
  78.  
  79.  
  80.  
  81.  
  82.