Matrix_def.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Matrix_def.h
  2. *
  3. * Copyright (C) 1992-2005,2008,2011-2013,2015-2018 Paul Boersma
  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. #define ooSTRUCT Matrix
  19. oo_DEFINE_CLASS (Matrix, SampledXY)
  20. #if oo_READING
  21. if (Melder_debug == 45)
  22. Melder_casual (U"structMatrix :: read:"
  23. U" Going to read ", our ny, U" rows"
  24. U" of ", our nx, U" columns.");
  25. oo_VERSION_UNTIL (2)
  26. oo_obsoleteMAT32 (z, ny, nx)
  27. oo_VERSION_ELSE
  28. oo_MAT (z, ny, nx)
  29. oo_VERSION_END
  30. #else
  31. oo_MAT (z, ny, nx)
  32. #endif
  33. #if oo_DECLARING
  34. void v_info ()
  35. override;
  36. bool v_hasGetNrow ()
  37. override { return true; }
  38. double v_getNrow ()
  39. override { return ny; }
  40. bool v_hasGetNcol ()
  41. override { return true; }
  42. double v_getNcol ()
  43. override { return nx; }
  44. bool v_hasGetMatrix ()
  45. override { return true; }
  46. double v_getMatrix (integer irow, integer icol)
  47. override;
  48. bool v_hasGetFunction2 ()
  49. override { return true; }
  50. double v_getFunction2 (double x, double y)
  51. override;
  52. double v_getValueAtSample (integer sampleNumber, integer level, int unit)
  53. override;
  54. #endif
  55. oo_END_CLASS (Matrix)
  56. #undef ooSTRUCT
  57. /* End of file Matrix_def.h */