You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/31 17:55:58 UTC

[25/50] [abbrv] lucenenet git commit: Lucene.Net.Core.Util.CollectionUtil: Updated documenation comments for TimSort and IntroSort

Lucene.Net.Core.Util.CollectionUtil: Updated documenation comments for TimSort and IntroSort


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5b1c8d26
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5b1c8d26
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5b1c8d26

Branch: refs/heads/api-work
Commit: 5b1c8d26b13a46079eb0d6fd1c646d3e8ca460af
Parents: 1908f17
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Jan 31 14:38:47 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Jan 31 14:38:47 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/CollectionUtil.cs | 36 ++++++++++++++-----------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5b1c8d26/src/Lucene.Net.Core/Util/CollectionUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/CollectionUtil.cs b/src/Lucene.Net.Core/Util/CollectionUtil.cs
index 5105af6..e1142f9 100644
--- a/src/Lucene.Net.Core/Util/CollectionUtil.cs
+++ b/src/Lucene.Net.Core/Util/CollectionUtil.cs
@@ -135,10 +135,12 @@ namespace Lucene.Net.Util
         }
 
         /// <summary>
-        /// Sorts the given random access <seealso cref="List"/> using the <seealso cref="Comparer"/>.
-        /// The list must implement <seealso cref="RandomAccess"/>. this method uses the intro sort
-        /// algorithm, but falls back to insertion sort for small lists. </summary>
-        /// <exception cref="IllegalArgumentException"> if list is e.g. a linked list without random access. </exception>
+        /// Sorts the given <see cref="IList{T}"/> using the <see cref="IComparer{T}"/>.
+        /// This method uses the intro sort
+        /// algorithm, but falls back to insertion sort for small lists. 
+        /// </summary>
+        /// <param name="list">this <see cref="IList{T}"/></param>
+        /// <param name="comp">The <see cref="IComparer{T}"/> to use for the sort.</param>
         public static void IntroSort<T>(IList<T> list, IComparer<T> comp)
         {
             int size = list.Count;
@@ -150,10 +152,11 @@ namespace Lucene.Net.Util
         }
 
         /// <summary>
-        /// Sorts the given random access <seealso cref="List"/> in natural order.
-        /// The list must implement <seealso cref="RandomAccess"/>. this method uses the intro sort
-        /// algorithm, but falls back to insertion sort for small lists. </summary>
-        /// <exception cref="IllegalArgumentException"> if list is e.g. a linked list without random access. </exception>
+        /// Sorts the given random access <see cref="IList{T}"/> in natural order.
+        /// This method uses the intro sort
+        /// algorithm, but falls back to insertion sort for small lists. 
+        /// </summary>
+        /// <param name="list">this <see cref="IList{T}"/></param>
         public static void IntroSort<T>(IList<T> list)
             //where T : IComparable<T> // LUCENENET specific: removing constraint because in .NET, it is not needed
         {
@@ -168,10 +171,13 @@ namespace Lucene.Net.Util
         // Tim sorts:
 
         /// <summary>
-        /// Sorts the given random access <seealso cref="List"/> using the <seealso cref="Comparer"/>.
-        /// The list must implement <seealso cref="RandomAccess"/>. this method uses the Tim sort
-        /// algorithm, but falls back to binary sort for small lists. </summary>
-        /// <exception cref="IllegalArgumentException"> if list is e.g. a linked list without random access. </exception>
+        /// Sorts the given <see cref="IList{T}"/> using the <see cref="IComparer{T}"/>.
+        /// This method uses the Tim sort
+        /// algorithm, but falls back to binary sort for small lists.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="list">this <see cref="IList{T}"/></param>
+        /// <param name="comp">The <see cref="IComparer{T}"/> to use for the sort.</param>
         public static void TimSort<T>(IList<T> list, IComparer<T> comp)
         {
             int size = list.Count;
@@ -183,10 +189,10 @@ namespace Lucene.Net.Util
         }
 
         /// <summary>
-        /// Sorts the given random access <seealso cref="List"/> in natural order.
-        /// The list must implement <seealso cref="RandomAccess"/>. this method uses the Tim sort
+        /// Sorts the given <see cref="IList{T}"/> in natural order.
+        /// This method uses the Tim sort
         /// algorithm, but falls back to binary sort for small lists. </summary>
-        /// <exception cref="IllegalArgumentException"> if list is e.g. a linked list without random access. </exception>
+        /// <param name="list">this <see cref="IList{T}"/></param>
         public static void TimSort<T>(IList<T> list)
             //where T : IComparable<T> // LUCENENET specific: removing constraint because in .NET, it is not needed
         {