예제 #1
0
        /// <summary>
        /// When the form is loaded, <see cref="listIterations"/> is initialized with the iterations available in
        /// <see cref="_stateLogger"/>.
        /// </summary>
        /// <param name="StateLogger">is the data source to be displayed on the form.</param>
        public InspectForm(KpzStateLogger StateLogger)
        {
            InitializeComponent();
            _stateLogger = StateLogger;

            for (int i = 0; i < _stateLogger.Iterations.Count; i++)
            {
                listIterations.Items.Add(i);
            }
        }
예제 #2
0
 /// <summary>
 /// The constructor initializes the parameters of <see cref="Kpz" />, see:
 /// <see cref="GridWidth" />, <see cref="GridHeight" />,
 /// <see cref="_probabilityP" />, <see cref="_probabilityQ" />,
 /// <see cref="StateLogger" />.
 /// </summary>
 public Kpz
 (
     int newGridWidth,
     int newGridHeight,
     double probabilityP,
     double probabilityQ,
     bool enableStateLogger,
     KpzTarget target
 )
 {
     Grid               = new KpzNode[newGridWidth, newGridHeight];
     _probabilityP      = probabilityP;
     _probabilityQ      = probabilityQ;
     _enableStateLogger = enableStateLogger;
     if (_enableStateLogger)
     {
         StateLogger = new KpzStateLogger();
     }
     _kpzTarget = target;
 }