public LGPOperatorSet Clone()
        {
            LGPOperatorSet clone = new LGPOperatorSet();

            clone.mWeightSum = mWeightSum;
            foreach (KeyValuePair <LGPOperator, double> point in mOperators)
            {
                clone.mOperators.Add(new KeyValuePair <LGPOperator, double>(point.Key.Clone(), point.Value));
            }

            return(clone);
        }
        public void Copy(LGPProgram rhs)
        {
            mSetup          = rhs.mSetup;
            mFitness        = rhs.mFitness;
            mObjectiveValue = rhs.mObjectiveValue;
            mIsFitnessValid = rhs.mIsFitnessValid;

            mRegisterSet = rhs.mRegisterSet.Clone();
            mOperatorSet = rhs.mOperatorSet.Clone();
            mConstantSet = rhs.mConstantSet.Clone();

            mPop = rhs.mPop;

            for (int i = 0; i < rhs.mInstructions.Count; ++i)
            {
                mInstructions.Add(rhs.mInstructions[i].Clone());
                mInstructions[i].Program = this;
            }
        }
 public LGPProgram(LGPPop pop, LGPOperatorSet operator_set)
 {
     mPop         = pop;
     mOperatorSet = operator_set;
 }