General memristor with applications in multilayer neural networks. (July 2018)