Skip to content

[lib] Inconsistent style in \complexity #1088

Description

@jlaire

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.

Activity

  1. added
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Nov 24, 2016
  2. jensmaurer commented on Mar 2, 2017

    @jensmaurer
    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.

  3. removed
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Mar 2, 2017
  4. jensmaurer commented on Mar 20, 2017

    @jensmaurer
    Member

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

  5. jensmaurer commented on Apr 22, 2017

    @jensmaurer
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions