| <!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>RealVector (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="RealVector (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/RealVector.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/linear/RealMatrixPreservingVisitor.html" title="interface in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/linear/RealVector.html" target="_top">Frames</a></li> |
| <li><a href="RealVector.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><a href="#nested_class_summary">Nested</a> | </li> |
| <li>Field | </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.commons.math3.linear</div> |
| <h2 title="Class RealVector" class="title">Class RealVector</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.linear.RealVector</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../org/apache/commons/math3/linear/ArrayRealVector.html" title="class in org.apache.commons.math3.linear">ArrayRealVector</a>, <a href="../../../../../org/apache/commons/math3/linear/SparseRealVector.html" title="class in org.apache.commons.math3.linear">SparseRealVector</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="strong">RealVector</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></pre> |
| <div class="block">Class defining a real-valued vector with basic algebraic operations. |
| <p> |
| vector element indexing is 0-based -- e.g., <code>getEntry(0)</code> |
| returns the first element of the vector. |
| </p> |
| <p> |
| The <code>code map</code> and <code>mapToSelf</code> methods operate |
| on vectors element-wise, i.e. they perform the same operation (adding a scalar, |
| applying a function ...) on each element in turn. The <code>map</code> |
| versions create a new vector to hold the result and do not change the instance. |
| The <code>mapToSelf</code> version uses the instance itself to store the |
| results, so the instance is changed by this method. In all cases, the result |
| vector is returned by the methods, allowing the <i>fluent API</i> |
| style, like this: |
| </p> |
| <pre> |
| RealVector result = v.mapAddToSelf(3.4).mapToSelf(new Tan()).mapToSelf(new Power(2.3)); |
| </pre></div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>2.1</dd> |
| <dt><span class="strong">Version:</span></dt> |
| <dd>$Id: RealVector.java 1570510 2014-02-21 10:16:52Z luc $</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"> </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>protected class </code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear">RealVector.Entry</a></strong></code> |
| <div class="block">An entry in the vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected class </code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.SparseEntryIterator.html" title="class in org.apache.commons.math3.linear">RealVector.SparseEntryIterator</a></strong></code> |
| <div class="block">This class should rarely be used, but is here to provide |
| a default implementation of sparseIterator(), which is implemented |
| by walking over the entries, skipping those that are zero.</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"> </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/linear/RealVector.html#RealVector()">RealVector</a></strong>()</code> </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"> </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><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#add(org.apache.commons.math3.linear.RealVector)">add</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Compute the sum of this vector and <code>v</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#addToEntry(int, double)">addToEntry</a></strong>(int index, |
| double increment)</code> |
| <div class="block">Change an entry at the specified index.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#append(double)">append</a></strong>(double d)</code> |
| <div class="block">Construct a new vector by appending a double to this vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#append(org.apache.commons.math3.linear.RealVector)">append</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Construct a new vector by appending a vector to this vector.</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/linear/RealVector.html#checkIndex(int)">checkIndex</a></strong>(int index)</code> |
| <div class="block">Check if an index is valid.</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/linear/RealVector.html#checkIndices(int, int)">checkIndices</a></strong>(int start, |
| int end)</code> |
| <div class="block">Checks that the indices of a subvector are valid.</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/linear/RealVector.html#checkVectorDimensions(int)">checkVectorDimensions</a></strong>(int n)</code> |
| <div class="block">Check if instance dimension is equal to some expected value.</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/linear/RealVector.html#checkVectorDimensions(org.apache.commons.math3.linear.RealVector)">checkVectorDimensions</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Check if instance and specified vectors have the same dimension.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#combine(double, double, org.apache.commons.math3.linear.RealVector)">combine</a></strong>(double a, |
| double b, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> y)</code> |
| <div class="block">Returns a new vector representing <code>a * this + b * y</code>, the linear |
| combination of <code>this</code> and <code>y</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#combineToSelf(double, double, org.apache.commons.math3.linear.RealVector)">combineToSelf</a></strong>(double a, |
| double b, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> y)</code> |
| <div class="block">Updates <code>this</code> with the linear combination of <code>this</code> and |
| <code>y</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#copy()">copy</a></strong>()</code> |
| <div class="block">Returns a (deep) copy of this vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#cosine(org.apache.commons.math3.linear.RealVector)">cosine</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Computes the cosine of the angle between this vector and the |
| argument.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#dotProduct(org.apache.commons.math3.linear.RealVector)">dotProduct</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Compute the dot product of this vector with <code>v</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#ebeDivide(org.apache.commons.math3.linear.RealVector)">ebeDivide</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Element-by-element division.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#ebeMultiply(org.apache.commons.math3.linear.RealVector)">ebeMultiply</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Element-by-element multiplication.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.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> other)</code> |
| <div class="block"> |
| Test for the equality of two real vectors.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getDimension()">getDimension</a></strong>()</code> |
| <div class="block">Returns the size of the vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getDistance(org.apache.commons.math3.linear.RealVector)">getDistance</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Distance between two vectors.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getEntry(int)">getEntry</a></strong>(int index)</code> |
| <div class="block">Return the entry 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/linear/RealVector.html#getL1Distance(org.apache.commons.math3.linear.RealVector)">getL1Distance</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Distance between two vectors.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Norm()">getL1Norm</a></strong>()</code> |
| <div class="block">Returns the L<sub>1</sub> norm of the vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfDistance(org.apache.commons.math3.linear.RealVector)">getLInfDistance</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Distance between two vectors.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfNorm()">getLInfNorm</a></strong>()</code> |
| <div class="block">Returns the L<sub>∞</sub> norm of the vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getMaxIndex()">getMaxIndex</a></strong>()</code> |
| <div class="block">Get the index of the maximum entry.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getMaxValue()">getMaxValue</a></strong>()</code> |
| <div class="block">Get the value of the maximum entry.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getMinIndex()">getMinIndex</a></strong>()</code> |
| <div class="block">Get the index of the minimum entry.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getMinValue()">getMinValue</a></strong>()</code> |
| <div class="block">Get the value of the minimum entry.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getNorm()">getNorm</a></strong>()</code> |
| <div class="block">Returns the L<sub>2</sub> norm of the vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getSubVector(int, int)">getSubVector</a></strong>(int index, |
| int n)</code> |
| <div class="block">Get a subvector from consecutive elements.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#hashCode()">hashCode</a></strong>()</code> |
| <div class="block">.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#isInfinite()">isInfinite</a></strong>()</code> |
| <div class="block">Check whether any coordinate of this vector is infinite and none are <code>NaN</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#isNaN()">isNaN</a></strong>()</code> |
| <div class="block">Check whether any coordinate of this vector is <code>NaN</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear">RealVector.Entry</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#iterator()">iterator</a></strong>()</code> |
| <div class="block">Generic dense iterator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#map(org.apache.commons.math3.analysis.UnivariateFunction)">map</a></strong>(<a href="../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</a> function)</code> |
| <div class="block">Acts as if implemented as:</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapAdd(double)">mapAdd</a></strong>(double d)</code> |
| <div class="block">Add a value to each entry.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapAddToSelf(double)">mapAddToSelf</a></strong>(double d)</code> |
| <div class="block">Add a value to each entry.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapDivide(double)">mapDivide</a></strong>(double d)</code> |
| <div class="block">Divide each entry by the argument.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapDivideToSelf(double)">mapDivideToSelf</a></strong>(double d)</code> |
| <div class="block">Divide each entry by the argument.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapMultiply(double)">mapMultiply</a></strong>(double d)</code> |
| <div class="block">Multiply each entry by the argument.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapMultiplyToSelf(double)">mapMultiplyToSelf</a></strong>(double d)</code> |
| <div class="block">Multiply each entry.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapSubtract(double)">mapSubtract</a></strong>(double d)</code> |
| <div class="block">Subtract a value from each entry.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapSubtractToSelf(double)">mapSubtractToSelf</a></strong>(double d)</code> |
| <div class="block">Subtract a value from each entry.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#mapToSelf(org.apache.commons.math3.analysis.UnivariateFunction)">mapToSelf</a></strong>(<a href="../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</a> function)</code> |
| <div class="block">Acts as if it is implemented as:</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#outerProduct(org.apache.commons.math3.linear.RealVector)">outerProduct</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Compute the outer product.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#projection(org.apache.commons.math3.linear.RealVector)">projection</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Find the orthogonal projection of this vector onto another vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#set(double)">set</a></strong>(double value)</code> |
| <div class="block">Set all elements to a single value.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#setEntry(int, double)">setEntry</a></strong>(int index, |
| double value)</code> |
| <div class="block">Set a single element.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#setSubVector(int, org.apache.commons.math3.linear.RealVector)">setSubVector</a></strong>(int index, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Set a sequence of consecutive elements.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear">RealVector.Entry</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#sparseIterator()">sparseIterator</a></strong>()</code> |
| <div class="block">Create a sparse iterator over the vector, which may omit some entries.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#subtract(org.apache.commons.math3.linear.RealVector)">subtract</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Subtract <code>v</code> from this vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#toArray()">toArray</a></strong>()</code> |
| <div class="block">Convert the vector to an array of <code>double</code>s.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#unitize()">unitize</a></strong>()</code> |
| <div class="block">Converts this vector into a unit vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#unitVector()">unitVector</a></strong>()</code> |
| <div class="block">Creates a unit vector pointing in the direction of this vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#unmodifiableRealVector(org.apache.commons.math3.linear.RealVector)">unmodifiableRealVector</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</code> |
| <div class="block">Returns an unmodifiable view of the specified vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor)">walkInDefaultOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor)</code> |
| <div class="block">Visits (and possibly alters) all entries of this vector in default order |
| (increasing 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/linear/RealVector.html#walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor, int, int)">walkInDefaultOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor, |
| int start, |
| int end)</code> |
| <div class="block">Visits (and possibly alters) some entries of this vector in default order |
| (increasing index).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor)">walkInDefaultOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor)</code> |
| <div class="block">Visits (but does not alter) all entries of this vector in default order |
| (increasing 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/linear/RealVector.html#walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor, int, int)">walkInDefaultOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor, |
| int start, |
| int end)</code> |
| <div class="block">Visits (but does not alter) some entries of this vector in default order |
| (increasing index).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor)">walkInOptimizedOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor)</code> |
| <div class="block">Visits (and possibly alters) all entries of this vector in optimized |
| order.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor, int, int)">walkInOptimizedOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor, |
| int start, |
| int end)</code> |
| <div class="block">Visits (and possibly change) some entries of this vector in optimized |
| order.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor)">walkInOptimizedOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor)</code> |
| <div class="block">Visits (but does not alter) all entries of this vector in optimized |
| order.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor, int, int)">walkInOptimizedOrder</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor, |
| int start, |
| int end)</code> |
| <div class="block">Visits (but does not alter) some entries of this vector in optimized |
| order.</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 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"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="RealVector()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>RealVector</h4> |
| <pre>public RealVector()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getDimension()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDimension</h4> |
| <pre>public abstract int getDimension()</pre> |
| <div class="block">Returns the size of the vector.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the size of this vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="getEntry(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEntry</h4> |
| <pre>public abstract double getEntry(int index) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Return the entry at the specified index.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - Index location of entry to be fetched.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the vector entry at <code>index</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the index is not valid.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#setEntry(int, double)"><code>setEntry(int, double)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="setEntry(int, double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEntry</h4> |
| <pre>public abstract void setEntry(int index, |
| double value) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Set a single element.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - element index.</dd><dd><code>value</code> - new value for the element.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the index is not valid.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getEntry(int)"><code>getEntry(int)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="addToEntry(int, double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addToEntry</h4> |
| <pre>public void addToEntry(int index, |
| double increment) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Change an entry at the specified index.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - Index location of entry to be set.</dd><dd><code>increment</code> - Value to add to the vector entry.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the index is not valid.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.0</dd></dl> |
| </li> |
| </ul> |
| <a name="append(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>append</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> append(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</pre> |
| <div class="block">Construct a new vector by appending a vector to this vector.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - vector to append to this one.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a new vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="append(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>append</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> append(double d)</pre> |
| <div class="block">Construct a new vector by appending a double to this vector.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - double to append.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a new vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="getSubVector(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSubVector</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> getSubVector(int index, |
| int n) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Get a subvector from consecutive elements.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - index of first element.</dd><dd><code>n</code> - number of elements to be retrieved.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a vector containing n elements.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the index is not valid.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NotPositiveException.html" title="class in org.apache.commons.math3.exception">NotPositiveException</a></code> - if the number of elements is not positive.</dd></dl> |
| </li> |
| </ul> |
| <a name="setSubVector(int, org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSubVector</h4> |
| <pre>public abstract void setSubVector(int index, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Set a sequence of consecutive elements.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - index of first element to be set.</dd><dd><code>v</code> - vector containing the values to set.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the index is not valid.</dd></dl> |
| </li> |
| </ul> |
| <a name="isNaN()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNaN</h4> |
| <pre>public abstract boolean isNaN()</pre> |
| <div class="block">Check whether any coordinate of this vector is <code>NaN</code>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if any coordinate of this vector is <code>NaN</code>, |
| <code>false</code> otherwise.</dd></dl> |
| </li> |
| </ul> |
| <a name="isInfinite()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isInfinite</h4> |
| <pre>public abstract boolean isInfinite()</pre> |
| <div class="block">Check whether any coordinate of this vector is infinite and none are <code>NaN</code>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if any coordinate of this vector is infinite and |
| none are <code>NaN</code>, <code>false</code> otherwise.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkVectorDimensions(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkVectorDimensions</h4> |
| <pre>protected void checkVectorDimensions(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Check if instance and specified vectors have the same dimension.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to compare instance with.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the vectors do not |
| have the same dimension.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkVectorDimensions(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkVectorDimensions</h4> |
| <pre>protected void checkVectorDimensions(int n) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Check if instance dimension is equal to some expected value.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - Expected dimension.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the dimension is |
| inconsistent with the vector size.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkIndex(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkIndex</h4> |
| <pre>protected void checkIndex(int index) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if an index is valid.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - Index to check.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>index</code> is not valid.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkIndices(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkIndices</h4> |
| <pre>protected void checkIndices(int start, |
| int end) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Checks that the indices of a subvector are valid.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>start</code> - the index of the first entry of the subvector</dd><dd><code>end</code> - the index of the last entry of the subvector (inclusive)</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>start</code> of <code>end</code> are not valid</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>end < start</code></dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="add(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> add(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Compute the sum of this vector and <code>v</code>. |
| Returns a new vector. Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to be added.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> + <code>v</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="subtract(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> subtract(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Subtract <code>v</code> from this vector. |
| Returns a new vector. Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to be subtracted.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> - <code>v</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapAdd(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAdd</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapAdd(double d)</pre> |
| <div class="block">Add a value to each entry. |
| Returns a new vector. Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to be added to each entry.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> + <code>d</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapAddToSelf(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAddToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapAddToSelf(double d)</pre> |
| <div class="block">Add a value to each entry. |
| The instance is changed in-place.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to be added to each entry.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="copy()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copy</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> copy()</pre> |
| <div class="block">Returns a (deep) copy of this vector.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a vector copy.</dd></dl> |
| </li> |
| </ul> |
| <a name="dotProduct(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dotProduct</h4> |
| <pre>public double dotProduct(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Compute the dot product of this vector with <code>v</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector with which dot product should be computed</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the scalar dot product between this instance and <code>v</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="cosine(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cosine</h4> |
| <pre>public double cosine(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></pre> |
| <div class="block">Computes the cosine of the angle between this vector and the |
| argument.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the cosine of the angle between this vector and <code>v</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if <code>this</code> or <code>v</code> is the null |
| vector</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the dimensions of <code>this</code> and |
| <code>v</code> do not match</dd></dl> |
| </li> |
| </ul> |
| <a name="ebeDivide(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ebeDivide</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> ebeDivide(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Element-by-element division.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector by which instance elements must be divided.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a vector containing this[i] / v[i] for all i.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="ebeMultiply(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ebeMultiply</h4> |
| <pre>public abstract <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> ebeMultiply(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Element-by-element multiplication.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector by which instance elements must be multiplied</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a vector containing this[i] * v[i] for all i.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="getDistance(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDistance</h4> |
| <pre>public double getDistance(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Distance between two vectors. |
| <p>This method computes the distance consistent with the |
| L<sub>2</sub> norm, i.e. the square root of the sum of |
| element differences, or Euclidean distance.</p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to which distance is requested.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the distance between two vectors.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Distance(org.apache.commons.math3.linear.RealVector)"><code>getL1Distance(RealVector)</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfDistance(org.apache.commons.math3.linear.RealVector)"><code>getLInfDistance(RealVector)</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getNorm()"><code>getNorm()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getNorm()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNorm</h4> |
| <pre>public double getNorm()</pre> |
| <div class="block">Returns the L<sub>2</sub> norm of the vector. |
| <p>The L<sub>2</sub> norm is the root of the sum of |
| the squared elements.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the norm.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Norm()"><code>getL1Norm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfNorm()"><code>getLInfNorm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getDistance(org.apache.commons.math3.linear.RealVector)"><code>getDistance(RealVector)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getL1Norm()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getL1Norm</h4> |
| <pre>public double getL1Norm()</pre> |
| <div class="block">Returns the L<sub>1</sub> norm of the vector. |
| <p>The L<sub>1</sub> norm is the sum of the absolute |
| values of the elements.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the norm.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getNorm()"><code>getNorm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfNorm()"><code>getLInfNorm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Distance(org.apache.commons.math3.linear.RealVector)"><code>getL1Distance(RealVector)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getLInfNorm()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLInfNorm</h4> |
| <pre>public double getLInfNorm()</pre> |
| <div class="block">Returns the L<sub>∞</sub> norm of the vector. |
| <p>The L<sub>∞</sub> norm is the max of the absolute |
| values of the elements.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the norm.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getNorm()"><code>getNorm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Norm()"><code>getL1Norm()</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfDistance(org.apache.commons.math3.linear.RealVector)"><code>getLInfDistance(RealVector)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getL1Distance(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getL1Distance</h4> |
| <pre>public double getL1Distance(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Distance between two vectors. |
| <p>This method computes the distance consistent with |
| L<sub>1</sub> norm, i.e. the sum of the absolute values of |
| the elements differences.</p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to which distance is requested.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the distance between two vectors.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="getLInfDistance(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLInfDistance</h4> |
| <pre>public double getLInfDistance(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Distance between two vectors. |
| <p>This method computes the distance consistent with |
| L<sub>∞</sub> norm, i.e. the max of the absolute values of |
| element differences.</p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector to which distance is requested.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the distance between two vectors.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getDistance(org.apache.commons.math3.linear.RealVector)"><code>getDistance(RealVector)</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getL1Distance(org.apache.commons.math3.linear.RealVector)"><code>getL1Distance(RealVector)</code></a>, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html#getLInfNorm()"><code>getLInfNorm()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getMinIndex()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinIndex</h4> |
| <pre>public int getMinIndex()</pre> |
| <div class="block">Get the index of the minimum entry.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the index of the minimum entry or -1 if vector length is 0 |
| or all entries are <code>NaN</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getMinValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinValue</h4> |
| <pre>public double getMinValue()</pre> |
| <div class="block">Get the value of the minimum entry.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the value of the minimum entry or <code>NaN</code> if all |
| entries are <code>NaN</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getMaxIndex()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxIndex</h4> |
| <pre>public int getMaxIndex()</pre> |
| <div class="block">Get the index of the maximum entry.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the index of the maximum entry or -1 if vector length is 0 |
| or all entries are <code>NaN</code></dd></dl> |
| </li> |
| </ul> |
| <a name="getMaxValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxValue</h4> |
| <pre>public double getMaxValue()</pre> |
| <div class="block">Get the value of the maximum entry.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the value of the maximum entry or <code>NaN</code> if all |
| entries are <code>NaN</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapMultiply(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapMultiply</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapMultiply(double d)</pre> |
| <div class="block">Multiply each entry by the argument. Returns a new vector. |
| Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Multiplication factor.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> * <code>d</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapMultiplyToSelf(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapMultiplyToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapMultiplyToSelf(double d)</pre> |
| <div class="block">Multiply each entry. |
| The instance is changed in-place.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Multiplication factor.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapSubtract(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapSubtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapSubtract(double d)</pre> |
| <div class="block">Subtract a value from each entry. Returns a new vector. |
| Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to be subtracted.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> - <code>d</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapSubtractToSelf(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapSubtractToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapSubtractToSelf(double d)</pre> |
| <div class="block">Subtract a value from each entry. |
| The instance is changed in-place.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to be subtracted.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapDivide(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapDivide</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapDivide(double d)</pre> |
| <div class="block">Divide each entry by the argument. Returns a new vector. |
| Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to divide by.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code> / <code>d</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapDivideToSelf(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapDivideToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapDivideToSelf(double d)</pre> |
| <div class="block">Divide each entry by the argument. |
| The instance is changed in-place.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Value to divide by.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="outerProduct(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>outerProduct</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> outerProduct(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</pre> |
| <div class="block">Compute the outer product.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector with which outer product should be computed.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the matrix outer product between this instance and <code>v</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="projection(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>projection</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> projection(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></pre> |
| <div class="block">Find the orthogonal projection of this vector onto another vector.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - vector onto which instance must be projected.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>projection of the instance onto <code>v</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>v</code> is not the same size as |
| <code>this</code> vector.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if <code>this</code> or <code>v</code> is the null |
| vector</dd></dl> |
| </li> |
| </ul> |
| <a name="set(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre>public void set(double value)</pre> |
| <div class="block">Set all elements to a single value.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - Single value to set for all elements.</dd></dl> |
| </li> |
| </ul> |
| <a name="toArray()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toArray</h4> |
| <pre>public double[] toArray()</pre> |
| <div class="block">Convert the vector to an array of <code>double</code>s. |
| The array is independent from this vector data: the elements |
| are copied.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>an array containing a copy of the vector elements.</dd></dl> |
| </li> |
| </ul> |
| <a name="unitVector()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unitVector</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> unitVector() |
| throws <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></pre> |
| <div class="block">Creates a unit vector pointing in the direction of this vector. |
| The instance is not changed by this method.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a unit vector pointing in direction of this vector.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the norm is zero.</dd></dl> |
| </li> |
| </ul> |
| <a name="unitize()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unitize</h4> |
| <pre>public void unitize() |
| throws <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></pre> |
| <div class="block">Converts this vector into a unit vector. |
| The instance itself is changed by this method.</div> |
| <dl><dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the norm is zero.</dd></dl> |
| </li> |
| </ul> |
| <a name="sparseIterator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sparseIterator</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear">RealVector.Entry</a>> sparseIterator()</pre> |
| <div class="block">Create a sparse iterator over the vector, which may omit some entries. |
| The ommitted entries are either exact zeroes (for dense implementations) |
| or are the entries which are not stored (for real sparse vectors). |
| No guarantees are made about order of iteration. |
| |
| <p>Note: derived classes are required to return an <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a> that |
| returns non-null <a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear"><code>RealVector.Entry</code></a> objects as long as <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true#hasNext()" title="class or interface in java.util"><code>Iterator.hasNext()</code></a> |
| returns <code>true</code>.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a sparse iterator.</dd></dl> |
| </li> |
| </ul> |
| <a name="iterator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>iterator</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear">RealVector.Entry</a>> iterator()</pre> |
| <div class="block">Generic dense iterator. Iteration is in increasing order |
| of the vector index. |
| |
| <p>Note: derived classes are required to return an <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a> that |
| returns non-null <a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear"><code>RealVector.Entry</code></a> objects as long as <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true#hasNext()" title="class or interface in java.util"><code>Iterator.hasNext()</code></a> |
| returns <code>true</code>.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a dense iterator.</dd></dl> |
| </li> |
| </ul> |
| <a name="map(org.apache.commons.math3.analysis.UnivariateFunction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>map</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> map(<a href="../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</a> function)</pre> |
| <div class="block">Acts as if implemented as: |
| <pre> |
| return copy().mapToSelf(function); |
| </pre> |
| Returns a new vector. Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>function</code> - Function to apply to each entry.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a new vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="mapToSelf(org.apache.commons.math3.analysis.UnivariateFunction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> mapToSelf(<a href="../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</a> function)</pre> |
| <div class="block">Acts as if it is implemented as: |
| <pre> |
| Entry e = null; |
| for(Iterator<Entry> it = iterator(); it.hasNext(); e = it.next()) { |
| e.setValue(function.value(e.getValue())); |
| } |
| </pre> |
| Entries of this vector are modified in-place by this method.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>function</code> - Function to apply to each entry.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a reference to this vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="combine(double, double, org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>combine</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> combine(double a, |
| double b, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> y) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Returns a new vector representing <code>a * this + b * y</code>, the linear |
| combination of <code>this</code> and <code>y</code>. |
| Returns a new vector. Does not change instance data.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - Coefficient of <code>this</code>.</dd><dd><code>b</code> - Coefficient of <code>y</code>.</dd><dd><code>y</code> - Vector with which <code>this</code> is linearly combined.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a vector containing <code>a * this[i] + b * y[i]</code> for all |
| <code>i</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>y</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="combineToSelf(double, double, org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>combineToSelf</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> combineToSelf(double a, |
| double b, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> y) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Updates <code>this</code> with the linear combination of <code>this</code> and |
| <code>y</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - Weight of <code>this</code>.</dd><dd><code>b</code> - Weight of <code>y</code>.</dd><dd><code>y</code> - Vector with which <code>this</code> is linearly combined.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>this</code>, with components equal to |
| <code>a * this[i] + b * y[i]</code> for all <code>i</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>y</code> is not the same size as |
| <code>this</code> vector.</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInDefaultOrder</h4> |
| <pre>public double walkInDefaultOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor)</pre> |
| <div class="block">Visits (but does not alter) all entries of this vector in default order |
| (increasing index).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - the visitor to be used to process the entries of this |
| vector</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html#end()"><code>RealVectorPreservingVisitor.end()</code></a> |
| at the end of the walk</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInDefaultOrder</h4> |
| <pre>public double walkInDefaultOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor, |
| int start, |
| int end) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Visits (but does not alter) some entries of this vector in default order |
| (increasing index).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - visitor to be used to process the entries of this vector</dd><dd><code>start</code> - the index of the first entry to be visited</dd><dd><code>end</code> - the index of the last entry to be visited (inclusive)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html#end()"><code>RealVectorPreservingVisitor.end()</code></a> |
| at the end of the walk</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>end < start</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the indices are not valid.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInOptimizedOrder</h4> |
| <pre>public double walkInOptimizedOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor)</pre> |
| <div class="block">Visits (but does not alter) all entries of this vector in optimized |
| order. The order in which the entries are visited is selected so as to |
| lead to the most efficient implementation; it might depend on the |
| concrete implementation of this abstract class.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - the visitor to be used to process the entries of this |
| vector</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html#end()"><code>RealVectorPreservingVisitor.end()</code></a> |
| at the end of the walk</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorPreservingVisitor, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInOptimizedOrder</h4> |
| <pre>public double walkInOptimizedOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorPreservingVisitor</a> visitor, |
| int start, |
| int end) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Visits (but does not alter) some entries of this vector in optimized |
| order. The order in which the entries are visited is selected so as to |
| lead to the most efficient implementation; it might depend on the |
| concrete implementation of this abstract class.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - visitor to be used to process the entries of this vector</dd><dd><code>start</code> - the index of the first entry to be visited</dd><dd><code>end</code> - the index of the last entry to be visited (inclusive)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorPreservingVisitor.html#end()"><code>RealVectorPreservingVisitor.end()</code></a> |
| at the end of the walk</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>end < start</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the indices are not valid.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInDefaultOrder</h4> |
| <pre>public double walkInDefaultOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor)</pre> |
| <div class="block">Visits (and possibly alters) all entries of this vector in default order |
| (increasing index).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - the visitor to be used to process and modify the entries |
| of this vector</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html#end()"><code>RealVectorChangingVisitor.end()</code></a> |
| at the end of the walk</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInDefaultOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInDefaultOrder</h4> |
| <pre>public double walkInDefaultOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor, |
| int start, |
| int end) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Visits (and possibly alters) some entries of this vector in default order |
| (increasing index).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - visitor to be used to process the entries of this vector</dd><dd><code>start</code> - the index of the first entry to be visited</dd><dd><code>end</code> - the index of the last entry to be visited (inclusive)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html#end()"><code>RealVectorChangingVisitor.end()</code></a> |
| at the end of the walk</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>end < start</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the indices are not valid.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInOptimizedOrder</h4> |
| <pre>public double walkInOptimizedOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor)</pre> |
| <div class="block">Visits (and possibly alters) all entries of this vector in optimized |
| order. The order in which the entries are visited is selected so as to |
| lead to the most efficient implementation; it might depend on the |
| concrete implementation of this abstract class.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - the visitor to be used to process the entries of this |
| vector</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html#end()"><code>RealVectorChangingVisitor.end()</code></a> |
| at the end of the walk</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="walkInOptimizedOrder(org.apache.commons.math3.linear.RealVectorChangingVisitor, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>walkInOptimizedOrder</h4> |
| <pre>public double walkInOptimizedOrder(<a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html" title="interface in org.apache.commons.math3.linear">RealVectorChangingVisitor</a> visitor, |
| int start, |
| int end) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Visits (and possibly change) some entries of this vector in optimized |
| order. The order in which the entries are visited is selected so as to |
| lead to the most efficient implementation; it might depend on the |
| concrete implementation of this abstract class.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>visitor</code> - visitor to be used to process the entries of this vector</dd><dd><code>start</code> - the index of the first entry to be visited</dd><dd><code>end</code> - the index of the last entry to be visited (inclusive)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the value returned by <a href="../../../../../org/apache/commons/math3/linear/RealVectorChangingVisitor.html#end()"><code>RealVectorChangingVisitor.end()</code></a> |
| at the end of the walk</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>end < start</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the indices are not valid.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</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/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> other) |
| throws <a href="../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></pre> |
| <div class="block"><p> |
| Test for the equality of two real vectors. If all coordinates of two real |
| vectors are exactly the same, and none are <code>NaN</code>, the two real |
| vectors are considered to be equal. <code>NaN</code> coordinates are |
| considered to affect globally the vector and be equals to each other - |
| i.e, if either (or all) coordinates of the real vector are equal to |
| <code>NaN</code>, the real vector is equal to a vector with all <code>NaN</code> |
| coordinates. |
| </p> |
| <p> |
| This method <em>must</em> be overriden by concrete subclasses of |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> (the current implementation throws an exception). |
| </p></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> in class <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>other</code> - Object to test for equality.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if two vector objects are equal, <code>false</code> if |
| <code>other</code> is null, not an instance of <code>RealVector</code>, or |
| not equal to this <code>RealVector</code> instance.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></code> - if this method is not |
| overridden.</dd></dl> |
| </li> |
| </ul> |
| <a name="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public int hashCode() |
| throws <a href="../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></pre> |
| <div class="block">. This method <em>must</em> be overriden by concrete |
| subclasses of <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> (current implementation throws an |
| exception).</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> in class <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">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></code> - if this method is not |
| overridden.</dd></dl> |
| </li> |
| </ul> |
| <a name="unmodifiableRealVector(org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>unmodifiableRealVector</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> unmodifiableRealVector(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> v)</pre> |
| <div class="block">Returns an unmodifiable view of the specified vector. |
| The returned vector has read-only access. An attempt to modify it will |
| result in a <a href="../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception"><code>MathUnsupportedOperationException</code></a>. However, the |
| returned vector is <em>not</em> immutable, since any modification of |
| <code>v</code> will also change the returned view. |
| For example, in the following piece of code |
| <pre> |
| RealVector v = new ArrayRealVector(2); |
| RealVector w = RealVector.unmodifiableRealVector(v); |
| v.setEntry(0, 1.2); |
| v.setEntry(1, -3.4); |
| </pre> |
| the changes will be seen in the <code>w</code> view of <code>v</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - Vector for which an unmodifiable view is to be returned.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>an unmodifiable view of <code>v</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><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/RealVector.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/linear/RealMatrixPreservingVisitor.html" title="interface in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/linear/RealVector.Entry.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/linear/RealVector.html" target="_top">Frames</a></li> |
| <li><a href="RealVector.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><a href="#nested_class_summary">Nested</a> | </li> |
| <li>Field | </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 © 2003–2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |