Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BEGINRELEASENOTES
ENDRELEASENOTES
This is a draft implementation for the
MeasurementND
classes mentioned in #161. In its current form it only implements a two dimensional example, but it should easily scale to other numbers of dimensions as well. It probably has some potential for generalizing theExtraCode
bits slightly for that.In the current form it introduces a
Measurement2D
class that has threestd::array
s internally. One for the central values, one for the covariance matrix and one that stores "meta" information on the dimensions. The dimensions in this case areenum
s (enum class
also works). The meta information stores which dimension corresponds to which stored value and there is functionality to set/get the order of the dimensions. UsingExtraCode
we essentially simply layer a second interface that grants access to the stored values via the dimensions directly. Potentially simpler shown than told:Retrieving the values can be done similarly.
One thing that is not even attempted in the current version is to guard against access with a different dimension enum, e.g. using the above
m
the following works without problemsSince this interface is simply added to the one that is generated, the whole class is also usable without any specific enums.
@paulgessinger does this go into a direction that is useful for ACTS?
TODO: