| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_121) on Fri Apr 14 22:10:58 PDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ShortArrayList (Mahout Math 0.13.0 API)</title> |
| <meta name="date" content="2017-04-14"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ShortArrayList (Mahout Math 0.13.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ShortArrayList.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/mahout/math/list/ObjectArrayList.html" title="class in org.apache.mahout.math.list"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mahout/math/list/SimpleLongArrayList.html" title="class in org.apache.mahout.math.list"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mahout/math/list/ShortArrayList.html" target="_top">Frames</a></li> |
| <li><a href="ShortArrayList.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.mahout.math.list.AbstractShortList">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.mahout.math.list</div> |
| <h2 title="Class ShortArrayList" class="title">Class ShortArrayList</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/mahout/math/PersistentObject.html" title="class in org.apache.mahout.math">org.apache.mahout.math.PersistentObject</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/mahout/math/list/AbstractList.html" title="class in org.apache.mahout.math.list">org.apache.mahout.math.list.AbstractList</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">org.apache.mahout.math.list.AbstractShortList</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.mahout.math.list.ShortArrayList</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, <a href="../../../../../org/apache/mahout/math/buffer/ShortBufferConsumer.html" title="interface in org.apache.mahout.math.buffer">ShortBufferConsumer</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">ShortArrayList</span> |
| extends <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> |
| implements <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></pre> |
| <div class="block">Resizable list holding <code>short</code> elements; implemented with arrays.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.mahout.math.list.ShortArrayList">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.mahout.math.list.AbstractShortList"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.mahout.math.list.<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></h3> |
| <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#size">size</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#ShortArrayList--">ShortArrayList</a></span>()</code> |
| <div class="block">Constructs an empty list.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#ShortArrayList-int-">ShortArrayList</a></span>(int initialCapacity)</code> |
| <div class="block">Constructs an empty list with the specified initial capacity.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#ShortArrayList-short:A-">ShortArrayList</a></span>(short[] elements)</code> |
| <div class="block">Constructs a list containing the specified elements.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#add-short-">add</a></span>(short element)</code> |
| <div class="block">Appends the specified element to the end of this list.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#beforeInsert-int-short-">beforeInsert</a></span>(int index, |
| short element)</code> |
| <div class="block">Inserts the specified element before the specified position into the receiver.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#binarySearchFromTo-short-int-int-">binarySearchFromTo</a></span>(short key, |
| int from, |
| int to)</code> |
| <div class="block">Searches the receiver for the specified value using the binary search algorithm.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#clone--">clone</a></span>()</code> |
| <div class="block">Returns a deep copy of the receiver.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html" title="class in org.apache.mahout.math.list">ShortArrayList</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#copy--">copy</a></span>()</code> |
| <div class="block">Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#countSortFromTo-int-int-short-short-">countSortFromTo</a></span>(int from, |
| int to, |
| short min, |
| short max)</code> |
| <div class="block">Sorts the specified range of the receiver into ascending numerical order.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>short[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#elements--">elements</a></span>()</code> |
| <div class="block">Returns the elements currently stored, including invalid elements between size and capacity, if any.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#elements-short:A-">elements</a></span>(short[] elements)</code> |
| <div class="block">Sets the receiver's elements to be the specified array (not a copy of it).</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#ensureCapacity-int-">ensureCapacity</a></span>(int minCapacity)</code> |
| <div class="block">Ensures that the receiver can hold at least the specified number of elements without needing to allocate new |
| internal memory.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#equals-java.lang.Object-">equals</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> otherObj)</code> |
| <div class="block">Compares the specified Object with the receiver.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#forEach-org.apache.mahout.math.function.ShortProcedure-">forEach</a></span>(<a href="../../../../../org/apache/mahout/math/function/ShortProcedure.html" title="interface in org.apache.mahout.math.function">ShortProcedure</a> procedure)</code> |
| <div class="block">Applies a procedure to each element of the receiver, if any.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>short</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#get-int-">get</a></span>(int index)</code> |
| <div class="block">Returns the element at the specified position in the receiver.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>short</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#getQuick-int-">getQuick</a></span>(int index)</code> |
| <div class="block">Returns the element at the specified position in the receiver; <b>WARNING:</b> Does not check preconditions.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#indexOfFromTo-short-int-int-">indexOfFromTo</a></span>(short element, |
| int from, |
| int to)</code> |
| <div class="block">Returns the index of the first occurrence of the specified element.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#lastIndexOfFromTo-short-int-int-">lastIndexOfFromTo</a></span>(short element, |
| int from, |
| int to)</code> |
| <div class="block">Returns the index of the last occurrence of the specified element.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#partFromTo-int-int-">partFromTo</a></span>(int from, |
| int to)</code> |
| <div class="block">Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, |
| inclusive.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#removeAll-org.apache.mahout.math.list.AbstractShortList-">removeAll</a></span>(<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other)</code> |
| <div class="block">Removes from the receiver all elements that are contained in the specified list.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#replaceFromToWithFrom-int-int-org.apache.mahout.math.list.AbstractShortList-int-">replaceFromToWithFrom</a></span>(int from, |
| int to, |
| <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other, |
| int otherFrom)</code> |
| <div class="block">Replaces a number of elements in the receiver with the same number of elements of another list.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#retainAll-org.apache.mahout.math.list.AbstractShortList-">retainAll</a></span>(<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other)</code> |
| <div class="block">Retains (keeps) only the elements in the receiver that are contained in the specified other list.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#reverse--">reverse</a></span>()</code> |
| <div class="block">Reverses the elements of the receiver.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#set-int-short-">set</a></span>(int index, |
| short element)</code> |
| <div class="block">Replaces the element at the specified position in the receiver with the specified element.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#setQuick-int-short-">setQuick</a></span>(int index, |
| short element)</code> |
| <div class="block">Replaces the element at the specified position in the receiver with the specified element; <b>WARNING:</b> Does not |
| check preconditions.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#sortFromTo-int-int-">sortFromTo</a></span>(int from, |
| int to)</code> |
| <div class="block">Sorts the specified range of the receiver into ascending order.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html#trimToSize--">trimToSize</a></span>()</code> |
| <div class="block">Trims the capacity of the receiver to be the receiver's current size.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.math.list.AbstractShortList"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.mahout.math.list.<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></h3> |
| <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#addAllOf-org.apache.mahout.math.list.AbstractShortList-">addAllOf</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#addAllOf-org.apache.mahout.math.list.ShortArrayList-">addAllOf</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#addAllOfFromTo-org.apache.mahout.math.list.AbstractShortList-int-int-">addAllOfFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#beforeInsertAllOfFromTo-int-org.apache.mahout.math.list.AbstractShortList-int-int-">beforeInsertAllOfFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#beforeInsertDummies-int-int-">beforeInsertDummies</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#binarySearch-short-">binarySearch</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#contains-short-">contains</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#delete-short-">delete</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#fillFromToWith-int-int-short-">fillFromToWith</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#indexOf-short-">indexOf</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#lastIndexOf-short-">lastIndexOf</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#mergeSortFromTo-int-int-">mergeSortFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#mergeSortFromTo-int-int-org.apache.mahout.math.function.ShortComparator-">mergeSortFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#quickSortFromTo-int-int-">quickSortFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#quickSortFromTo-int-int-org.apache.mahout.math.function.ShortComparator-">quickSortFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#removeFromTo-int-int-">removeFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#replaceFromToWithFromTo-int-int-org.apache.mahout.math.list.AbstractShortList-int-int-">replaceFromToWithFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#setSizeRaw-int-">setSizeRaw</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#size--">size</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#times-int-">times</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#toArray-short:A-">toArray</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#toList--">toList</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#toString--">toString</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.math.list.AbstractList"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.mahout.math.list.<a href="../../../../../org/apache/mahout/math/list/AbstractList.html" title="class in org.apache.mahout.math.list">AbstractList</a></h3> |
| <code><a href="../../../../../org/apache/mahout/math/list/AbstractList.html#checkRange-int-int-">checkRange</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#checkRangeFromTo-int-int-int-">checkRangeFromTo</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#clear--">clear</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#isEmpty--">isEmpty</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#mergeSort--">mergeSort</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#quickSort--">quickSort</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#remove-int-">remove</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#setSize-int-">setSize</a>, <a href="../../../../../org/apache/mahout/math/list/AbstractList.html#sort--">sort</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ShortArrayList--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ShortArrayList</h4> |
| <pre>public ShortArrayList()</pre> |
| <div class="block">Constructs an empty list.</div> |
| </li> |
| </ul> |
| <a name="ShortArrayList-short:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ShortArrayList</h4> |
| <pre>public ShortArrayList(short[] elements)</pre> |
| <div class="block">Constructs a list containing the specified elements. The initial size and capacity of the list is the length of the |
| array. |
| |
| <b>WARNING:</b> For efficiency reasons and to keep memory usage low, <b>the array is not copied</b>. So if |
| subsequently you modify the specified array directly via the [] operator, be sure you know what you're doing.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>elements</code> - the array to be backed by the the constructed list</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ShortArrayList-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ShortArrayList</h4> |
| <pre>public ShortArrayList(int initialCapacity)</pre> |
| <div class="block">Constructs an empty list with the specified initial capacity.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>initialCapacity</code> - the number of elements the receiver can hold without auto-expanding itself by allocating new |
| internal memory.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="add-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public void add(short element)</pre> |
| <div class="block">Appends the specified element to the end of this list.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#add-short-">add</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>element</code> - element to be appended to this list.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="beforeInsert-int-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beforeInsert</h4> |
| <pre>public void beforeInsert(int index, |
| short element)</pre> |
| <div class="block">Inserts the specified element before the specified position into the receiver. Shifts the element currently at that |
| position (if any) and any subsequent elements to the right.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#beforeInsert-int-short-">beforeInsert</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - index before which the specified element is to be inserted (must be in [0,size]).</dd> |
| <dd><code>element</code> - element to be inserted.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (<tt>index < 0 || index > size()</tt>).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="binarySearchFromTo-short-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>binarySearchFromTo</h4> |
| <pre>public int binarySearchFromTo(short key, |
| int from, |
| int to)</pre> |
| <div class="block">Searches the receiver for the specified value using the binary search algorithm. The receiver must |
| <strong>must</strong> be sorted (as by the sort method) prior to making this call. If it is not sorted, the |
| results are undefined: in particular, the call may enter an infinite loop. If the receiver contains multiple |
| elements equal to the specified object, there is no guarantee which instance will be found.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#binarySearchFromTo-short-int-int-">binarySearchFromTo</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - the value to be searched for.</dd> |
| <dd><code>from</code> - the leftmost search position, inclusive.</dd> |
| <dd><code>to</code> - the rightmost search position, inclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>index of the search key, if it is contained in the receiver; otherwise, <tt>(-(<i>insertion point</i>) - |
| 1)</tt>. The <i>insertion point</i> is defined as the the point at which the value would be inserted into |
| the receiver: the index of the first element greater than the key, or <tt>receiver.size()</tt>, if all |
| elements in the receiver are less than the specified key. Note that this guarantees that the return value |
| will be >= 0 if and only if the key is found.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/mahout/math/BinarySearch.html" title="class in org.apache.mahout.math"><code>BinarySearch</code></a>, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html?is-external=true" title="class or interface in java.util"><code>Arrays</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clone--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clone</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> clone()</pre> |
| <div class="block">Returns a deep copy of the receiver.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#clone--">clone</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a deep copy of the receiver.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copy--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copy</h4> |
| <pre>public <a href="../../../../../org/apache/mahout/math/list/ShortArrayList.html" title="class in org.apache.mahout.math.list">ShortArrayList</a> copy()</pre> |
| <div class="block">Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a deep copy of the receiver.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="countSortFromTo-int-int-short-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>countSortFromTo</h4> |
| <pre>protected void countSortFromTo(int from, |
| int to, |
| short min, |
| short max)</pre> |
| <div class="block">Sorts the specified range of the receiver into ascending numerical order. |
| |
| The sorting algorithm is a count sort. This algorithm offers guaranteed <dt>Performance: O(Max(n,max-min+1)). |
| <dt>Space requirements: int[max-min+1] buffer. <p>This algorithm is only applicable if max-min+1 is not large! But |
| if applicable, it usually outperforms quicksort by a factor of 3-4.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>from</code> - the index of the first element (inclusive) to be sorted.</dd> |
| <dd><code>to</code> - the index of the last element (inclusive) to be sorted.</dd> |
| <dd><code>min</code> - the smallest element contained in the range.</dd> |
| <dd><code>max</code> - the largest element contained in the range.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="elements--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>elements</h4> |
| <pre>public short[] elements()</pre> |
| <div class="block">Returns the elements currently stored, including invalid elements between size and capacity, if any. |
| |
| <b>WARNING:</b> For efficiency reasons and to keep memory usage low, <b>the array is not copied</b>. So if |
| subsequently you modify the returned array directly via the [] operator, be sure you know what you're doing.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#elements--">elements</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the elements currently stored.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="elements-short:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>elements</h4> |
| <pre>public final <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> elements(short[] elements)</pre> |
| <div class="block">Sets the receiver's elements to be the specified array (not a copy of it). |
| |
| The size and capacity of the list is the length of the array. <b>WARNING:</b> For efficiency reasons and to keep |
| memory usage low, <b>the array is not copied</b>. So if subsequently you modify the specified array directly via |
| the [] operator, be sure you know what you're doing.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#elements-short:A-">elements</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>elements</code> - the new elements to be stored.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the receiver itself.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ensureCapacity-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ensureCapacity</h4> |
| <pre>public void ensureCapacity(int minCapacity)</pre> |
| <div class="block">Ensures that the receiver can hold at least the specified number of elements without needing to allocate new |
| internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#ensureCapacity-int-">ensureCapacity</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minCapacity</code> - the desired minimum capacity.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public boolean equals(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> otherObj)</pre> |
| <div class="block">Compares the specified Object with the receiver. Returns true if and only if the specified Object is also an |
| ArrayList of the same type, both Lists have the same size, and all corresponding pairs of elements in the two Lists |
| are identical. In other words, two Lists are defined to be equal if they contain the same elements in the same |
| order.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#equals-java.lang.Object-">equals</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>otherObj</code> - the Object to be compared for equality with the receiver.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the specified Object is equal to the receiver.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="forEach-org.apache.mahout.math.function.ShortProcedure-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>forEach</h4> |
| <pre>public boolean forEach(<a href="../../../../../org/apache/mahout/math/function/ShortProcedure.html" title="interface in org.apache.mahout.math.function">ShortProcedure</a> procedure)</pre> |
| <div class="block">Applies a procedure to each element of the receiver, if any. Starts at index 0, moving rightwards.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#forEach-org.apache.mahout.math.function.ShortProcedure-">forEach</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>procedure</code> - the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise |
| continues.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><tt>false</tt> if the procedure stopped before all elements where iterated over, <tt>true</tt> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="get-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>public short get(int index)</pre> |
| <div class="block">Returns the element at the specified position in the receiver.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#get-int-">get</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - index of element to return.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (index < 0 || index >= size()).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getQuick-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuick</h4> |
| <pre>public short getQuick(int index)</pre> |
| <div class="block">Returns the element at the specified position in the receiver; <b>WARNING:</b> Does not check preconditions. |
| Provided with invalid parameters this method may return invalid elements without throwing any exception! <b>You |
| should only use this method when you are absolutely sure that the index is within bounds.</b> Precondition |
| (unchecked): <tt>index >= 0 && index < size()</tt>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#getQuick-int-">getQuick</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - index of element to return.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="indexOfFromTo-short-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>indexOfFromTo</h4> |
| <pre>public int indexOfFromTo(short element, |
| int from, |
| int to)</pre> |
| <div class="block">Returns the index of the first occurrence of the specified element. Returns <code>-1</code> if the receiver does |
| not contain this element. Searches between <code>from</code>, inclusive and <code>to</code>, inclusive. Tests for |
| identity.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#indexOfFromTo-short-int-int-">indexOfFromTo</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>element</code> - element to search for.</dd> |
| <dd><code>from</code> - the leftmost search position, inclusive.</dd> |
| <dd><code>to</code> - the rightmost search position, inclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the index of the first occurrence of the element in the receiver; returns <code>-1</code> if the element is |
| not found.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (<tt>size()>0 && (from<0 || from>to || |
| to>=size())</tt>).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="lastIndexOfFromTo-short-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lastIndexOfFromTo</h4> |
| <pre>public int lastIndexOfFromTo(short element, |
| int from, |
| int to)</pre> |
| <div class="block">Returns the index of the last occurrence of the specified element. Returns <code>-1</code> if the receiver does not |
| contain this element. Searches beginning at <code>to</code>, inclusive until <code>from</code>, inclusive. Tests |
| for identity.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#lastIndexOfFromTo-short-int-int-">lastIndexOfFromTo</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>element</code> - element to search for.</dd> |
| <dd><code>from</code> - the leftmost search position, inclusive.</dd> |
| <dd><code>to</code> - the rightmost search position, inclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the index of the last occurrence of the element in the receiver; returns <code>-1</code> if the element is |
| not found.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (<tt>size()>0 && (from<0 || from>to || |
| to>=size())</tt>).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="partFromTo-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partFromTo</h4> |
| <pre>public <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> partFromTo(int from, |
| int to)</pre> |
| <div class="block">Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, |
| inclusive.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#partFromTo-int-int-">partFromTo</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>from</code> - the index of the first element (inclusive).</dd> |
| <dd><code>to</code> - the index of the last element (inclusive).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new list</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (<tt>size()>0 && (from<0 || from>to || |
| to>=size())</tt>).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="removeAll-org.apache.mahout.math.list.AbstractShortList-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeAll</h4> |
| <pre>public boolean removeAll(<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other)</pre> |
| <div class="block">Removes from the receiver all elements that are contained in the specified list. Tests for identity.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#removeAll-org.apache.mahout.math.list.AbstractShortList-">removeAll</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>other</code> - the other list.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the receiver changed as a result of the call.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="replaceFromToWithFrom-int-int-org.apache.mahout.math.list.AbstractShortList-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replaceFromToWithFrom</h4> |
| <pre>public void replaceFromToWithFrom(int from, |
| int to, |
| <a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other, |
| int otherFrom)</pre> |
| <div class="block">Replaces a number of elements in the receiver with the same number of elements of another list. Replaces elements |
| in the receiver, between <code>from</code> (inclusive) and <code>to</code> (inclusive), with elements of |
| <code>other</code>, starting from <code>otherFrom</code> (inclusive).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#replaceFromToWithFrom-int-int-org.apache.mahout.math.list.AbstractShortList-int-">replaceFromToWithFrom</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>from</code> - the position of the first element to be replaced in the receiver</dd> |
| <dd><code>to</code> - the position of the last element to be replaced in the receiver</dd> |
| <dd><code>other</code> - list holding elements to be copied into the receiver.</dd> |
| <dd><code>otherFrom</code> - position of first element within other list to be copied.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="retainAll-org.apache.mahout.math.list.AbstractShortList-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>retainAll</h4> |
| <pre>public boolean retainAll(<a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a> other)</pre> |
| <div class="block">Retains (keeps) only the elements in the receiver that are contained in the specified other list. In other words, |
| removes from the receiver all of its elements that are not contained in the specified other list.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#retainAll-org.apache.mahout.math.list.AbstractShortList-">retainAll</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>other</code> - the other list to test against.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the receiver changed as a result of the call.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="reverse--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reverse</h4> |
| <pre>public void reverse()</pre> |
| <div class="block">Reverses the elements of the receiver. Last becomes first, second last becomes second first, and so on.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#reverse--">reverse</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="set-int-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre>public void set(int index, |
| short element)</pre> |
| <div class="block">Replaces the element at the specified position in the receiver with the specified element.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#set-int-short-">set</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - index of element to replace.</dd> |
| <dd><code>element</code> - element to be stored at the specified position.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (index < 0 || index >= size()).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setQuick-int-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setQuick</h4> |
| <pre>public void setQuick(int index, |
| short element)</pre> |
| <div class="block">Replaces the element at the specified position in the receiver with the specified element; <b>WARNING:</b> Does not |
| check preconditions. Provided with invalid parameters this method may access invalid indexes without throwing any |
| exception! <b>You should only use this method when you are absolutely sure that the index is within bounds.</b> |
| Precondition (unchecked): <tt>index >= 0 && index < size()</tt>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html#setQuick-int-short-">setQuick</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractShortList.html" title="class in org.apache.mahout.math.list">AbstractShortList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - index of element to replace.</dd> |
| <dd><code>element</code> - element to be stored at the specified position.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sortFromTo-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sortFromTo</h4> |
| <pre>public void sortFromTo(int from, |
| int to)</pre> |
| <div class="block">Sorts the specified range of the receiver into ascending order. |
| |
| The sorting algorithm is dynamically chosen according to the characteristics of the data set. Currently quicksort |
| and countsort are considered. Countsort is not always applicable, but if applicable, it usually outperforms |
| quicksort by a factor of 3-4. |
| |
| <p>Best case performance: O(N). <dt>Worst case performance: O(N^2) (a degenerated quicksort). <dt>Best case space |
| requirements: 0 KB. <dt>Worst case space requirements: 40 KB.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractList.html#sortFromTo-int-int-">sortFromTo</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractList.html" title="class in org.apache.mahout.math.list">AbstractList</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>from</code> - the index of the first element (inclusive) to be sorted.</dd> |
| <dd><code>to</code> - the index of the last element (inclusive) to be sorted.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - index is out of range (<tt>size()>0 && (from<0 || from>to || |
| to>=size())</tt>).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimToSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>trimToSize</h4> |
| <pre>public void trimToSize()</pre> |
| <div class="block">Trims the capacity of the receiver to be the receiver's current size. Releases any superfluous internal memory. An |
| application can use this operation to minimize the storage of the receiver.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mahout/math/list/AbstractList.html#trimToSize--">trimToSize</a></code> in class <code><a href="../../../../../org/apache/mahout/math/list/AbstractList.html" title="class in org.apache.mahout.math.list">AbstractList</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ShortArrayList.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/mahout/math/list/ObjectArrayList.html" title="class in org.apache.mahout.math.list"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mahout/math/list/SimpleLongArrayList.html" title="class in org.apache.mahout.math.list"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mahout/math/list/ShortArrayList.html" target="_top">Frames</a></li> |
| <li><a href="ShortArrayList.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.mahout.math.list.AbstractShortList">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2008–2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |