<!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 (version 1.7.0_51) on Wed Sep 16 10:26:34 PDT 2015 -->
<title>DenseMatrix</title>
<meta name="date" content="2015-09-16">
<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="DenseMatrix";
}
//-->
</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="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>Prev Class</li>
<li><a href="../../../../../org/apache/spark/mllib/linalg/DenseVector.html" title="class in org.apache.spark.mllib.linalg"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/linalg/DenseMatrix.html" target="_top">Frames</a></li>
<li><a href="DenseMatrix.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>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.spark.mllib.linalg</div>
<h2 title="Class DenseMatrix" class="title">Class DenseMatrix</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.mllib.linalg.DenseMatrix</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">DenseMatrix</span>
extends java.lang.Object
implements <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></pre>
<div class="block">Column-major dense matrix.
The entry values are stored in a single array of doubles with columns listed in sequence.
For example, the following matrix
<pre><code>
1.0 2.0
3.0 4.0
5.0 6.0
</code></pre>
is stored as <code>[1.0, 3.0, 5.0, 2.0, 4.0, 6.0]</code>.
<p>
param: numRows number of rows
param: numCols number of columns
param: values matrix entries in column major if not transposed or in row major otherwise
param: isTransposed whether the matrix is transposed. If true, <code>values</code> stores the matrix in
row major.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.linalg.DenseMatrix">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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/spark/mllib/linalg/DenseMatrix.html#DenseMatrix(int, int, double[])">DenseMatrix</a></strong>(int numRows,
int numCols,
double[] values)</code>
<div class="block">Column-major dense matrix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#DenseMatrix(int, int, double[], boolean)">DenseMatrix</a></strong>(int numRows,
int numCols,
double[] values,
boolean isTransposed)</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>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#apply(int, int)">apply</a></strong>(int i,
int j)</code>
<div class="block">Gets the (i, j)-th element.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#copy()">copy</a></strong>()</code>
<div class="block">Get a deep copy of the matrix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#diag(org.apache.spark.mllib.linalg.Vector)">diag</a></strong>(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> vector)</code>
<div class="block">Generate a diagonal matrix in <code>DenseMatrix</code> format from the supplied values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object o)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#eye(int)">eye</a></strong>(int n)</code>
<div class="block">Generate an Identity Matrix in <code>DenseMatrix</code> format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#isTransposed()">isTransposed</a></strong>()</code>
<div class="block">Flag that keeps track whether the matrix is transposed or not.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#numActives()">numActives</a></strong>()</code>
<div class="block">Find the number of values stored explicitly.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#numCols()">numCols</a></strong>()</code>
<div class="block">Number of columns.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#numNonzeros()">numNonzeros</a></strong>()</code>
<div class="block">Find the number of non-zero active values.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#numRows()">numRows</a></strong>()</code>
<div class="block">Number of rows.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#ones(int, int)">ones</a></strong>(int numRows,
int numCols)</code>
<div class="block">Generate a <code>DenseMatrix</code> consisting of ones.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#rand(int, int, java.util.Random)">rand</a></strong>(int numRows,
int numCols,
java.util.Random rng)</code>
<div class="block">Generate a <code>DenseMatrix</code> consisting of <code>i.i.d.</code> uniform random numbers.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#randn(int, int, java.util.Random)">randn</a></strong>(int numRows,
int numCols,
java.util.Random rng)</code>
<div class="block">Generate a <code>DenseMatrix</code> consisting of <code>i.i.d.</code> gaussian random numbers.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/SparseMatrix.html" title="class in org.apache.spark.mllib.linalg">SparseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#toSparse()">toSparse</a></strong>()</code>
<div class="block">Generate a <code>SparseMatrix</code> from the given <code>DenseMatrix</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#transpose()">transpose</a></strong>()</code>
<div class="block">Transpose the Matrix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#values()">values</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html#zeros(int, int)">zeros</a></strong>(int numRows,
int numCols)</code>
<div class="block">Generate a <code>DenseMatrix</code> consisting of zeros.</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.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.mllib.linalg.Matrix">
<!-- -->
</a>
<h3>Methods inherited from interface org.apache.spark.mllib.linalg.<a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></h3>
<code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#multiply(org.apache.spark.mllib.linalg.DenseMatrix)">multiply</a>, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#multiply(org.apache.spark.mllib.linalg.DenseVector)">multiply</a>, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#multiply(org.apache.spark.mllib.linalg.Vector)">multiply</a>, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#toArray()">toArray</a>, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#toString()">toString</a>, <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#toString(int, int)">toString</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="DenseMatrix(int, int, double[], boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DenseMatrix</h4>
<pre>public DenseMatrix(int numRows,
int numCols,
double[] values,
boolean isTransposed)</pre>
</li>
</ul>
<a name="DenseMatrix(int, int, double[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DenseMatrix</h4>
<pre>public DenseMatrix(int numRows,
int numCols,
double[] values)</pre>
<div class="block">Column-major dense matrix.
The entry values are stored in a single array of doubles with columns listed in sequence.
For example, the following matrix
<pre><code>
1.0 2.0
3.0 4.0
5.0 6.0
</code></pre>
is stored as <code>[1.0, 3.0, 5.0, 2.0, 4.0, 6.0]</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numRows</code> - number of rows</dd><dd><code>numCols</code> - number of columns</dd><dd><code>values</code> - matrix entries in column major</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="zeros(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zeros</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> zeros(int numRows,
int numCols)</pre>
<div class="block">Generate a <code>DenseMatrix</code> consisting of zeros.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numRows</code> - number of rows of the matrix</dd><dd><code>numCols</code> - number of columns of the matrix</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>DenseMatrix</code> with size <code>numRows</code> x <code>numCols</code> and values of zeros</dd></dl>
</li>
</ul>
<a name="ones(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ones</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> ones(int numRows,
int numCols)</pre>
<div class="block">Generate a <code>DenseMatrix</code> consisting of ones.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numRows</code> - number of rows of the matrix</dd><dd><code>numCols</code> - number of columns of the matrix</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>DenseMatrix</code> with size <code>numRows</code> x <code>numCols</code> and values of ones</dd></dl>
</li>
</ul>
<a name="eye(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>eye</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> eye(int n)</pre>
<div class="block">Generate an Identity Matrix in <code>DenseMatrix</code> format.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - number of rows and columns of the matrix</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>DenseMatrix</code> with size <code>n</code> x <code>n</code> and values of ones on the diagonal</dd></dl>
</li>
</ul>
<a name="rand(int, int, java.util.Random)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rand</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> rand(int numRows,
int numCols,
java.util.Random rng)</pre>
<div class="block">Generate a <code>DenseMatrix</code> consisting of <code>i.i.d.</code> uniform random numbers.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numRows</code> - number of rows of the matrix</dd><dd><code>numCols</code> - number of columns of the matrix</dd><dd><code>rng</code> - a random number generator</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>DenseMatrix</code> with size <code>numRows</code> x <code>numCols</code> and values in U(0, 1)</dd></dl>
</li>
</ul>
<a name="randn(int, int, java.util.Random)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>randn</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> randn(int numRows,
int numCols,
java.util.Random rng)</pre>
<div class="block">Generate a <code>DenseMatrix</code> consisting of <code>i.i.d.</code> gaussian random numbers.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numRows</code> - number of rows of the matrix</dd><dd><code>numCols</code> - number of columns of the matrix</dd><dd><code>rng</code> - a random number generator</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>DenseMatrix</code> with size <code>numRows</code> x <code>numCols</code> and values in N(0, 1)</dd></dl>
</li>
</ul>
<a name="diag(org.apache.spark.mllib.linalg.Vector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>diag</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> diag(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> vector)</pre>
<div class="block">Generate a diagonal matrix in <code>DenseMatrix</code> format from the supplied values.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>vector</code> - a <code>Vector</code> that will form the values on the diagonal of the matrix</dd>
<dt><span class="strong">Returns:</span></dt><dd>Square <code>DenseMatrix</code> with size <code>values.length</code> x <code>values.length</code> and <code>values</code>
on the diagonal</dd></dl>
</li>
</ul>
<a name="numRows()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numRows</h4>
<pre>public int numRows()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numRows()">Matrix</a></code></strong></div>
<div class="block">Number of rows.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numRows()">numRows</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="numCols()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numCols</h4>
<pre>public int numCols()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numCols()">Matrix</a></code></strong></div>
<div class="block">Number of columns.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numCols()">numCols</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="values()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public double[] values()</pre>
</li>
</ul>
<a name="isTransposed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTransposed</h4>
<pre>public boolean isTransposed()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#isTransposed()">Matrix</a></code></strong></div>
<div class="block">Flag that keeps track whether the matrix is transposed or not. False by default.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#isTransposed()">isTransposed</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object o)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="apply(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public double apply(int i,
int j)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#apply(int, int)">Matrix</a></code></strong></div>
<div class="block">Gets the (i, j)-th element.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#apply(int, int)">apply</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="copy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> copy()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#copy()">Matrix</a></code></strong></div>
<div class="block">Get a deep copy of the matrix.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#copy()">copy</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="transpose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transpose</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/linalg/DenseMatrix.html" title="class in org.apache.spark.mllib.linalg">DenseMatrix</a> transpose()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#transpose()">Matrix</a></code></strong></div>
<div class="block">Transpose the Matrix. Returns a new `Matrix` instance sharing the same underlying data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#transpose()">transpose</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
</dl>
</li>
</ul>
<a name="numNonzeros()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numNonzeros</h4>
<pre>public int numNonzeros()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numNonzeros()">Matrix</a></code></strong></div>
<div class="block">Find the number of non-zero active values.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numNonzeros()">numNonzeros</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="numActives()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numActives</h4>
<pre>public int numActives()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numActives()">Matrix</a></code></strong></div>
<div class="block">Find the number of values stored explicitly. These values can be zero as well.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html#numActives()">numActives</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="toSparse()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toSparse</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/linalg/SparseMatrix.html" title="class in org.apache.spark.mllib.linalg">SparseMatrix</a> toSparse()</pre>
<div class="block">Generate a <code>SparseMatrix</code> from the given <code>DenseMatrix</code>. The new matrix will have isTransposed
set to false.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</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="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>Prev Class</li>
<li><a href="../../../../../org/apache/spark/mllib/linalg/DenseVector.html" title="class in org.apache.spark.mllib.linalg"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/linalg/DenseMatrix.html" target="_top">Frames</a></li>
<li><a href="DenseMatrix.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>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 ======= -->
<script defer="defer" type="text/javascript" src="../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../../lib/api-javadocs.js"></script></body>
</html>