Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            myPSOContext = new PSOContext(30, 2, .25, new double[] { swarmView1.Width, swarmView1.Height }, new double[] { 0, 0 });
            swarmView1.init(ref myPSOContext);
            PSOThread = new Thread(new ThreadStart(RunPSO));
        }
Beispiel #2
0
        public SwarmView(ref PSOContext Context)
        {
            InitializeComponent();
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            myContext = Context;
            targetPoint = new Point(Width / 2, Height / 2);
        }
Beispiel #3
0
 public void init(ref PSOContext Context)
 {
     myContext = Context;
     targetPoint = new Point(Width / 2, Height / 2);
 }