Network.h 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef _Network_h_
  2. #define _Network_h_
  3. /* Network.h
  4. *
  5. * Copyright (C) 2009,2011-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 "Table.h"
  21. #include "Network_enums.h"
  22. #include "Network_def.h"
  23. void Network_init (Network me,
  24. double spreadingRate, kNetwork_activityClippingRule activityClippingRule,
  25. double minimumActivity, double maximumActivity, double activityLeak,
  26. double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
  27. double xmin, double xmax, double ymin, double ymax, integer numberOfNodes, integer numberOfConnections);
  28. autoNetwork Network_create (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
  29. double minimumActivity, double maximumActivity, double activityLeak,
  30. double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
  31. double xmin, double xmax, double ymin, double ymax, integer numberOfNodes, integer numberOfConnections);
  32. autoNetwork Network_create_rectangle (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
  33. double minimumActivity, double maximumActivity, double activityLeak,
  34. double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
  35. integer numberOfRows, integer numberOfColumns, bool bottomRowClamped,
  36. double initialMinimumWeight, double initialMaximumWeight);
  37. autoNetwork Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
  38. double minimumActivity, double maximumActivity, double activityLeak,
  39. double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
  40. integer numberOfRows, integer numberOfColumns, bool bottomRowClamped,
  41. double initialMinimumWeight, double initialMaximumWeight);
  42. void Network_addNode (Network me, double x, double y, double activity, bool clamped);
  43. void Network_addConnection (Network me, integer fromNodeNumber, integer toNodeNumber, double weight, double plasticity);
  44. void Network_draw (Network me, Graphics graphics, bool colour);
  45. double Network_getActivity (Network me, integer nodeNumber);
  46. void Network_setActivity (Network me, integer nodeNumber, double activity);
  47. double Network_getWeight (Network me, integer connectionNumber);
  48. void Network_setWeight (Network me, integer connectionNumber, double weight);
  49. void Network_setClamping (Network me, integer nodeNumber, bool clamped);
  50. void Network_zeroActivities (Network me, integer fromNodeNumber, integer toNodeNumber);
  51. void Network_normalizeActivities (Network me, integer fromNodeNumber, integer toNodeNumber);
  52. void Network_spreadActivities (Network me, integer numberOfSteps);
  53. void Network_updateWeights (Network me);
  54. void Network_normalizeWeights (Network me, integer nodeMin, integer nodeMax, integer nodeFromMin, integer nodeFromMax, double newSum);
  55. void Network_setInstar (Network me, double instar);
  56. void Network_setOutstar (Network me, double outstar);
  57. void Network_setWeightLeak (Network me, double weightLeak);
  58. void Network_setActivityLeak (Network me, double activityLeak);
  59. void Network_setShunting (Network me, double shunting);
  60. void Network_setActivityClippingRule (Network me, enum kNetwork_activityClippingRule activityClippingRule);
  61. autoTable Network_nodes_downto_Table (Network me, integer fromNodeNumber, integer toNodeNumber,
  62. bool includeNodeNumbers,
  63. bool includeX, bool includeY, int positionDecimals,
  64. bool includeClamped,
  65. bool includeActivity, bool includeExcitation, int activityDecimals);
  66. void Network_listNodes (Network me, integer fromNodeNumber, integer toNodeNumber,
  67. bool includeNodeNumbers,
  68. bool includeX, bool includeY, int positionDecimals,
  69. bool includeClamped,
  70. bool includeActivity, bool includeExcitation, int activityDecimals);
  71. /* End of file Network.h */
  72. #endif