Spiking Neuron Network Simulator  1.0
Simulation and training of spiking neuron networks, primarily theta neurons
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
SpikeSet.cs
Go to the documentation of this file.
1 namespace SpikingNeuronNetwork.Lib
2 {
3  using System.Collections.Generic;
4  using System.Linq;
5  using System.Text;
6 
10  public class SpikeSet
11  {
18  public int Id { get; set; }
19 
26  public List<Spike> InputSpikes { get; set; }
27 
34  public List<Spike> OutputSpikes { get; set; }
35 
41  public static string GetSpikeTimesString(IEnumerable<Spike> spikes)
42  {
43  var spikeStringBuilder = new StringBuilder();
44  spikes.ToList().ForEach(x => spikeStringBuilder.AppendLine("\t" + x.Time + "(Neuron: " + x.NeuronIndex + ")"));
45  return spikeStringBuilder.ToString();
46  }
47 
54  public override string ToString()
55  {
56  return "Input Spikes:\n" + GetSpikeTimesString(InputSpikes) + "Output Spikes:\n" + GetSpikeTimesString(OutputSpikes);
57  }
58  }
59 }
static string GetSpikeTimesString(IEnumerable< Spike > spikes)
Gets the spike times string.
Definition: SpikeSet.cs:41
override string ToString()
Returns a System.String that represents this instance.
Definition: SpikeSet.cs:54