Java8 port of http://www.bdmg.com.ar/wp-content/uploads/2012/06/anfis-manual.pdf