public virtual void Dance(SimpleBee rhs, double[] sides, object constraints) //local search around rhs
        {
            double[] localLowerBounds = mLowerBounds;
            double[] localUpperBounds = mUpperBounds;

            RandomSearch(localLowerBounds, localUpperBounds, constraints);
        }
        public virtual SimpleBee Clone() //factory method
        {
            SimpleBee bee = new SimpleBee(mSwarm, mData.Length, mLowerBounds, mUpperBounds);

            for (int i = 0; i < mData.Length; ++i)
            {
                bee[i] = mData[i];
            }
            bee.mCost = mCost;
            return(bee);
        }
        public BeeSwarm(int _n, int _n1, int _n2, int _m, int _e, CostEvaluationMethod evaluator)
        {
            mScoutBeeCount         = _n;
            mBeeCount_BestPatches  = _n1;
            mBeeCount_ElitePatches = _n2;

            mBestPatchCount  = _m;
            mElitePatchCount = _e;

            mBeeGenerator = () =>
            {
                SimpleBee p = new SimpleBee(this, mLowerBounds.Length, mLowerBounds, mUpperBounds);
                p.Initialize(Constraints);
                return(p as Bee);
            };
            mEvaluator = evaluator;
        }
 public double Evaluate(SimpleBee bee)
 {
     return(mEvaluator(bee));
 }