swarmrl.observables.director Module API Reference¶
Give position and angle.
Director
¶
Bases: Observable
, ABC
Position in box observable.
Source code in swarmrl/observables/director.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
__init__(particle_type=0)
¶
Constructor for the observable.
Parameters¶
box_length : np.ndarray Length of the box with which to normalize.
Source code in swarmrl/observables/director.py
19 20 21 22 23 24 25 26 27 28 |
|
compute_observable(colloids)
¶
Compute the current state observable for all colloids.
Parameters¶
colloids : List[Colloid] (n_colloids, ) List of all colloids in the system.
Source code in swarmrl/observables/director.py
47 48 49 50 51 52 53 54 55 56 57 58 |
|
compute_single_observable(index, colloids)
¶
Compute the position of the colloid.
Parameters¶
index : int Index of the colloid for which the observable should be computed. other_colloids Other colloids in the system.
Source code in swarmrl/observables/director.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|