/***************************************************************************
 *                           NeuronPropagationDelayStructure.h             *
 *                           -------------------                           *
 * copyright            : (C) 2015 by Francisco Naveros					   *
 * email                : fnaveros@ugr.es		                           *
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef NEURONPROPAGATIONDELAYSTRUCTURE_H_
#define NEURONPROPAGATIONDELAYSTRUCTURE_H_


class Neuron;
class Interconnection;
class NeuronModelPropagationDelayStructure;

/*!
 * \file NeuronPropagationDelayStructure.h
 *
 * \author Francisco Naveros
 * \date February 2015
 *
 * This file declares a class which define the propagation delay structure for each individual neuron. This
 * structure will be used to groupe the propagation event of different neurons in one single event.
 */
class NeuronPropagationDelayStructure{
	public:

		/*!
		 * \brief For each target OpenMP queue, how many different delays contains the output connection.
		 */
		int * NDifferentDelays;
		
		/*!
		 * \brief For each target OpenMP queue and propagation delay, how many connections have the same propagation delay.
		 */
		int ** NSynapsesWithEqualDelay;

		/*!
		 * \brief For each target OpenMP queue and propagation delay, the propagation delay.
		 */
		double ** SynapseDelay;

		/*!
		 * \brief For each target OpenMP queue and propagation delay, the first output connection.
		 */
		Interconnection*** OutputConnectionsWithEquealDealy;

		/*!
		 * \brief For each target OpenMP queue and propagation delay, which index corresponds with this delay in the 
		 *  NeuronModelPropagationDelayStructure.
		 */
		int ** IndexSynapseDelay;


   		/*!
		 * \brief Default constructor without parameters.
		 */
   		NeuronPropagationDelayStructure(Neuron * neuron);


		/*!
		 * \brief Default destructor.
		 */
   		~NeuronPropagationDelayStructure();


		 /*!
   		 * \brief It computes the value of IndexSynapseDelay
   		 * 
   		 * It adds the connections to the input connections of the target neuron.
   		 */  
		void CalculateOutputDelayIndex(NeuronModelPropagationDelayStructure * PropagationStructure);
   		
 

};
  
#endif /*NEURONPROPAGATIONDELAYSTRUCTURE_H_*/
