utils.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef __UTILS_H__
  2. #define __UTILS_H__
  3. /*
  4. * utils.h
  5. *
  6. * This file is part of the refactored Izhikevich polychronization model application.
  7. *
  8. * Copyright (C) 2018, Author: G. Trensch
  9. *
  10. * The refactored Izhikevich polychronization model application is free software:
  11. * you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation, either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * It is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this application. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. */
  25. #include "params.h"
  26. #if( __RUN_REFACTORED_VERSION__ )
  27. // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  28. // = F O R W A R D D E C L A R A T I O N S
  29. /// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  30. void ExportConnectionMatrixToFile( const char *pFileName );
  31. void ExportWeightMatrixToFile( const char *pFileName );
  32. void ExportDelayMatrixToFile( const char *pFileName );
  33. void ExportConnectionMatrixWeightAndDelay( const char *pFileName );
  34. void ImportConnectionMatrixFromFile( const char *pFileName );
  35. void ImportWeightMatrixFromFile( const char *pFileName );
  36. void ImportDelayMatrixFromFile( const char *pFileName );
  37. void RecordNetworkActivityToFile( const char *pFileName, int simulationSecond, int numFirings );
  38. void RecordRandomStimulusToFile( const char *pFileName, int simTimeSecond, int simTimeMillisecond, int inputNeuron );
  39. int GetNextExternalStimulusFromFile( const char *pFileName, int simTimeSecond, int t );
  40. int GetDelayOfConnection( int preSynNeuron, int synapse );
  41. void DeleteFile( const char *pFileName );
  42. void PrintMatrixOfPostSynapticNeurons();
  43. void PrintMatrixOfSynapticWeights();
  44. void PrintMatrixOfSynapticDelays();
  45. // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  46. // = M A C R O D E F I N I T I O N S
  47. // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  48. #define SIZE_OF_ENTRY_NEURON (int)(5)
  49. #define SIZE_OF_ENTRY_WEIGHT (int)(11)
  50. #define SIZE_OF_ENTRY_DELAY (int)(11)
  51. #endif // __RUN_REFACTORED_VERSION__
  52. #endif // __UTILS_H__