Spike Function() implementation