public void fireSeriesChanged() { if(fireSeriesChanged) super.fireSeriesChanged(); } }
/** * Removes all data items from the series and sends a * {@link SeriesChangeEvent} to all registered listeners. */ public void clear() { if (this.data.size() > 0) { this.data.clear(); this.minX = Double.NaN; this.maxX = Double.NaN; this.minY = Double.NaN; this.maxY = Double.NaN; fireSeriesChanged(); } }
/** * Removes all data items from the series and sends a * {@link SeriesChangeEvent} to all registered listeners. */ public void clear() { if (this.data.size() > 0) { this.data.clear(); this.minX = Double.NaN; this.maxX = Double.NaN; this.minY = Double.NaN; this.maxY = Double.NaN; fireSeriesChanged(); } }
/** * Deletes a range of items from the series and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param start the start index (zero-based). * @param end the end index (zero-based). */ public void delete(int start, int end) { this.data.subList(start, end + 1).clear(); findBoundsByIteration(); fireSeriesChanged(); }
/** * Deletes a range of items from the series and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param start the start index (zero-based). * @param end the end index (zero-based). */ public void delete(int start, int end) { this.data.subList(start, end + 1).clear(); findBoundsByIteration(); fireSeriesChanged(); }
/** * Removes the item at the specified index and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param index the index. * * @return The item removed. */ public XYDataItem remove(int index) { XYDataItem removed = (XYDataItem) this.data.remove(index); updateBoundsForRemovedItem(removed); fireSeriesChanged(); return removed; }
/** * Removes the item at the specified index and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param index the index. * * @return The item removed. */ public XYDataItem remove(int index) { XYDataItem removed = (XYDataItem) this.data.remove(index); updateBoundsForRemovedItem(removed); fireSeriesChanged(); return removed; }
/** * Updates the median reward by episode series. Does nothing if that metric is not being plotted. */ protected void updateMERSeris(){ if(!this.metricsSet.contains(PerformanceMetric.MEDIAN_EPISODE_REWARD)){ return ; } int n = this.curTrial.medianEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ this.curAgentDatasets.medianEpisodeRewardSeries.add((double)i, this.curTrial.medianEpisodeReward.get(i), false); } if(n > this.lastEpisode){ this.curAgentDatasets.medianEpisodeRewardSeries.fireSeriesChanged(); } }
/** * Updates the cumulative steps by episode series. Does nothing if that metric is not being plotted. */ protected void updateCSESeries(){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_STEPS_PER_EPISODE)){ return ; } int n = this.curTrial.cumulativeStepEpisode.size(); for(int i = this.lastEpisode; i < n; i++){ this.curAgentDatasets.cumulativeStepEpisodeSeries.add((double)i, this.curTrial.cumulativeStepEpisode.get(i), false); } if(n > this.lastEpisode){ this.curAgentDatasets.cumulativeStepEpisodeSeries.fireSeriesChanged(); } }
/** * Updates the cumulative reward by step series. Does nothing if that metric is not being plotted. */ protected void updateCSRSeries(){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_REWARD_PER_STEP)){ return ; } int n = this.curTrial.cumulativeStepReward.size(); for(int i = this.lastTimeStepUpdate; i < n; i++){ this.curAgentDatasets.cumulativeStepRewardSeries.add((double)i, this.curTrial.cumulativeStepReward.get(i), false); } if(n > this.lastTimeStepUpdate){ this.curAgentDatasets.cumulativeStepRewardSeries.fireSeriesChanged(); } }
/** * Updates the cumulative reward by episode series. Does nothing if that metric is not being plotted. */ protected void updateCERSeries(){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_REWARD_PER_EPISODE)){ return ; } int n = this.curTrial.cumulativeEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ this.curAgentDatasets.cumulativeEpisodeRewardSeries.add((double)i, this.curTrial.cumulativeEpisodeReward.get(i), false); } if(n > this.lastEpisode){ this.curAgentDatasets.cumulativeEpisodeRewardSeries.fireSeriesChanged(); } }
/** * Updates the steps by episode series. Does nothing if that metric is not being plotted. */ protected void updateSESeries(){ if(!this.metricsSet.contains(PerformanceMetric.STEPS_PER_EPISODE)){ return ; } int n = this.curTrial.stepEpisode.size(); for(int i = this.lastEpisode; i < n; i++){ this.curAgentDatasets.stepEpisodeSeries.add((double)i, this.curTrial.stepEpisode.get(i), false); } if(n > this.lastEpisode){ this.curAgentDatasets.stepEpisodeSeries.fireSeriesChanged(); } }
/** * Updates the average reward by episode series. Does nothing if that metric is not being plotted. */ protected void updateAERSeris(){ if(!this.metricsSet.contains(PerformanceMetric.AVERAGE_EPISODE_REWARD)){ return ; } int n = this.curTrial.averageEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ this.curAgentDatasets.averageEpisodeRewardSeries.add((double)i, this.curTrial.averageEpisodeReward.get(i), false); } if(n > this.lastEpisode){ this.curAgentDatasets.averageEpisodeRewardSeries.fireSeriesChanged(); } }
/** * Updates the cumulative reward by step series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateCSRSeries(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_REWARD_PER_STEP)){ return ; } int n = agentData.getLatestTrial().cumulativeStepReward.size(); for(int i = this.lastTimeStepUpdate; i < n; i++){ agentData.datasets.cumulativeStepRewardSeries.add((double)i, agentData.getLatestTrial().cumulativeStepReward.get(i), false); } if(n > this.lastTimeStepUpdate){ agentData.datasets.cumulativeStepRewardSeries.fireSeriesChanged(); } }
/** * Updates the steps by episode series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateSESeries(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.STEPS_PER_EPISODE)){ return ; } int n = agentData.getLatestTrial().stepEpisode.size(); for(int i = this.lastEpisode; i < n; i++){ agentData.datasets.stepEpisodeSeries.add((double)i, agentData.getLatestTrial().stepEpisode.get(i), false); } if(n > this.lastEpisode){ agentData.datasets.stepEpisodeSeries.fireSeriesChanged(); } }
/** * Updates the cumulative reward by episode series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateCERSeries(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_REWARD_PER_EPISODE)){ return ; } int n = agentData.getLatestTrial().cumulativeEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ agentData.datasets.cumulativeEpisodeRewardSeries.add((double)i, agentData.getLatestTrial().cumulativeEpisodeReward.get(i), false); } if(n > this.lastEpisode){ agentData.datasets.cumulativeEpisodeRewardSeries.fireSeriesChanged(); } }
/** * Updates the average reward by episode series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateAERSeris(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.AVERAGE_EPISODE_REWARD)){ return ; } int n = agentData.getLatestTrial().averageEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ agentData.datasets.averageEpisodeRewardSeries.add((double)i, agentData.getLatestTrial().averageEpisodeReward.get(i), false); } if(n > this.lastEpisode){ agentData.datasets.averageEpisodeRewardSeries.fireSeriesChanged(); } }
/** * Updates the cumulative steps by episode series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateCSESeries(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.CUMULATIVE_STEPS_PER_EPISODE)){ return ; } int n = agentData.getLatestTrial().cumulativeStepEpisode.size(); for(int i = this.lastEpisode; i < n; i++){ agentData.datasets.cumulativeStepEpisodeSeries.add((double)i, agentData.getLatestTrial().cumulativeStepEpisode.get(i), false); } if(n > this.lastEpisode){ agentData.datasets.cumulativeStepEpisodeSeries.fireSeriesChanged(); } }
/** * Updates the median reward by episode series. Does nothing if that metric is not being plotted. * @param agentData the agent dataset */ protected void updateMERSeris(DatasetsAndTrials agentData){ if(!this.metricsSet.contains(PerformanceMetric.MEDIAN_EPISODE_REWARD)){ return ; } int n = agentData.getLatestTrial().medianEpisodeReward.size(); for(int i = this.lastEpisode; i < n; i++){ agentData.datasets.medianEpisodeRewardSeries.add((double)i, agentData.getLatestTrial().medianEpisodeReward.get(i), false); } if(n > this.lastEpisode){ agentData.datasets.medianEpisodeRewardSeries.fireSeriesChanged(); } }
private void updateInsertData(int row0, int row1, int offset) { ChartModel model = this.model; XYSeriesCollection series = getCategory(); for (int col = 0; col < series.getSeriesCount(); col++) { XYSeries xyseries = series.getSeries(col); for (int row = row0; row <= row1; row++) { xyseries.add(row, model.getValueAt(row, col), false); } xyseries.fireSeriesChanged(); } }