示例#1
0
        public static void ClearStaticFields()
        {
            GlobalBest    = 0;
            PositionGBest = null;

            function     = null;
            constriction = null;
        }
示例#2
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);
            }
        }