| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_121) on Fri Apr 14 22:10:57 PDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ConstantVector (Mahout Math 0.13.0 API)</title> |
| <meta name="date" content="2017-04-14"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ConstantVector (Mahout Math 0.13.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ConstantVector.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/mahout/math/CholeskyDecomposition.html" title="class in org.apache.mahout.math"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/mahout/math/DelegatingVector.html" title="class in org.apache.mahout.math"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/mahout/math/ConstantVector.html" target="_top">Frames</a></li> |
| <li><a href="ConstantVector.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.classes.inherited.from.class.org.apache.mahout.math.AbstractVector">Nested</a> | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.mahout.math.AbstractVector">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.mahout.math</div> |
| <h2 title="Class ConstantVector" class="title">Class ConstantVector</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">org.apache.mahout.math.AbstractVector</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.mahout.math.ConstantVector</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, <a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">ConstantVector</span> |
| extends <a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></pre> |
| <div class="block">Implements a vector with all the same values.</div> |
| </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> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.mahout.math.AbstractVector"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.mahout.math.<a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></h3> |
| <code><a href="../../../../org/apache/mahout/math/AbstractVector.LocalElement.html" title="class in org.apache.mahout.math">AbstractVector.LocalElement</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.mahout.math.Vector"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface org.apache.mahout.math.<a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a></h3> |
| <code><a href="../../../../org/apache/mahout/math/Vector.Element.html" title="interface in org.apache.mahout.math">Vector.Element</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.mahout.math.AbstractVector"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.mahout.math.<a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></h3> |
| <code><a href="../../../../org/apache/mahout/math/AbstractVector.html#lengthSquared">lengthSquared</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#ConstantVector-double-int-">ConstantVector</a></span>(double value, |
| int size)</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#getIteratorAdvanceCost--">getIteratorAdvanceCost</a></span>()</code> |
| <div class="block">Gets an estimate of the cost (in number of operations) it takes to advance an iterator through the nonzero |
| elements of this vector.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#getLookupCost--">getLookupCost</a></span>()</code> |
| <div class="block">Gets an estimate of the cost (in number of operations) it takes to lookup a random element in this vector.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#getNumNondefaultElements--">getNumNondefaultElements</a></span>()</code> |
| <div class="block">Return the number of values in the recipient</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#getQuick-int-">getQuick</a></span>(int index)</code> |
| <div class="block">Return the value at the given index, without checking bounds</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#isAddConstantTime--">isAddConstantTime</a></span>()</code> |
| <div class="block">Return true iff adding a new (nonzero) element takes constant time for this vector.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#isDense--">isDense</a></span>()</code> |
| <div class="block">true if this implementation should be considered dense -- that it explicitly |
| represents every value</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#isSequentialAccess--">isSequentialAccess</a></span>()</code> |
| <div class="block">true if this implementation should be considered to be iterable in index order in an efficient way.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/mahout/math/Vector.Element.html" title="interface in org.apache.mahout.math">Vector.Element</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#iterateNonZero--">iterateNonZero</a></span>()</code> |
| <div class="block">Iterates over all non-zero elements.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/mahout/math/Vector.Element.html" title="interface in org.apache.mahout.math">Vector.Element</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#iterator--">iterator</a></span>()</code> |
| <div class="block">Iterates over all elements</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#like--">like</a></span>()</code> |
| <div class="block">Return an empty vector of the same underlying class as the receiver</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#like-int-">like</a></span>(int cardinality)</code> |
| <div class="block">Return a new empty vector of the same underlying class as the receiver with given cardinality</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../org/apache/mahout/math/Matrix.html" title="interface in org.apache.mahout.math">Matrix</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#matrixLike-int-int-">matrixLike</a></span>(int rows, |
| int columns)</code> |
| <div class="block">Subclasses must override to return an appropriately sparse or dense result</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#mergeUpdates-org.apache.mahout.math.OrderedIntDoubleMapping-">mergeUpdates</a></span>(<a href="../../../../org/apache/mahout/math/OrderedIntDoubleMapping.html" title="class in org.apache.mahout.math">OrderedIntDoubleMapping</a> updates)</code> |
| <div class="block">Used internally by assign() to update multiple indices and values at once.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/math/ConstantVector.html#setQuick-int-double-">setQuick</a></span>(int index, |
| double value)</code> |
| <div class="block">Set the value at the given index, without checking bounds</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.math.AbstractVector"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.mahout.math.<a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></h3> |
| <code><a href="../../../../org/apache/mahout/math/AbstractVector.html#aggregate-org.apache.mahout.math.function.DoubleDoubleFunction-org.apache.mahout.math.function.DoubleFunction-">aggregate</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#aggregate-org.apache.mahout.math.Vector-org.apache.mahout.math.function.DoubleDoubleFunction-org.apache.mahout.math.function.DoubleDoubleFunction-">aggregate</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#all--">all</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#asFormatString--">asFormatString</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-double-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-double:A-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-org.apache.mahout.math.function.DoubleDoubleFunction-double-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-org.apache.mahout.math.function.DoubleFunction-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-org.apache.mahout.math.Vector-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#assign-org.apache.mahout.math.Vector-org.apache.mahout.math.function.DoubleDoubleFunction-">assign</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#clone--">clone</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#createOptimizedCopy--">createOptimizedCopy</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#cross-org.apache.mahout.math.Vector-">cross</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#divide-double-">divide</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#dot-org.apache.mahout.math.Vector-">dot</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#dotSelf--">dotSelf</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#equals-java.lang.Object-">equals</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#get-int-">get</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#getDistanceSquared-org.apache.mahout.math.Vector-">getDistanceSquared</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#getElement-int-">getElement</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#getLengthSquared--">getLengthSquared</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#getNumNonZeroElements--">getNumNonZeroElements</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#hashCode--">hashCode</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#incrementQuick-int-double-">incrementQuick</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#invalidateCachedLength--">invalidateCachedLength</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#logNormalize--">logNormalize</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#logNormalize-double-">logNormalize</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#logNormalize-double-double-">logNormalize</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#maxValue--">maxValue</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#maxValueIndex--">maxValueIndex</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#minus-org.apache.mahout.math.Vector-">minus</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#minValue--">minValue</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#minValueIndex--">minValueIndex</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#nonZeroes--">nonZeroes</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#norm-double-">norm</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#normalize--">normalize</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#normalize-double-">normalize</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#plus-double-">plus</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#plus-org.apache.mahout.math.Vector-">plus</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#set-int-double-">set</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#size--">size</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#sparseVectorToString--">sparseVectorToString</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#times-double-">times</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#times-org.apache.mahout.math.Vector-">times</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#toString--">toString</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#toString-java.lang.String:A-">toString</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#viewPart-int-int-">viewPart</a>, <a href="../../../../org/apache/mahout/math/AbstractVector.html#zSum--">zSum</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ConstantVector-double-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ConstantVector</h4> |
| <pre>public ConstantVector(double value, |
| int size)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="matrixLike-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matrixLike</h4> |
| <pre>protected <a href="../../../../org/apache/mahout/math/Matrix.html" title="interface in org.apache.mahout.math">Matrix</a> matrixLike(int rows, |
| int columns)</pre> |
| <div class="block">Subclasses must override to return an appropriately sparse or dense result</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/mahout/math/AbstractVector.html#matrixLike-int-int-">matrixLike</a></code> in class <code><a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rows</code> - the row cardinality</dd> |
| <dd><code>columns</code> - the column cardinality</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a Matrix</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mergeUpdates-org.apache.mahout.math.OrderedIntDoubleMapping-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mergeUpdates</h4> |
| <pre>public void mergeUpdates(<a href="../../../../org/apache/mahout/math/OrderedIntDoubleMapping.html" title="class in org.apache.mahout.math">OrderedIntDoubleMapping</a> updates)</pre> |
| <div class="block">Used internally by assign() to update multiple indices and values at once. |
| Only really useful for sparse vectors (especially SequentialAccessSparseVector). |
| <p> |
| If someone ever adds a new type of sparse vectors, this method must merge (index, value) pairs into the vector.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>updates</code> - a mapping of indices to values to merge in the vector.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isDense--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDense</h4> |
| <pre>public boolean isDense()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#isDense--">Vector</a></code></span></div> |
| <div class="block">true if this implementation should be considered dense -- that it explicitly |
| represents every value</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true iff this implementation should be considered dense -- that it explicitly represents |
| every value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSequentialAccess--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSequentialAccess</h4> |
| <pre>public boolean isSequentialAccess()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#isSequentialAccess--">Vector</a></code></span></div> |
| <div class="block">true if this implementation should be considered to be iterable in index order in an efficient way. |
| In particular this implies that <a href="../../../../org/apache/mahout/math/Vector.html#all--"><code>Vector.all()</code></a> and <a href="../../../../org/apache/mahout/math/Vector.html#nonZeroes--"><code>Vector.nonZeroes()</code></a> ()} return elements |
| in ascending order by index.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true iff this implementation should be considered to be iterable in index order in an |
| efficient way. In particular this implies that <a href="../../../../org/apache/mahout/math/ConstantVector.html#iterator--"><code>iterator()</code></a> and <a href="../../../../org/apache/mahout/math/ConstantVector.html#iterateNonZero--"><code>iterateNonZero()</code></a> return elements in ascending order by index.</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/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/mahout/math/Vector.Element.html" title="interface in org.apache.mahout.math">Vector.Element</a>> iterator()</pre> |
| <div class="block">Iterates over all elements <p> |
| NOTE: Implementations may choose to reuse the Element returned |
| for performance reasons, so if you need a copy of it, you should call <a href="../../../../org/apache/mahout/math/AbstractVector.html#getElement-int-"><code>AbstractVector.getElement(int)</code></a> |
| for the given index</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/mahout/math/AbstractVector.html#iterator--">iterator</a></code> in class <code><a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a> over all elements</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="iterateNonZero--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>iterateNonZero</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/mahout/math/Vector.Element.html" title="interface in org.apache.mahout.math">Vector.Element</a>> iterateNonZero()</pre> |
| <div class="block">Iterates over all non-zero elements.<p> |
| NOTE: Implementations may choose to reuse the Element |
| returned for performance reasons, so if you need a copy of it, you should call <a href="../../../../org/apache/mahout/math/AbstractVector.html#getElement-int-"><code>AbstractVector.getElement(int)</code></a> for the given index</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/mahout/math/AbstractVector.html#iterateNonZero--">iterateNonZero</a></code> in class <code><a href="../../../../org/apache/mahout/math/AbstractVector.html" title="class in org.apache.mahout.math">AbstractVector</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a> over all non-zero elements</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getQuick-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuick</h4> |
| <pre>public double getQuick(int index)</pre> |
| <div class="block">Return the value at the given index, without checking bounds</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - an int index</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the double at the index</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="like--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>like</h4> |
| <pre>public <a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a> like()</pre> |
| <div class="block">Return an empty vector of the same underlying class as the receiver</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a Vector</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="like-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>like</h4> |
| <pre>public <a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math">Vector</a> like(int cardinality)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#like-int-">Vector</a></code></span></div> |
| <div class="block">Return a new empty vector of the same underlying class as the receiver with given cardinality</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cardinality</code> - - size of vector</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><a href="../../../../org/apache/mahout/math/Vector.html" title="interface in org.apache.mahout.math"><code>Vector</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setQuick-int-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setQuick</h4> |
| <pre>public void setQuick(int index, |
| double value)</pre> |
| <div class="block">Set the value at the given index, without checking bounds</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - an int index into the receiver</dd> |
| <dd><code>value</code> - a double value to set</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNumNondefaultElements--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumNondefaultElements</h4> |
| <pre>public int getNumNondefaultElements()</pre> |
| <div class="block">Return the number of values in the recipient</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an int</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLookupCost--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLookupCost</h4> |
| <pre>public double getLookupCost()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#getLookupCost--">Vector</a></code></span></div> |
| <div class="block">Gets an estimate of the cost (in number of operations) it takes to lookup a random element in this vector.</div> |
| </li> |
| </ul> |
| <a name="getIteratorAdvanceCost--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIteratorAdvanceCost</h4> |
| <pre>public double getIteratorAdvanceCost()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#getIteratorAdvanceCost--">Vector</a></code></span></div> |
| <div class="block">Gets an estimate of the cost (in number of operations) it takes to advance an iterator through the nonzero |
| elements of this vector.</div> |
| </li> |
| </ul> |
| <a name="isAddConstantTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>isAddConstantTime</h4> |
| <pre>public boolean isAddConstantTime()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/mahout/math/Vector.html#isAddConstantTime--">Vector</a></code></span></div> |
| <div class="block">Return true iff adding a new (nonzero) element takes constant time for this vector.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ConstantVector.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/mahout/math/CholeskyDecomposition.html" title="class in org.apache.mahout.math"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/mahout/math/DelegatingVector.html" title="class in org.apache.mahout.math"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/mahout/math/ConstantVector.html" target="_top">Frames</a></li> |
| <li><a href="ConstantVector.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.classes.inherited.from.class.org.apache.mahout.math.AbstractVector">Nested</a> | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.mahout.math.AbstractVector">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2008–2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |