Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-10764: Rename Transform::of(first) and Mapping::of(first) to then(next) #19

Merged
merged 2 commits into from Jun 2, 2017

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Jun 1, 2017

and Mapping::over(first) and Frame::over(first) to under(next), to improve readability and match the constructor order of SeriesMap, ParallelMap and CmpFrame.

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm a bit baffled by the over/under names (is there some math reference I'm missing?), but since that predates this ticket it's no reason not to merge.

@return a new CmpFrame
*/
CmpFrame over(Frame const &first) const;
CmpFrame under(Frame const &next) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both names are kind of confusing. Isn't this operation X<1D> + Y<1D> -> XY<2D>? Something like "join" might be more suggestive than "under".

# forward and inverse with a compound map of amap.getInverse().of(amap)
acmp = amapinv.of(amap)
# forward and inverse with a compound map of amap.then(amap.getInverse())
acmp = amap.then(amapinv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more readable! 🙂

Rename `Mapping.of` to `Mapping.then`,
`Mapping.over` to `Mapping.under`
and `Frame.over` to `Frame.under`,
rename the argument from "first" to "next"
and swap the order in which the two mappings or frames
are combined.
This was done to enhance code readability when
mappings are named "xToY", e.g. `aToC = aToB.then(bToC)`
It also matches the order of arguments to `ParallelMap`,
`SeriesMap` and `CmpFrame`.
and swap the arguments, for consistency with `Mapping.then`
@r-owen r-owen merged commit 1dcee5e into master Jun 2, 2017
@ktlim ktlim deleted the tickets/DM-10764 branch August 25, 2018 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants