Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://pic.dhe.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubskel/ODME_pubskels/startall_ODME34_Eclipse1202.html" rel="noreferrer">IBM makes a distinction between sorted and ordered sets</a>:</p> <blockquote> <p>Sets can be either sorted or ordered:</p> <ul> <li><p>An ordered set is a set whose elements are arranged in the order in which they were added to the set. Note that this is how sets are created by default. For example:</p> <pre><code>{int} S1 = {3,2,5}; </code></pre> <p>and</p> <pre><code>ordered {int} S1 = {3,2,5}; </code></pre> <p>are equivalent.</p></li> <li><p>A sorted set is a set in which elements are arranged in their natural, ascending (or descending) order. For strings, the natural order is the lexicographic order. The natural order also depends on the system locale. For example:</p> <pre><code>sorted {int} sortedS = {3,2,5}; </code></pre> <p>and</p> <pre><code>ordered {int} orderedS = {2,3,5}; </code></pre> <p>are equivalent, and iterating over sortedS or orderedS will have the same behavior. To specify the descending order, you add the keyword reversed.</p></li> </ul> </blockquote> <p>Also, the National Information Assurance Partnership <a href="http://cio.nist.gov/esd/emaildir/lists/cc-cmt/msg00272.html" rel="noreferrer">proposed an interpretation of the terms</a> to the National Institute of Standards and Technology in 2002:</p> <blockquote> <p>ISSUE:</p> <p>What is the distinction between the terms "sorting" and "ordering"? Sometimes the words are used interchangeably.</p> <p>STATEMENT</p> <p>Although the terms "sorting" and "ordering" are sometimes used interchangeably in IT system discussions, they have somewhat different meanings. When one sorts, one separates items into different kinds or classes; when one orders, one arranges the items in a particular order.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload