A simple class for keeping track of a connected chain of Particle objects.
auto begin()
Returns an iterator to the beginning of the chain.
ParticleChain(Chain c)
Constructor with chain initialization.
auto operator[](std::size_t i) const
Element access operator.
auto size() const -> std::size_t
Returns the number of elements in the chain.
auto end() const
Returns an iterator to the end of the chain.
auto size() -> std::size_t
Returns the number of elements in the chain.
void emplace_back(Args &&... args)
Constructs an element at the end of the chain.
std::vector< Particle > Chain
auto end()
Returns an iterator to the end of the chain.
auto operator+=(const ForceChain &rhs) -> ParticleChain &
Add a list of offset vectors to each element in the chain.
void clear()
Empties and resets the chain.
auto operator*=(const double &rhs) -> ParticleChain &
Multiply each element of chain by a constant scale factor.
auto operator[](std::size_t i)
Element access operator.
auto begin() const
Returns an iterator to the beginning of the chain.
void push_back(const Particle &val)
Adds an element to the end of the chain.