コード例 #1
0
  public void submit(VisualizerData data) {
    if (destroyed) {
      return;
    }

    if (data instanceof CorrectValue) {
      correctResult = ((CorrectValue) data).correctValue;
    } else if (data instanceof NewResult) {
      IntegrationResult result = ((NewResult) data).result;
      synchronized (resultList) {
        if (calls < 100 || result.functionCalls() >= calls * SAMPLEFACTOR) {
          calls = result.functionCalls();
          resultList.add(new ResultEntry(calls, result.value(), result.errorEstimate()));
          resultPanel.repaint();
        }
        estimator.log(result.functionCalls(), result.value());
      }
    }
  }