C++ API referenceΒΆ

class ConvolvedSpikeTrain

A class representing a single-unit spike train for which several helper vectors relating to a Van Rossum-like exponential convolution have been calculated.

Public Functions

ConvolvedSpikeTrain()

Default constructor.

ConvolvedSpikeTrain(std::vector< double > spikes, double tau)

Constructor accepting a spike train.

Parameters
  • spikes -

    A vector of spike times.

  • tau -

    Time scale for the exponential kernel. There is a limit to how small tau can be compared to the absolute value of the spike times. An exception will be raised if this limit is exceeded; its value is system-dependent, but as a rule of thumb tau and the spike times should be within 4 orders of magnitude of each other.

void distance(std::vector< std::vector< ConvolvedSpikeTrain > > & trains, double c, double ** d_matrix)

Compute the square (all-to-all) distance matrix for a set of multi-unit spike trains.

Parameters
  • trains -

    The set of multi unit spike trains.

  • c -

    Cosine of the multi-unit mixing angle. c=0 corresponds to labelled-line code, c=1 to summed-population code.

  • d_matrix -

    The trains.size() x trains.size() matrix where the results will be written.

void distance(std::vector< std::vector< ConvolvedSpikeTrain > > & trains1, std::vector< std::vector< ConvolvedSpikeTrain > > & trains2, double c, double ** d_matrix)

Compute the rectangular (bipartite) distance matrix between two sets of multi-unit spike trains.

Parameters
  • trains1trains2 -

    The sets of multi unit spike trains.

  • c -

    Cosine of the multi-unit mixing angle. c=0 corresponds to labelled-line code, c=1 to summed-population code.

  • d_matrix -

    The trains1.size() x trains2.size() matrix where the results will be written.

void inner_product(std::vector< std::vector< ConvolvedSpikeTrain > > & trains, double c, double ** g_matrix)

Compute the square (all-to-all) inner product matrix for a set of multi-unit spike trains.

Parameters
  • trains -

    The set of multi unit spike trains.

  • c -

    Cosine of the multi-unit mixing angle. c=0 corresponds to labelled-line code, c=1 to summed-population code.

  • g_matrix -

    The trains.size() x trains.size() matrix where the results will be written.

void inner_product(std::vector< std::vector< ConvolvedSpikeTrain > > & trains1, std::vector< std::vector< ConvolvedSpikeTrain > > & trains2, double c, double ** g_matrix)

Compute the rectangular (bipartite) inner product matrix between two sets set of multi-unit spike trains.

Parameters
  • trains1trains2 -

    The sets of multi unit spike trains.

  • c -

    Cosine of the multi-unit mixing angle. c=0 corresponds to labelled-line code, c=1 to summed-population code.

  • g_matrix -

    The trains1.size() x trains2.size() matrix where the results will be written.