OptimalCeilingTier.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* OptimalCeilingTier.cpp
  2. *
  3. * Copyright (C) 2015 David Weenink
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "OptimalCeilingTier.h"
  19. Thing_implement (OptimalCeilingTier, RealTier, 0);
  20. autoOptimalCeilingTier OptimalCeilingTier_create (double tmin, double tmax) {
  21. try {
  22. autoOptimalCeilingTier me = Thing_new (OptimalCeilingTier);
  23. RealTier_init (me.get(), tmin, tmax);
  24. return me;
  25. } catch (MelderError) {
  26. Melder_throw (U"OptimalCeilingTier not created.");
  27. }
  28. }
  29. void OptimalCeilingTier_draw (OptimalCeilingTier me, Graphics g, double tmin, double tmax,
  30. double ymin, double ymax, conststring32 method, bool garnish)
  31. {
  32. RealTier_draw (me, g, tmin, tmax, ymin, ymax, garnish, method, U"Sound pressure (Pa)");
  33. }
  34. autoTableOfReal OptimalCeilingTier_downto_TableOfReal (OptimalCeilingTier me) {
  35. autoTableOfReal thee = RealTier_downto_TableOfReal (me, U"Time (s)", U"Frequency (Hz)");
  36. return thee;
  37. }
  38. /* End of file OptimalCeilingTier.cpp */