Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3965,6 +3965,11 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{last2} be \tcode{first2 + (last1 - first1)}
for the overloads with no parameter named \tcode{last2},
and let \tcode{pred} be \tcode{equal_to\{\}}
for the overloads with no parameter \tcode{pred}.

\pnum
\mandates
Expand All @@ -3974,20 +3979,14 @@
\expects
The comparison function is an equivalence relation.

\pnum
\remarks
If \tcode{last2} was not given in the argument list,
it denotes \tcode{first2 + (last1 - first1)} below.

\pnum
\returns
If \tcode{last1 - first1 != last2 - first2}, return \tcode{false}.
Otherwise return \tcode{true}
if there exists a permutation of the elements
in the range \range{first2}{first2 + (last1 - first1)},
in the range \range{first2}{last2},
beginning with \tcode{ForwardIterator2 begin},
such that \tcode{equal(first1, last1, begin)} returns \tcode{true} or
\tcode{equal(first1, last1, begin, pred)} returns \tcode{true};
such that \tcode{equal(first1, last1, begin, pred)} returns \tcode{true};
otherwise, returns \tcode{false}.

\pnum
Expand All @@ -3998,10 +3997,7 @@
\tcode{last1 - first1 != last2 - first2}.
Otherwise, exactly \tcode{last1 - first1} applications
of the corresponding predicate
if \tcode{equal(\brk{}first1, last1, first2, last2)} would return \tcode{true}
if \tcode{pred} was not given in the argument list or
\tcode{equal(first1, last1, first2, last2, pred)} would return \tcode{true}
if \tcode{pred} was given in the argument list;
if \tcode{equal(first1, last1, first2, last2, pred)} would return \tcode{true};
otherwise, at worst \bigoh{N^2}, where $N$ has the value \tcode{last1 - first1}.
\end{itemdescr}

Expand Down