コード例 #1
0
        public Bee(EFunction functionType, EBee beeType)
        {
            Position     = new double[Parameters.DIMENSION_AMOUNT];
            this.beeType = beeType;

            if (function == null)
            {
                FoodSourceList   = new List <FoodSource>();
                Bee.functionType = functionType;
                function         = AbstractFunction.InstanceFunction(functionType);
            }
        }
コード例 #2
0
        public FireflyParticle(EFunction functionType)
        {
            Alpha = 1.0d;

            Position = new double[Parameters.DIMENSION_AMOUNT];

            if (function == null)
            {
                FireflyParticle.functionType = functionType;
                function = AbstractFunction.InstanceFunction(functionType);
            }
        }
コード例 #3
0
        public AbstractPSOParticle(EFunction functionType, EConstrictionFactor constrictionType)
        {
            Position = new double[Parameters.DIMENSION_AMOUNT];
            Velocity = new double[Parameters.DIMENSION_AMOUNT];

            if (function == null || constriction == null)
            {
                AbstractPSOParticle.functionType     = functionType;
                AbstractPSOParticle.constrictionType = constrictionType;
                function     = AbstractFunction.InstanceFunction(functionType);
                constriction = AbstractConstrictionFactor.InstanceFunction(constrictionType);
            }
        }