Is there a more or less agreed-upon convention as to how one should call member functions which return the _support_ of a functor?
In a function object representing a compactly-supported function f mapping the real numbers to the real numbers, how should I call a member function which returns an interval outside of which the values of f are zero? Should I rather use one single member function, returning the entire interval as some special object (advantage: easily generizeable to mulitple dimensions or even topological non-vect开发者_如何学Corspaces), or two functions representing the borders of the one-dimensional interval (like the begin()
and end()
functions of containers, which everybody is familiar with regarding the use for iterating over the interval in a for
loop)?
These function objects are actually supposed to be used in a similar fashion to stl containers, with general algorithms, so I would like to settle to good names for the crucial member functions.
If the return value is modelled by a single concept, return a single object and have a single function.
精彩评论