Reorder states within a system. This function is primarily used for debugging and may be removed from the interface if it is not generally useful.
Arguments
- sys
A
dust_system
object- index
The parameter ordering. For an ungrouped system this is a vector where each element is the parameter index (if element
i
isj
then after reordering thei
th particle will have the state previously used byj
). All elements must lie in[1, n_particles]
, repetition of an index is allowed (so that many new particles may have the state as one old particle). If the system is grouped,index
must be a matrix withn_particles
rows andn_groups
columns, with each column corresponding to the reordering for a group.