public void testAnalyze() {
   BasicNetwork network = EncogUtility.simpleFeedForward(2, 2, 0, 1, false);
   double[] weights = new double[network.encodedArrayLength()];
   EngineArray.fill(weights, 1.0);
   network.decodeFromArray(weights);
   AnalyzeNetwork analyze = new AnalyzeNetwork(network);
   Assert.assertEquals(weights.length, analyze.getWeightsAndBias().getSamples());
   Assert.assertEquals(3, analyze.getBias().getSamples());
   Assert.assertEquals(6, analyze.getWeights().getSamples());
 }
  /** Finalize the structure of this Bayesian network. */
  public void finalizeStructure() {
    for (BayesianEvent e : this.eventMap.values()) {
      e.finalizeStructure();
    }

    if (this.query != null) {
      this.query.finalizeStructure();
    }

    this.inputPresent = new boolean[this.events.size()];
    EngineArray.fill(this.inputPresent, true);
    this.classificationTarget = -1;
  }
 /** Clear the weight matrix. */
 public void clearMatrix() {
   EngineArray.fill(this.hopfield.getWeights(), 0);
 }