blob: a6243def6903cbe3dab52c7b5422cde1930f7a7d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ResizableDoubleArray (Apache Commons Math 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ResizableDoubleArray (Apache Commons Math 3.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/ResizableDoubleArray.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 class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/util/Precision.html" title="class in org.apache.commons.math3.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/util/ResizableDoubleArray.html" target="_top">Frames</a></li>
<li><a href="ResizableDoubleArray.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.commons.math3.util</div>
<h2 title="Class ResizableDoubleArray" class="title">Class ResizableDoubleArray</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/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>org.apache.commons.math3.util.ResizableDoubleArray</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/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">ResizableDoubleArray</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block"><p>
A variable length <a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util"><code>DoubleArray</code></a> implementation that automatically
handles expanding and contracting its internal storage array as elements
are added and removed.
</p>
<h3>Important note: Usage should not assume that this class is thread-safe
even though some of the methods are <code>synchronized</code>.
This qualifier will be dropped in the next major release (4.0).</h3>
<p>
The internal storage array starts with capacity determined by the
<code>initialCapacity</code> property, which can be set by the constructor.
The default initial capacity is 16. Adding elements using
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#addElement(double)"><code>addElement(double)</code></a> appends elements to the end of the array.
When there are no open entries at the end of the internal storage array,
the array is expanded. The size of the expanded array depends on the
<code>expansionMode</code> and <code>expansionFactor</code> properties.
The <code>expansionMode</code> determines whether the size of the array is
multiplied by the <code>expansionFactor</code>
(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#MULTIPLICATIVE"><code>ResizableDoubleArray.ExpansionMode.MULTIPLICATIVE</code></a>) or if the expansion is additive
(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#ADDITIVE"><code>ResizableDoubleArray.ExpansionMode.ADDITIVE</code></a> -- <code>expansionFactor</code> storage
locations added).
The default <code>expansionMode</code> is <code>MULTIPLICATIVE</code> and the default
<code>expansionFactor</code> is 2.
</p>
<p>
The <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#addElementRolling(double)"><code>addElementRolling(double)</code></a> method adds a new element to the end
of the internal storage array and adjusts the "usable window" of the
internal array forward by one position (effectively making what was the
second element the first, and so on). Repeated activations of this method
(or activation of <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#discardFrontElements(int)"><code>discardFrontElements(int)</code></a>) will effectively orphan
the storage locations at the beginning of the internal storage array. To
reclaim this storage, each time one of these methods is activated, the size
of the internal storage array is compared to the number of addressable
elements (the <code>numElements</code> property) and if the difference
is too large, the internal array is contracted to size
<code>numElements + 1</code>. The determination of when the internal
storage array is "too large" depends on the <code>expansionMode</code> and
<code>contractionFactor</code> properties. If the <code>expansionMode</code>
is <code>MULTIPLICATIVE</code>, contraction is triggered when the
ratio between storage array length and <code>numElements</code> exceeds
<code>contractionFactor.</code> If the <code>expansionMode</code>
is <code>ADDITIVE</code>, the number of excess storage locations
is compared to <code>contractionFactor</code>.
</p>
<p>
To avoid cycles of expansions and contractions, the
<code>expansionFactor</code> must not exceed the <code>contractionFactor</code>.
Constructors and mutators for both of these properties enforce this
requirement, throwing a <code>MathIllegalArgumentException</code> if it is
violated.
</p></div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Id: ResizableDoubleArray.java 1591835 2014-05-02 09:04:01Z tn $</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.math3.util.ResizableDoubleArray">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util">ResizableDoubleArray.ExpansionMode</a></strong></code>
<div class="block">Specification of expansion algorithm.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ADDITIVE_MODE">ADDITIVE_MODE</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#ADDITIVE"><code>ResizableDoubleArray.ExpansionMode.ADDITIVE</code></a> instead.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#MULTIPLICATIVE_MODE">MULTIPLICATIVE_MODE</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#MULTIPLICATIVE"><code>ResizableDoubleArray.ExpansionMode.MULTIPLICATIVE</code></a> instead.</i></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray()">ResizableDoubleArray</a></strong>()</code>
<div class="block">Creates an instance with default properties.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(double[])">ResizableDoubleArray</a></strong>(double[]&nbsp;initialArray)</code>
<div class="block">Creates an instance from an existing <code>double[]</code> with the
initial capacity and numElements corresponding to the size of
the supplied <code>double[]</code> array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity)</code>
<div class="block">Creates an instance with the specified initial capacity.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
double&nbsp;expansionFactor)</code>
<div class="block">Creates an instance with the specified initial capacity
and expansion factor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
double&nbsp;expansionFactor,
double&nbsp;contractionCriterion)</code>
<div class="block">Creates an instance with the specified initial capacity,
expansion factor, and contraction criteria.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double, org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode, double...)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
double&nbsp;expansionFactor,
double&nbsp;contractionCriterion,
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util">ResizableDoubleArray.ExpansionMode</a>&nbsp;expansionMode,
double...&nbsp;data)</code>
<div class="block">Creates an instance with the specified properties.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, float)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
float&nbsp;expansionFactor)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double)"><code>ResizableDoubleArray(int,double)</code></a> instead.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, float, float)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
float&nbsp;expansionFactor,
float&nbsp;contractionCriteria)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double)"><code>ResizableDoubleArray(int,double,double)</code></a> instead.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, float, float, int)">ResizableDoubleArray</a></strong>(int&nbsp;initialCapacity,
float&nbsp;expansionFactor,
float&nbsp;contractionCriteria,
int&nbsp;expansionMode)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double, org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode, double...)"><code>ResizableDoubleArray(int,double,double,ExpansionMode,double[])</code></a>
instead.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(org.apache.commons.math3.util.ResizableDoubleArray)">ResizableDoubleArray</a></strong>(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;original)</code>
<div class="block">Copy constructor.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#addElement(double)">addElement</a></strong>(double&nbsp;value)</code>
<div class="block">Adds an element to the end of this expandable array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#addElementRolling(double)">addElementRolling</a></strong>(double&nbsp;value)</code>
<div class="block">
Adds an element to the end of the array and removes the first
element in the array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#addElements(double[])">addElements</a></strong>(double[]&nbsp;values)</code>
<div class="block">Adds several element to the end of this expandable array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#checkContractExpand(double, double)">checkContractExpand</a></strong>(double&nbsp;contraction,
double&nbsp;expansion)</code>
<div class="block">Checks the expansion factor and the contraction criterion and raises
an exception if the contraction criterion is smaller than the
expansion criterion.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#checkContractExpand(float, float)">checkContractExpand</a></strong>(float&nbsp;contraction,
float&nbsp;expansion)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#checkContractExpand(double, double)"><code>checkContractExpand(double,double)</code></a> instead.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#clear()">clear</a></strong>()</code>
<div class="block">Clear the array contents, resetting the number of elements to zero.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#compute(org.apache.commons.math3.util.MathArrays.Function)">compute</a></strong>(<a href="../../../../../org/apache/commons/math3/util/MathArrays.Function.html" title="interface in org.apache.commons.math3.util">MathArrays.Function</a>&nbsp;f)</code>
<div class="block">Performs an operation on the addressable elements of the array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#contract()">contract</a></strong>()</code>
<div class="block">Contracts the storage array to the (size of the element set) + 1 - to
avoid a zero length array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#copy()">copy</a></strong>()</code>
<div class="block">Returns a copy of the ResizableDoubleArray.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#copy(org.apache.commons.math3.util.ResizableDoubleArray, org.apache.commons.math3.util.ResizableDoubleArray)">copy</a></strong>(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;source,
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;dest)</code>
<div class="block">Copies source to dest, copying the underlying data, so dest is
a new, independent copy of source.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#discardFrontElements(int)">discardFrontElements</a></strong>(int&nbsp;i)</code>
<div class="block">Discards the <code>i</code> initial elements of the array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#discardMostRecentElements(int)">discardMostRecentElements</a></strong>(int&nbsp;i)</code>
<div class="block">Discards the <code>i</code> last elements of the array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Returns true iff object is a ResizableDoubleArray with the same properties
as this and an identical internal storage array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#expand()">expand</a></strong>()</code>
<div class="block">Expands the internal storage array using the expansion factor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getArrayRef()">getArrayRef</a></strong>()</code>
<div class="block">Provides <em>direct</em> access to the internal storage array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getCapacity()">getCapacity</a></strong>()</code>
<div class="block">Gets the currently allocated size of the internal data structure used
for storing elements.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getContractionCriteria()">getContractionCriteria</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getContractionCriterion()"><code>getContractionCriterion()</code></a>
instead.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getContractionCriterion()">getContractionCriterion</a></strong>()</code>
<div class="block">The contraction criterion defines when the internal array will contract
to store only the number of elements in the element array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getElement(int)">getElement</a></strong>(int&nbsp;index)</code>
<div class="block">Returns the element at the specified index</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getElements()">getElements</a></strong>()</code>
<div class="block">Returns a double array containing the elements of this
<code>ResizableArray</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getExpansionFactor()">getExpansionFactor</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Return type will be changed to "double" in 4.0.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getExpansionMode()">getExpansionMode</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Return value to be changed to
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util"><code>ResizableDoubleArray.ExpansionMode</code></a> in 4.0.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getInternalValues()">getInternalValues</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getNumElements()">getNumElements</a></strong>()</code>
<div class="block">Returns the number of elements currently in the array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getStartIndex()">getStartIndex</a></strong>()</code>
<div class="block">Returns the "start index" of the internal array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Returns a hash code consistent with equals.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setContractionCriteria(float)">setContractionCriteria</a></strong>(float&nbsp;contractionCriteria)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setElement(int, double)">setElement</a></strong>(int&nbsp;index,
double&nbsp;value)</code>
<div class="block">Sets the element at the specified index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setExpansionFactor(float)">setExpansionFactor</a></strong>(float&nbsp;expansionFactor)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setExpansionMode(int)">setExpansionMode</a></strong>(int&nbsp;expansionMode)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setExpansionMode(org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode)"><code>setExpansionMode(ExpansionMode)</code></a> instead.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setExpansionMode(org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode)">setExpansionMode</a></strong>(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util">ResizableDoubleArray.ExpansionMode</a>&nbsp;expansionMode)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setInitialCapacity(int)">setInitialCapacity</a></strong>(int&nbsp;initialCapacity)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1, this is a no-op.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setNumElements(int)">setNumElements</a></strong>(int&nbsp;i)</code>
<div class="block">This function allows you to control the number of elements contained
in this array, and can be used to "throw out" the last n values in an
array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#start()">start</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>As of 3.1.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#substituteMostRecentElement(double)">substituteMostRecentElement</a></strong>(double&nbsp;value)</code>
<div class="block">Substitutes <code>value</code> for the most recently added value.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/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/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/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/6/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/6/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/6/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/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/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/6/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/6/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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="ADDITIVE_MODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ADDITIVE_MODE</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static final&nbsp;int ADDITIVE_MODE</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#ADDITIVE"><code>ResizableDoubleArray.ExpansionMode.ADDITIVE</code></a> instead.</i></div>
<div class="block">Additive expansion mode.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.math3.util.ResizableDoubleArray.ADDITIVE_MODE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MULTIPLICATIVE_MODE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MULTIPLICATIVE_MODE</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static final&nbsp;int MULTIPLICATIVE_MODE</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html#MULTIPLICATIVE"><code>ResizableDoubleArray.ExpansionMode.MULTIPLICATIVE</code></a> instead.</i></div>
<div class="block">Multiplicative expansion mode.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.math3.util.ResizableDoubleArray.MULTIPLICATIVE_MODE">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ResizableDoubleArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray()</pre>
<div class="block">Creates an instance with default properties.
<ul>
<li><code>initialCapacity = 16</code></li>
<li><code>expansionMode = MULTIPLICATIVE</code></li>
<li><code>expansionFactor = 2.0</code></li>
<li><code>contractionCriterion = 2.5</code></li>
</ul></div>
</li>
</ul>
<a name="ResizableDoubleArray(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Creates an instance with the specified initial capacity.
Other properties take default values:
<ul>
<li><code>expansionMode = MULTIPLICATIVE</code></li>
<li><code>expansionFactor = 2.0</code></li>
<li><code>contractionCriterion = 2.5</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if <code>initialCapacity &lt;= 0</code>.</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(double[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(double[]&nbsp;initialArray)</pre>
<div class="block">Creates an instance from an existing <code>double[]</code> with the
initial capacity and numElements corresponding to the size of
the supplied <code>double[]</code> array.
If the supplied array is null, a new empty array with the default
initial capacity will be created.
The input array is copied, not referenced.
Other properties take default values:
<ul>
<li><code>initialCapacity = 16</code></li>
<li><code>expansionMode = MULTIPLICATIVE</code></li>
<li><code>expansionFactor = 2.0</code></li>
<li><code>contractionCriterion = 2.5</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialArray</code> - initial array</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
float&nbsp;expansionFactor)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double)"><code>ResizableDoubleArray(int,double)</code></a> instead.</i></div>
<div class="block">Creates an instance with the specified initial capacity
and expansion factor.
The remaining properties take default values:
<ul>
<li><code>expansionMode = MULTIPLICATIVE</code></li>
<li><code>contractionCriterion = 0.5 + expansionFactor</code></li>
</ul>
<br/>
Throws IllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity &gt; 0</code></li>
<li><code>expansionFactor &gt; 1</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array.</dd><dd><code>expansionFactor</code> - The array will be expanded based on this
parameter.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if parameters are not valid.</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
double&nbsp;expansionFactor)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Creates an instance with the specified initial capacity
and expansion factor.
The remaining properties take default values:
<ul>
<li><code>expansionMode = MULTIPLICATIVE</code></li>
<li><code>contractionCriterion = 0.5 + expansionFactor</code></li>
</ul>
<br/>
Throws IllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity &gt; 0</code></li>
<li><code>expansionFactor &gt; 1</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array.</dd><dd><code>expansionFactor</code> - The array will be expanded based on this
parameter.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if parameters are not valid.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
float&nbsp;expansionFactor,
float&nbsp;contractionCriteria)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double)"><code>ResizableDoubleArray(int,double,double)</code></a> instead.</i></div>
<div class="block">Creates an instance with the specified initialCapacity,
expansionFactor, and contractionCriterion.
The expansion mode will default to <code>MULTIPLICATIVE</code>.
<br/>
Throws IllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity &gt; 0</code></li>
<li><code>expansionFactor &gt; 1</code></li>
<li><code>contractionCriterion &gt;= expansionFactor</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array..</dd><dd><code>expansionFactor</code> - The array will be expanded based on this
parameter.</dd><dd><code>contractionCriteria</code> - Contraction criteria.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if parameters are not valid.</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
double&nbsp;expansionFactor,
double&nbsp;contractionCriterion)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Creates an instance with the specified initial capacity,
expansion factor, and contraction criteria.
The expansion mode will default to <code>MULTIPLICATIVE</code>.
<br/>
Throws IllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity &gt; 0</code></li>
<li><code>expansionFactor &gt; 1</code></li>
<li><code>contractionCriterion &gt;= expansionFactor</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array..</dd><dd><code>expansionFactor</code> - The array will be expanded based on this
parameter.</dd><dd><code>contractionCriterion</code> - Contraction criterion.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the parameters are not valid.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, float, float, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
float&nbsp;expansionFactor,
float&nbsp;contractionCriteria,
int&nbsp;expansionMode)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#ResizableDoubleArray(int, double, double, org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode, double...)"><code>ResizableDoubleArray(int,double,double,ExpansionMode,double[])</code></a>
instead.</i></div>
<div class="block"><p>
Create a ResizableArray with the specified properties.</p>
<p>
Throws IllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity > 0</code></li>
<li><code>expansionFactor > 1</code></li>
<li><code>contractionFactor >= expansionFactor</code></li>
<li><code>expansionMode in {MULTIPLICATIVE_MODE, ADDITIVE_MODE}</code>
</li>
</ul></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - the initial size of the internal storage array</dd><dd><code>expansionFactor</code> - the array will be expanded based on this
parameter</dd><dd><code>contractionCriteria</code> - the contraction Criteria</dd><dd><code>expansionMode</code> - the expansion mode</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if parameters are not valid</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(int, double, double, org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode, double...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(int&nbsp;initialCapacity,
double&nbsp;expansionFactor,
double&nbsp;contractionCriterion,
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util">ResizableDoubleArray.ExpansionMode</a>&nbsp;expansionMode,
double...&nbsp;data)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Creates an instance with the specified properties.
<br/>
Throws MathIllegalArgumentException if the following conditions are
not met:
<ul>
<li><code>initialCapacity &gt; 0</code></li>
<li><code>expansionFactor &gt; 1</code></li>
<li><code>contractionCriterion &gt;= expansionFactor</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - Initial size of the internal storage array.</dd><dd><code>expansionFactor</code> - The array will be expanded based on this
parameter.</dd><dd><code>contractionCriterion</code> - Contraction criteria.</dd><dd><code>expansionMode</code> - Expansion mode.</dd><dd><code>data</code> - Initial contents of the array.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the parameters are not valid.</dd></dl>
</li>
</ul>
<a name="ResizableDoubleArray(org.apache.commons.math3.util.ResizableDoubleArray)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ResizableDoubleArray</h4>
<pre>public&nbsp;ResizableDoubleArray(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;original)
throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre>
<div class="block">Copy constructor. Creates a new ResizableDoubleArray that is a deep,
fresh copy of the original. Needs to acquire synchronization lock
on original. Original may not be null; otherwise a <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception"><code>NullArgumentException</code></a>
is thrown.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>original</code> - array to copy</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if original is null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</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="addElement(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addElement</h4>
<pre>public&nbsp;void&nbsp;addElement(double&nbsp;value)</pre>
<div class="block">Adds an element to the end of this expandable array.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#addElement(double)">addElement</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - Value to be added to end of array.</dd></dl>
</li>
</ul>
<a name="addElements(double[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addElements</h4>
<pre>public&nbsp;void&nbsp;addElements(double[]&nbsp;values)</pre>
<div class="block">Adds several element to the end of this expandable array.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#addElements(double[])">addElements</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - Values to be added to end of array.</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="addElementRolling(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addElementRolling</h4>
<pre>public&nbsp;double&nbsp;addElementRolling(double&nbsp;value)</pre>
<div class="block"><p>
Adds an element to the end of the array and removes the first
element in the array. Returns the discarded first element.
The effect is similar to a push operation in a FIFO queue.
</p>
<p>
Example: If the array contains the elements 1, 2, 3, 4 (in that order)
and addElementRolling(5) is invoked, the result is an array containing
the entries 2, 3, 4, 5 and the value returned is 1.
</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#addElementRolling(double)">addElementRolling</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - Value to be added to the array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value which has been discarded or "pushed" out of the array
by this rolling insert.</dd></dl>
</li>
</ul>
<a name="substituteMostRecentElement(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substituteMostRecentElement</h4>
<pre>public&nbsp;double&nbsp;substituteMostRecentElement(double&nbsp;value)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalStateException.html" title="class in org.apache.commons.math3.exception">MathIllegalStateException</a></pre>
<div class="block">Substitutes <code>value</code> for the most recently added value.
Returns the value that has been replaced. If the array is empty (i.e.
if <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#numElements"><code>numElements</code></a> is zero), an IllegalStateException is thrown.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - New value to substitute for the most recently added value</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value that has been replaced in the array.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalStateException.html" title="class in org.apache.commons.math3.exception">MathIllegalStateException</a></code> - if the array is empty</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="checkContractExpand(float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkContractExpand</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
protected&nbsp;void&nbsp;checkContractExpand(float&nbsp;contraction,
float&nbsp;expansion)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#checkContractExpand(double, double)"><code>checkContractExpand(double,double)</code></a> instead.</i></div>
<div class="block">Checks the expansion factor and the contraction criterion and throws an
IllegalArgumentException if the contractionCriteria is less than the
expansionCriteria</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>expansion</code> - factor to be checked</dd><dd><code>contraction</code> - criteria to be checked</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the contractionCriteria is less than
the expansionCriteria.</dd></dl>
</li>
</ul>
<a name="checkContractExpand(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkContractExpand</h4>
<pre>protected&nbsp;void&nbsp;checkContractExpand(double&nbsp;contraction,
double&nbsp;expansion)
throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a></pre>
<div class="block">Checks the expansion factor and the contraction criterion and raises
an exception if the contraction criterion is smaller than the
expansion criterion.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contraction</code> - Criterion to be checked.</dd><dd><code>expansion</code> - Factor to be checked.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a></code> - if <code>contraction &lt; expansion</code>.</dd>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a></code> - if <code>contraction &lt;= 1</code>.</dd>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a></code> - if <code>expansion &lt;= 1 </code>.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()</pre>
<div class="block">Clear the array contents, resetting the number of elements to zero.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#clear()">clear</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
</dl>
</li>
</ul>
<a name="contract()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contract</h4>
<pre>public&nbsp;void&nbsp;contract()</pre>
<div class="block">Contracts the storage array to the (size of the element set) + 1 - to
avoid a zero length array. This function also resets the startIndex to
zero.</div>
</li>
</ul>
<a name="discardFrontElements(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discardFrontElements</h4>
<pre>public&nbsp;void&nbsp;discardFrontElements(int&nbsp;i)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Discards the <code>i</code> initial elements of the array. For example,
if the array contains the elements 1,2,3,4, invoking
<code>discardFrontElements(2)</code> will cause the first two elements
to be discarded, leaving 3,4 in the array. Throws illegalArgumentException
if i exceeds numElements.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the number of elements to discard from the front of the array</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if i is greater than numElements.</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="discardMostRecentElements(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discardMostRecentElements</h4>
<pre>public&nbsp;void&nbsp;discardMostRecentElements(int&nbsp;i)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Discards the <code>i</code> last elements of the array. For example,
if the array contains the elements 1,2,3,4, invoking
<code>discardMostRecentElements(2)</code> will cause the last two elements
to be discarded, leaving 1,2 in the array. Throws illegalArgumentException
if i exceeds numElements.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the number of elements to discard from the end of the array</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if i is greater than numElements.</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="expand()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expand</h4>
<pre>protected&nbsp;void&nbsp;expand()</pre>
<div class="block">Expands the internal storage array using the expansion factor.
<p>
if <code>expansionMode</code> is set to MULTIPLICATIVE_MODE,
the new array size will be <code>internalArray.length * expansionFactor.</code>
If <code>expansionMode</code> is set to ADDITIVE_MODE, the length
after expansion will be <code>internalArray.length + expansionFactor</code>
</p></div>
</li>
</ul>
<a name="getContractionCriteria()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContractionCriteria</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;float&nbsp;getContractionCriteria()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getContractionCriterion()"><code>getContractionCriterion()</code></a>
instead.</i></div>
<div class="block">The contraction criteria defines when the internal array will contract
to store only the number of elements in the element array.
If the <code>expansionMode</code> is <code>MULTIPLICATIVE_MODE</code>,
contraction is triggered when the ratio between storage array length
and <code>numElements</code> exceeds <code>contractionFactor</code>.
If the <code>expansionMode</code> is <code>ADDITIVE_MODE</code>, the
number of excess storage locations is compared to
<code>contractionFactor.</code></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the contraction criteria used to reclaim memory.</dd></dl>
</li>
</ul>
<a name="getContractionCriterion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContractionCriterion</h4>
<pre>public&nbsp;double&nbsp;getContractionCriterion()</pre>
<div class="block">The contraction criterion defines when the internal array will contract
to store only the number of elements in the element array.
If the <code>expansionMode</code> is <code>MULTIPLICATIVE_MODE</code>,
contraction is triggered when the ratio between storage array length
and <code>numElements</code> exceeds <code>contractionFactor</code>.
If the <code>expansionMode</code> is <code>ADDITIVE_MODE</code>, the
number of excess storage locations is compared to
<code>contractionFactor.</code></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the contraction criterion used to reclaim memory.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="getElement(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElement</h4>
<pre>public&nbsp;double&nbsp;getElement(int&nbsp;index)</pre>
<div class="block">Returns the element at the specified index</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#getElement(int)">getElement</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - index to fetch a value from</dd>
<dt><span class="strong">Returns:</span></dt><dd>value stored at the specified index</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if <code>index</code> is less than
zero or is greater than <code>getNumElements() - 1</code>.</dd></dl>
</li>
</ul>
<a name="getElements()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElements</h4>
<pre>public&nbsp;double[]&nbsp;getElements()</pre>
<div class="block">Returns a double array containing the elements of this
<code>ResizableArray</code>. This method returns a copy, not a
reference to the underlying array, so that changes made to the returned
array have no effect on this <code>ResizableArray.</code></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#getElements()">getElements</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the double array.</dd></dl>
</li>
</ul>
<a name="getExpansionFactor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExpansionFactor</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;float&nbsp;getExpansionFactor()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Return type will be changed to "double" in 4.0.</i></div>
<div class="block">The expansion factor controls the size of a new array when an array
needs to be expanded. The <code>expansionMode</code>
determines whether the size of the array is multiplied by the
<code>expansionFactor</code> (MULTIPLICATIVE_MODE) or if
the expansion is additive (ADDITIVE_MODE -- <code>expansionFactor</code>
storage locations added). The default <code>expansionMode</code> is
MULTIPLICATIVE_MODE and the default <code>expansionFactor</code>
is 2.0.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the expansion factor of this expandable double array</dd></dl>
</li>
</ul>
<a name="getExpansionMode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExpansionMode</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;int&nbsp;getExpansionMode()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Return value to be changed to
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util"><code>ResizableDoubleArray.ExpansionMode</code></a> in 4.0.</i></div>
<div class="block">The expansion mode determines whether the internal storage
array grows additively or multiplicatively when it is expanded.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the expansion mode.</dd></dl>
</li>
</ul>
<a name="getCapacity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapacity</h4>
<pre>public&nbsp;int&nbsp;getCapacity()</pre>
<div class="block">Gets the currently allocated size of the internal data structure used
for storing elements.
This is not to be confused with <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getNumElements()"><code>the number of
elements actually stored</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the length of the internal array.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="getNumElements()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumElements</h4>
<pre>public&nbsp;int&nbsp;getNumElements()</pre>
<div class="block">Returns the number of elements currently in the array. Please note
that this is different from the length of the internal storage array.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#getNumElements()">getNumElements</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of elements.</dd></dl>
</li>
</ul>
<a name="getInternalValues()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInternalValues</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;double[]&nbsp;getInternalValues()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1.</i></div>
<div class="block">Returns the internal storage array. Note that this method returns
a reference to the internal storage array, not a copy, and to correctly
address elements of the array, the <code>startIndex</code> is
required (available via the <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#start()"><code>start()</code></a> method). This method should
only be used in cases where copying the internal array is not practical.
The <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getElements()"><code>getElements()</code></a> method should be used in all other cases.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the internal storage array used by this object</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="getArrayRef()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArrayRef</h4>
<pre>protected&nbsp;double[]&nbsp;getArrayRef()</pre>
<div class="block">Provides <em>direct</em> access to the internal storage array.
Please note that this method returns a reference to this object's
storage array, not a copy.
<br/>
To correctly address elements of the array, the "start index" is
required (available via the <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getStartIndex()"><code>getStartIndex</code></a>
method.
<br/>
This method should only be used to avoid copying the internal array.
The returned value <em>must</em> be used for reading only; other
uses could lead to this object becoming inconsistent.
<br/>
The <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getElements()"><code>getElements()</code></a> method has no such limitation since it
returns a copy of this array's addressable elements.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the internal storage array used by this object.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="getStartIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStartIndex</h4>
<pre>protected&nbsp;int&nbsp;getStartIndex()</pre>
<div class="block">Returns the "start index" of the internal array.
This index is the position of the first addressable element in the
internal storage array.
The addressable elements in the array are at indices contained in
the interval [<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getStartIndex()"><code>getStartIndex()</code></a>,
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getStartIndex()"><code>getStartIndex()</code></a> + <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#getNumElements()"><code>getNumElements()</code></a> - 1].</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the start index.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="setContractionCriteria(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setContractionCriteria</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setContractionCriteria(float&nbsp;contractionCriteria)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
<div class="block">Sets the contraction criteria.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contractionCriteria</code> - contraction criteria</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the contractionCriteria is less than
the expansionCriteria.</dd></dl>
</li>
</ul>
<a name="compute(org.apache.commons.math3.util.MathArrays.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compute</h4>
<pre>public&nbsp;double&nbsp;compute(<a href="../../../../../org/apache/commons/math3/util/MathArrays.Function.html" title="interface in org.apache.commons.math3.util">MathArrays.Function</a>&nbsp;f)</pre>
<div class="block">Performs an operation on the addressable elements of the array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - Function to be applied on this array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the result.</dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="setElement(int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setElement</h4>
<pre>public&nbsp;void&nbsp;setElement(int&nbsp;index,
double&nbsp;value)</pre>
<div class="block">Sets the element at the specified index. If the specified index is greater than
<code>getNumElements() - 1</code>, the <code>numElements</code> property
is increased to <code>index +1</code> and additional storage is allocated
(if necessary) for the new element and all (uninitialized) elements
between the new element and the previous end of the array).</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html#setElement(int, double)">setElement</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/util/DoubleArray.html" title="interface in org.apache.commons.math3.util">DoubleArray</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - index to store a value in</dd><dd><code>value</code> - value to store at the specified index</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if <code>index &lt; 0</code>.</dd></dl>
</li>
</ul>
<a name="setExpansionFactor(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExpansionFactor</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setExpansionFactor(float&nbsp;expansionFactor)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
<div class="block">Sets the expansionFactor. Throws IllegalArgumentException if the
the following conditions are not met:
<ul>
<li><code>expansionFactor > 1</code></li>
<li><code>contractionFactor >= expansionFactor</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>expansionFactor</code> - the new expansion factor value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if expansionFactor is <= 1 or greater
than contractionFactor</dd></dl>
</li>
</ul>
<a name="setExpansionMode(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExpansionMode</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setExpansionMode(int&nbsp;expansionMode)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1. Please use <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html#setExpansionMode(org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode)"><code>setExpansionMode(ExpansionMode)</code></a> instead.</i></div>
<div class="block">Sets the <code>expansionMode</code>. The specified value must be one of
ADDITIVE_MODE, MULTIPLICATIVE_MODE.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>expansionMode</code> - The expansionMode to set.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the specified mode value is not valid.</dd></dl>
</li>
</ul>
<a name="setExpansionMode(org.apache.commons.math3.util.ResizableDoubleArray.ExpansionMode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExpansionMode</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setExpansionMode(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util">ResizableDoubleArray.ExpansionMode</a>&nbsp;expansionMode)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1 (to be removed in 4.0 as field will become "final").</i></div>
<div class="block">Sets the <a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util"><code>expansion mode</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>expansionMode</code> - Expansion mode to use for resizing the array.</dd></dl>
</li>
</ul>
<a name="setInitialCapacity(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInitialCapacity</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
protected&nbsp;void&nbsp;setInitialCapacity(int&nbsp;initialCapacity)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1, this is a no-op.</i></div>
<div class="block">Sets the initial capacity. Should only be invoked by constructors.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialCapacity</code> - of the array</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if <code>initialCapacity</code> is not
positive.</dd></dl>
</li>
</ul>
<a name="setNumElements(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNumElements</h4>
<pre>public&nbsp;void&nbsp;setNumElements(int&nbsp;i)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">This function allows you to control the number of elements contained
in this array, and can be used to "throw out" the last n values in an
array. This function will also expand the internal array as needed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - a new number of elements</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if <code>i</code> is negative.</dd></dl>
</li>
</ul>
<a name="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;int&nbsp;start()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>As of 3.1.</i></div>
<div class="block">Returns the starting index of the internal array. The starting index is
the position of the first addressable element in the internal storage
array. The addressable elements in the array are <code>
internalArray[startIndex],...,internalArray[startIndex + numElements -1]
</code></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the starting index.</dd></dl>
</li>
</ul>
<a name="copy(org.apache.commons.math3.util.ResizableDoubleArray, org.apache.commons.math3.util.ResizableDoubleArray)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;source,
<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;dest)
throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre>
<div class="block"><p>Copies source to dest, copying the underlying data, so dest is
a new, independent copy of source. Does not contract before
the copy.</p>
<p>Obtains synchronization locks on both source and dest
(in that order) before performing the copy.</p>
<p>Neither source nor dest may be null; otherwise a <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception"><code>NullArgumentException</code></a>
is thrown</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - ResizableDoubleArray to copy</dd><dd><code>dest</code> - ResizableArray to replace with a copy of the source array</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if either source or dest is null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="copy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.html" title="class in org.apache.commons.math3.util">ResizableDoubleArray</a>&nbsp;copy()</pre>
<div class="block">Returns a copy of the ResizableDoubleArray. Does not contract before
the copy, so the returned object is an exact copy of this.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a new ResizableDoubleArray with the same data and configuration
properties as this</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Returns true iff object is a ResizableDoubleArray with the same properties
as this and an identical internal storage array.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - object to be compared for equality with this</dd>
<dt><span class="strong">Returns:</span></dt><dd>true iff object is a ResizableDoubleArray with the same data and
properties as this</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash code consistent with equals.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the hash code representing this <code>ResizableDoubleArray</code>.</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/ResizableDoubleArray.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 class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/util/Precision.html" title="class in org.apache.commons.math3.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/util/ResizableDoubleArray.ExpansionMode.html" title="enum in org.apache.commons.math3.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/util/ResizableDoubleArray.html" target="_top">Frames</a></li>
<li><a href="ResizableDoubleArray.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>