Volume Cartographer 2.27.0
|
A simple class for tracking a list of offset vectors ("forces") More...
#include <vc/segmentation/stps/ForceChain.hpp>
Public Types | |
using | Chain = std::vector< Force > |
Public Member Functions | |
ForceChain ()=default | |
Default constructor. | |
ForceChain (Chain c) | |
Constructor with chain initialization. More... | |
auto | operator+= (const ForceChain &rhs) -> ForceChain & |
Add a list of offset vectors to each element in the chain. More... | |
auto | operator*= (const double &rhs) -> ForceChain & |
Multiply each element of chain by a constant scale factor. | |
auto | operator[] (std::size_t i) |
Element access operator. More... | |
auto | operator[] (std::size_t i) const |
Element access operator. More... | |
auto | begin () |
Returns an iterator to the beginning of the chain. More... | |
auto | begin () const |
Returns an iterator to the beginning of the chain. More... | |
auto | end () |
Returns an iterator to the end of the chain. More... | |
auto | end () const |
Returns an iterator to the end of the chain. More... | |
template<class... Args> | |
void | emplace_back (Args &&... args) |
Constructs an element at the end of the chain. More... | |
void | push_back (const Force &val) |
Adds an element to the end of the chain. More... | |
auto | size () -> std::size_t |
Returns the number of elements in the chain. More... | |
auto | size () const -> std::size_t |
Returns the number of elements in the chain. More... | |
void | clear () |
Empties and resets the chain. More... | |
Static Public Member Functions | |
static void | Normalize (ForceChain &c, double alpha=1.0) |
Normalize the magnitude of each Force in the chain. More... | |
Private Attributes | |
Chain | data_ |
A simple class for tracking a list of offset vectors ("forces")
Vectors in this class are assumed to be 3D offsets to the position of elements in a ParticleChain.
Definition at line 23 of file ForceChain.hpp.
using volcart::segmentation::ForceChain::Chain = std::vector<Force> |
Data storage type
Definition at line 27 of file ForceChain.hpp.
|
inlineexplicit |
Constructor with chain initialization.
Definition at line 33 of file ForceChain.hpp.
|
inline |
Returns an iterator to the beginning of the chain.
Definition at line 54 of file ForceChain.hpp.
|
inline |
Returns an iterator to the beginning of the chain.
Definition at line 57 of file ForceChain.hpp.
|
inline |
Empties and resets the chain.
Definition at line 82 of file ForceChain.hpp.
|
inline |
Constructs an element at the end of the chain.
Definition at line 67 of file ForceChain.hpp.
|
inline |
Returns an iterator to the end of the chain.
Definition at line 60 of file ForceChain.hpp.
|
inline |
Returns an iterator to the end of the chain.
Definition at line 63 of file ForceChain.hpp.
|
static |
Normalize the magnitude of each Force in the chain.
alpha | Upper value to which the magnitude is normalized |
auto volcart::segmentation::ForceChain::operator+= | ( | const ForceChain & | rhs | ) | -> ForceChain & |
Add a list of offset vectors to each element in the chain.
Offset vectors are added per element: C1[0] + C2[0]; C1[1] + C2[1]; ...
Throws std::domain_error
if ForceChain size doesn't match the size of this ForceChain.
|
inline |
Element access operator.
Definition at line 48 of file ForceChain.hpp.
|
inline |
Element access operator.
Definition at line 51 of file ForceChain.hpp.
|
inline |
Adds an element to the end of the chain.
Definition at line 73 of file ForceChain.hpp.
|
inline |
Returns the number of elements in the chain.
Definition at line 76 of file ForceChain.hpp.
|
inline |
Returns the number of elements in the chain.
Definition at line 79 of file ForceChain.hpp.
|
private |
Data storage vector
Definition at line 93 of file ForceChain.hpp.