Analytical formulation for static and temporal patern association : neural architectures and algorithms