public static void ClearStaticFields() { GlobalBest = 0; PositionGBest = null; function = null; constriction = null; }
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); } }