A neural network for computing eigenvectors and eigenvalues