www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4538] New: Listed complexity of reverse() is incorrect

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4538

           Summary: Listed complexity of reverse() is incorrect
           Product: D
           Version: 2.030
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: nobody puremagic.com
        ReportedBy: Justin.SpahrSummers gmail.com


--- Comment #0 from Justin Spahr-Summers <Justin.SpahrSummers gmail.com>
2010-07-30 21:10:10 CDT ---
Really minor issue, but I noticed that the complexity of reverse() -- in terms
of calls to swap() -- is incorrect in the Phobos2 documentation. It states:

   Reverses r in-place. Performs r.length evaluations of swap.

when reversal should actually only perform, and assumably does perform,
r.length / 2 evaluations of swap().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 30 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4538


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


--- Comment #1 from Andrei Alexandrescu <andrei metalanguage.com> 2010-07-30
19:30:21 PDT ---
Thanks!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 30 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4538


Yao Gomez <yao.gomez gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yao.gomez gmail.com
            Version|2.030                       |D2


--- Comment #2 from Yao Gomez <yao.gomez gmail.com> 2012-02-05 15:11:33 PST ---
pull https://github.com/D-Programming-Language/phobos/pull/421

This changes std.algorithm.reverse documentation to:

    Reverses r in-place. Performs r.length evaluations of swap.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 05 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4538



--- Comment #3 from github-bugzilla puremagic.com 2012-02-05 16:22:10 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/7c6caad85c6aa3cf7029a15b785797d086df4ae5
Merge pull request #421 from YaoGomez/fix-algorithm-swap-docs

[doc] Fix std.algorithm.reverse docs (Issue 4538)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 05 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4538


Yao Gomez <yao.gomez gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 05 2012