Skip to content
Snippets Groups Projects
Commit a6c318da authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL] Non-const PropertyVector::getComponent().

Allow modification of the component of the specified tuple.
parent f003f778
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,15 @@ public:
return std::vector<PROP_VAL_TYPE>::size() / _n_components;
}
//! Returns the value for the given component stored in the given tuple.
PROP_VAL_TYPE& getComponent(std::size_t tuple_index, std::size_t component)
{
assert(component < _n_components);
assert(tuple_index < getNumberOfTuples());
return this->operator[](tuple_index* getNumberOfComponents() +
component);
}
//! Returns the value for the given component stored in the given tuple.
PROP_VAL_TYPE const& getComponent(std::size_t tuple_index,
std::size_t component) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment