MeasureTransport / MeasureTransport/MParT
Add slice and condition functions to ConditionalMapBase
Open
@mparno is already working on this.
Since Jul 15, 2022.
enhancement
- Dominant language
- C++
- Stars
- 18
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
In the ConditionalMapBase hierarchy, we should add functions that make it trivial to extract components of the map. We can mimic the functions in eigen and provide:
head(unsigned int n)Given a map T_{1:N}(x_{1:M}), this function will return the first n components: T_{1:n}(x_{1:M})tail(unsigned int n)Returns T_{N-n:N}(x_{1:M})segment(unsigned int startInd, unsigned int n)Returns T_{i:i+n}(x_{1:M})
In addition to these slice functions, we can add a function to define a conditional map by fixing the first n inputs:
given(Kokkos::View<double*> const& xstart)returns a map T_{1:N}(x_{n:M}) where the first x_{1:n} block of the input is fixed to the input argument xstart. Note that this function could be implemented in at least two ways: (1) We can keep the original map object the same, but add another class that concatenatesxstartwith a new values ofx_{n:M}before calling the original map or (2) we could define the conditional map by updating the coefficients of the original map to account for the known value ofxstart. Option (1) is more general and will work for any implementation ofConditionalMapBasewhile option (2) will result in more efficient map evaluations, but requires a more intrusive implementation that may be restricted to theMonotoneComponentclass.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.