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)); }
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); }
public void init(ref PSOContext Context) { myContext = Context; targetPoint = new Point(Width / 2, Height / 2); }