NoulliGrid_def.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* NoulliGrid_def.h
  2. *
  3. * Copyright (C) 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 NoulliPoint
  19. oo_DEFINE_CLASS (NoulliPoint, Function)
  20. oo_INTEGER (numberOfCategories)
  21. oo_VEC (probabilities, numberOfCategories)
  22. oo_END_CLASS (NoulliPoint)
  23. #undef ooSTRUCT
  24. #define ooSTRUCT NoulliTier
  25. oo_DEFINE_CLASS (NoulliTier, Function)
  26. oo_COLLECTION_OF (SortedSetOfDoubleOf, points, NoulliPoint, 0)
  27. oo_END_CLASS (NoulliTier)
  28. #undef ooSTRUCT
  29. #define ooSTRUCT NoulliGrid
  30. oo_DEFINE_CLASS (NoulliGrid, Function)
  31. oo_INTEGER (numberOfCategories)
  32. oo_STRING_VECTOR (categoryNames, numberOfCategories)
  33. oo_COLLECTION_OF (OrderedOf, tiers, NoulliTier, 0)
  34. oo_END_CLASS (NoulliGrid)
  35. #undef ooSTRUCT
  36. /* End of file NoulliGrid_def.h */