Beispiel #1
0
 def typeParameters():
     d = DifferentialEvolution.typeParameters()
     d['F_l'] = lambda x: isinstance(x, (float, int)) and x > 0
     d['F_u'] = lambda x: isinstance(x, (float, int)) and x > 0
     d['Tao1'] = lambda x: isinstance(x, (float, int)) and 0 <= x <= 1
     d['Tao2'] = lambda x: isinstance(x, (float, int)) and 0 <= x <= 1
     return d
Beispiel #2
0
	def typeParameters():
		r"""Get dictionary with functions for checking values of parameters.

		Returns:
			Dict[str, Callable]:
				* NoLsTests (Callable[[int], bool]): TODO
				* NoLs (Callable[[int], bool]): TODO
				* NoEnabled (Callable[[int], bool]): TODO

		See Also:
			:func:`NiaPy.algorithms.basic.de.DifferentialEvolution.typeParameters`
		"""
		d = DifferentialEvolution.typeParameters()
		d.update({
			'NoLsTests': lambda x: isinstance(x, int) and x >= 0,
			'NoLs': lambda x: isinstance(x, int) and x >= 0,
			'NoEnabled': lambda x: isinstance(x, int) and x > 0
		})
		return d
Beispiel #3
0
    def typeParameters():
        r"""Get dictionary with functions for checking values of parameters.

		Returns:
			Dict[str, Callable]:
				* F_l (Callable[[Union[float, int]], bool])
				* F_u (Callable[[Union[float, int]], bool])
				* Tao1 (Callable[[Union[float, int]], bool])
				* Tao2 (Callable[[Union[float, int]], bool])

		See Also:
			* :func:`NiaPy.algorithms.basic.DifferentialEvolution.typeParameters`
		"""
        d = DifferentialEvolution.typeParameters()
        d['F_l'] = lambda x: isinstance(x, (float, int)) and x > 0
        d['F_u'] = lambda x: isinstance(x, (float, int)) and x > 0
        d['Tao1'] = lambda x: isinstance(x, (float, int)) and 0 <= x <= 1
        d['Tao2'] = lambda x: isinstance(x, (float, int)) and 0 <= x <= 1
        return d
Beispiel #4
0
 def typeParameters():
     return DifferentialEvolution.typeParameters()