@Test public void testEncode() { final Equilateral eq = new Equilateral(3, -1, 1); final double[] d = eq.encode(1); assertEquals(0.8660254037844386, d[0], AIFH.DEFAULT_PRECISION); assertEquals(-0.5, d[1], AIFH.DEFAULT_PRECISION); }
public final double[] encode(final int set) { if (set < 0 || set > this.matrix.length) { throw new AIFHError("Class out of range for equilateral: " + set); } return this.matrix[set]; }
Equilateral implements Serializable { public final double[] encode(final int set) { if (set < 0 || set > this.matrix.length) { throw new AIFHError("Class out of range for equilateral: " + set); } return this.matrix[set]; } }
Equilateral implements Serializable { public final double[] encode(final int set) { if (set < 0 || set > this.matrix.length) { throw new AIFHError("Class out of range for equilateral: " + set); } return this.matrix[set]; } Equilateral(final int count, final double low, final double high); }
Equilateral implements Serializable { public final double[] encode(final int set) { if (set < 0 || set > this.matrix.length) { throw new AIFHError("Class out of range for equilateral: " + set); } return this.matrix[set]; } Equilateral(final int count, final double low, final double high); final int decode(final double[] activations); final double[] encode(final int set); final double getDistance(final double[] data, final int set); }
Equilateral implements Serializable { public final double[] encode(final int set) { if (set < 0 || set > this.matrix.length) { throw new AIFHError("Class out of range for equilateral: " + set); } return this.matrix[set]; } Equilateral(final int count, final double low, final double high); final int decode(final double[] activations); final double[] encode(final int set); final double getDistance(final double[] data, final int set); static final int MIN_EQ; }