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

[lib] Inconsistent style in \complexity #1088

Closed
jlaire opened this issue Nov 21, 2016 · 3 comments
Closed

[lib] Inconsistent style in \complexity #1088

jlaire opened this issue Nov 21, 2016 · 3 comments
Labels
lwg Issue must be reviewed by LWG.

Comments

@jlaire
Copy link

jlaire commented Nov 21, 2016

Wording of complexity requirements is inconsistent in a couple of ways.

Noun-phrase or sentence?

"Exactly N applications of f."
vs.
"Applies f exactly N times.`"
vs.
"It takes approximately N comparisons."

The first form seems to be the most common.

Time or space complexity, or both?

It is not always made explicit whether the requirement is referring to time or space complexity, or both.

"Linear time." vs. "Linear."
"Constant time." vs. "Constant."

17.5.1.4 says that the Complexity: element specifies "the time and/or space complexity of the function", so being explicit about this would be good.

N log N vs. N log(N)

This is minor, but N \log(N), N \log N and N \log{N} are all used.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 24, 2016
jensmaurer added a commit to jensmaurer/draft that referenced this issue Dec 20, 2016
and not $N \log(N)$ or other variants.

Partially addresses cplusplus#1088.
jensmaurer added a commit to jensmaurer/draft that referenced this issue Feb 5, 2017
and not $N \log(N)$ or other variants.

Partially addresses cplusplus#1088.
@jensmaurer
Copy link
Member

Editorial meeting consensus: Use parens for log only when the argument is long and could be ambiguous, e.g. log(N+1). "It takes" is cringe-worthy.

"Exactly N applications" and related phrases are all ok, no need to harmonize.

Time or space complexity is LWG territory.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Mar 2, 2017
zygoloid pushed a commit that referenced this issue Mar 3, 2017
and not $N \log(N)$ or other variants.

Partially addresses #1088.
jensmaurer added a commit to jensmaurer/draft that referenced this issue Mar 18, 2017
zygoloid pushed a commit that referenced this issue Mar 20, 2017
@jensmaurer
Copy link
Member

The remaining question "Time or space complexity, or both?" was sent to LWG.

@jensmaurer
Copy link
Member

LWG issue 2949

@jensmaurer jensmaurer added the lwg Issue must be reviewed by LWG. label Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

No branches or pull requests

2 participants