Move gmx_ana_pos_t::g into gmx_ana_indexmap_t.
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 27 Aug 2013 16:14:38 +0000 (19:14 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 8 Sep 2013 18:47:13 +0000 (20:47 +0200)
commit52f3ce64c86523f887bd129139d4c605131aafc1
treee35e605514474ab790013278ccb31c09fd123abb
parent08b94180da2038b8d46a4273dc2064c24029a1a9
Move gmx_ana_pos_t::g into gmx_ana_indexmap_t.

Instead of storing a gmx_ana_index_t structure by reference in the
positions, embed this information in the index mapping structure, as
that is really what it is required for.  This localizes the
responsibility of maintaining that state better, and allows removing
code that was there just to provide such an artificial group structure.
The logic still remains mostly the same: the array of atoms is still
stored by reference instead of copying where possible.

This also makes it simpler to handle cases where the output atoms from
the mapping would actually not equal the input group (e.g., that they
would need to be in a different order).

Prerequisite for #1221.

Change-Id: I9e3e0455d1129fd6c3dd8056b2f088114764f331
15 files changed:
src/gromacs/selection/compiler.cpp
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/indexutil.h
src/gromacs/selection/poscalc.cpp
src/gromacs/selection/position.cpp
src/gromacs/selection/position.h
src/gromacs/selection/selection.cpp
src/gromacs/selection/selection.h
src/gromacs/selection/sm_distance.cpp
src/gromacs/selection/sm_insolidangle.cpp
src/gromacs/selection/sm_merge.cpp
src/gromacs/selection/sm_permute.cpp
src/gromacs/selection/sm_position.cpp
src/gromacs/selection/sm_simple.cpp
src/gromacs/selection/tests/poscalc.cpp