### Question:
RBFNetwork implements RegressionAlgorithm, ClassificationAlgorithm { @Override public int computeClassification(final double[] input) { final double[] output = computeRegression(input); return VectorUtil.maxIndex(output); } RBFNetwork(final int theInputCount, final int rbfCount, final int theOutputCount); @Override double[] computeRegression(final double[] input); @Override double[] getLongTermMemory(); void reset(final GenerateRandom rnd); @Override int computeClassification(final double[] input); @Override String toString();  }### Answer:
@Test public void testComputeClassification() { final RBFNetwork network = new RBFNetwork(2, 1, 2); final double[] ltm = { 2.0, 2.0, 5.0, 2.0, 4.0, 3.0, 4.0, 5.0, 6.0}; System.arraycopy(ltm, 0, network.getLongTermMemory(), 0, ltm.length); final double[] x = {1, 2}; final double[] y = network.computeRegression(x); assertEquals(7, y[0], AIFH.DEFAULT_PRECISION); assertEquals(11, y[1], AIFH.DEFAULT_PRECISION); final int cls = network.computeClassification(x); assertEquals(1, cls); }