1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
package org.rssin.neurons; /** * Created by Jos on 19-5-2015. */ public enum Feedback { Like, Dislike; double toExpectedOutput() { switch(this) { case Like: return 1; case Dislike: return -1; default: throw new IllegalArgumentException(); } } }