RealTier.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _RealTier_h_
  2. #define _RealTier_h_
  3. /* RealTier.h
  4. *
  5. * Copyright (C) 1992-2011,2015,2016,2017 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "AnyTier.h"
  21. #include "Graphics.h"
  22. #include "TableOfReal.h"
  23. #include "Vector.h"
  24. Thing_declare (Interpreter);
  25. /********** class RealPoint **********/
  26. #include "RealTier_def.h"
  27. autoRealPoint RealPoint_create (double time, double value);
  28. /*
  29. Postconditions:
  30. result -> time == time;
  31. result -> value == value;
  32. */
  33. /********** class RealTier **********/
  34. void RealTier_init (RealTier me, double tmin, double tmax);
  35. autoRealTier RealTier_create (double tmin, double tmax);
  36. autoRealTier RealTier_createWithClass (double tmin, double tmax, ClassInfo klas);
  37. /*
  38. Postconditions:
  39. result -> xmin == tmin;
  40. result -> xmax == tmax;
  41. result -> points.size == 0;
  42. */
  43. double RealTier_getValueAtIndex (RealTier me, integer point);
  44. /* No points or 'point' out of range: undefined. */
  45. double RealTier_getValueAtTime (RealTier me, double t);
  46. /* Inside points: linear intrapolation. */
  47. /* Outside points: constant extrapolation. */
  48. /* No points: undefined. */
  49. double RealTier_getMinimumValue (RealTier me);
  50. double RealTier_getMaximumValue (RealTier me);
  51. double RealTier_getArea (RealTier me, double tmin, double tmax);
  52. double RealTier_getMean_curve (RealTier me, double tmin, double tmax);
  53. double RealTier_getMean_points (RealTier me, double tmin, double tmax);
  54. double RealTier_getStandardDeviation_curve (RealTier me, double tmin, double tmax);
  55. double RealTier_getStandardDeviation_points (RealTier me, double tmin, double tmax);
  56. void RealTier_addPoint (RealTier me, double t, double value);
  57. void RealTier_draw (RealTier me, Graphics g, double tmin, double tmax,
  58. double ymin, double ymax, int garnish, conststring32 method, conststring32 quantity);
  59. autoTableOfReal RealTier_downto_TableOfReal (RealTier me, conststring32 timeLabel, conststring32 valueLabel);
  60. void RealTier_interpolateQuadratically (RealTier me, integer numberOfPointsPerParabola, int logarithmically);
  61. autoTable RealTier_downto_Table (RealTier me, conststring32 indexText, conststring32 timeText, conststring32 valueText);
  62. autoRealTier Vector_to_RealTier (Vector me, integer channel, ClassInfo klas);
  63. autoRealTier Vector_to_RealTier_peaks (Vector me, integer channel, ClassInfo klas);
  64. autoRealTier Vector_to_RealTier_valleys (Vector me, integer channel, ClassInfo klas);
  65. autoRealTier PointProcess_upto_RealTier (PointProcess me, double value, ClassInfo klas);
  66. void RealTier_formula (RealTier me, conststring32 expression, Interpreter interpreter, RealTier thee);
  67. void RealTier_multiplyPart (RealTier me, double tmin, double tmax, double factor);
  68. void RealTier_removePointsBelow (RealTier me, double level);
  69. /* End of file RealTier.h */
  70. #endif