public void GetResult() { var network = new HopfieldNetwork(); network.Train(new Dictionary <string, string> { { "1", Pattern1 }, { "2", Pattern2 } }); var result = network.GetResult(Pattern1); Assert.AreEqual(Pattern1, result); }
public void EvaluateEnergyFunctionTest() { var network = new HopfieldNetwork(); network.Train(new Dictionary <string, string> { { "1", Pattern1 }, { "2", Pattern2 } }); var energyState = network.CurrentEnergyState; network.GetResult(Pattern3); Assert.IsTrue(network.CurrentEnergyState <= energyState); }