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); } }
public FireflyParticle(EFunction functionType) { Alpha = 1.0d; Position = new double[Parameters.DIMENSION_AMOUNT]; if (function == null) { FireflyParticle.functionType = functionType; function = AbstractFunction.InstanceFunction(functionType); } }
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); } }