Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
----------
swarm : pyswarms.backend.swarms.Swarm
a Swarm instance
bounds : tuple of :code:`np.ndarray` or list (default is :code:`None`)
a tuple of size 2 where the first entry is the minimum bound while
the second entry is the maximum bound. Each array must be of shape
:code:`(dimensions,)`.
bh : pyswarms.backend.handlers.BoundaryHandler
a BoundaryHandler instance
Returns
-------
numpy.ndarray
New position-matrix
"""
return ops.compute_position(swarm, bounds, bh)
----------
swarm : pyswarms.backend.swarms.Swarm
a Swarm instance
bounds : tuple of numpy.ndarray or list
a tuple of size 2 where the first entry is the minimum bound while
the second entry is the maximum bound. Each array must be of shape
:code:`(dimensions,)`.
bh : pyswarms.backend.handlers.BoundaryHandler
a BoundaryHandler instance
Returns
-------
numpy.ndarray
New position-matrix
"""
return ops.compute_position(swarm, bounds, bh)
Parameters
----------
swarm : pyswarms.backend.swarms.Swarm
a Swarm instance
bounds : tuple of :code:`np.ndarray` or list (default is :code:`None`)
a tuple of size 2 where the first entry is the minimum bound while
the second entry is the maximum bound. Each array must be of shape
:code:`(dimensions,)`.
bh : a BoundaryHandler instance
Returns
-------
numpy.ndarray
New position-matrix
"""
return ops.compute_position(swarm, bounds, bh)
----------
swarm : pyswarms.backend.swarms.Swarm
a Swarm instance
bounds : tuple of :code:`np.ndarray` or list (default is :code:`None`)
a tuple of size 2 where the first entry is the minimum bound while
the second entry is the maximum bound. Each array must be of shape
:code:`(dimensions,)`.
bh : pyswarms.backend.handlers.BoundaryHandler
a BoundaryHandler instance
Returns
-------
numpy.ndarray
New position-matrix
"""
return ops.compute_position(swarm, bounds, bh)