Events


Python

In Python, events are provided as NumPy arrays, as described in the EMD and PairwiseEMD sections, and do not need to be directly instantiated.


C++

In C++, there is greater flexibility to use different Event classes. An event class should derive from EventBase, which is templated to take two parameters: the WeightCollection and ParticleCollection. A valid WeightCollection should provide a public value_type that is a floating point type. A valid ParticleCollection should provide a public value_type which is the type of an appropriate Particle object. The PairwiseDistance class should be able to calculate pairwise distances between two ParticleCollection objects by iterating over all pairs of Particles.