An Approach to the design of Space-varying Cellular Neural Networks for Associative Memories