Beispiel #1
0
            /// <summary>
            /// Report the values for a certain epoch / iteration to a passed ChartPanel.
            /// </summary>
            /// <param name="valuesByIdentifier">The values by their identifier.</param>
            /// <param name="reportEpochIteration">A boolean indicating whether or not to report the current epoch / iteration.</param>
            /// <param name="epoch">The current epoch.</param>
            /// <param name="iteration">The current iteration.</param>
            protected override void ReportValues(IDictionary <string, object> valuesByIdentifier, bool reportEpochIteration, int epoch, int iteration)
            {
                ChartPanel <TChart, TSeries, TChartValues, TData> chartPanel = (ChartPanel <TChart, TSeries, TChartValues, TData>)ParameterRegistry[ChartPanelIdentifier];

                chartPanel.Add((TData)valuesByIdentifier.Values.First());

                //TODO: multiple values (in same series)
                //ChartPanel.Dispatcher.InvokeAsync(() => ChartPanel.Series.Values.Add(valuesByIdentifier.Values.First()));
            }
Beispiel #2
0
            /// <summary>
            /// Execute the report for every given top.
            /// </summary>
            /// <param name="data">The mapping between the tops specified in the constructor and the score of the top.</param>
            protected override void Report(IDictionary <int, double> data)
            {
                base.Report(data);
                ChartPanel <CartesianChart, LineSeries, ChartValues <double>, double> panel = (ChartPanel <CartesianChart, LineSeries, ChartValues <double>, double>)ParameterRegistry[PanelIdentifier];

                int i = 0;

                foreach (KeyValuePair <int, double> top in data)
                {
                    panel.Add(top.Value * 100, i++);
                }
            }