<!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 15:55:09 PDT 2015 -->
<title>BlockMatrix</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="BlockMatrix";
}
//-->
</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/distributed/CoordinateMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" target="_top">Frames</a></li>
<li><a href="BlockMatrix.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.distributed</div>
<h2 title="Class BlockMatrix" class="title">Class BlockMatrix</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.mllib.linalg.distributed.BlockMatrix</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/Logging.html" title="interface in org.apache.spark">Logging</a>, <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html" title="interface in org.apache.spark.mllib.linalg.distributed">DistributedMatrix</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">BlockMatrix</span>
extends java.lang.Object
implements <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html" title="interface in org.apache.spark.mllib.linalg.distributed">DistributedMatrix</a>, <a href="../../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></pre>
<div class="block">:: Experimental ::
<p>
Represents a distributed matrix in blocks of local matrices.
<p>
param: blocks The RDD of sub-matrix blocks ((blockRowIndex, blockColIndex), sub-matrix) that
form this distributed matrix. If multiple blocks with the same index exist, the
results for operations like add and multiply will be unpredictable.
param: rowsPerBlock Number of rows that make up each block. The blocks forming the final
rows are not required to have the given number of rows
param: colsPerBlock Number of columns that make up each block. The blocks forming the final
columns are not required to have the given number of columns
param: nRows Number of rows of this matrix. If the supplied value is less than or equal to zero,
the number of rows will be calculated when <code>numRows</code> is invoked.
param: nCols Number of columns of this matrix. If the supplied value is less than or equal to
zero, the number of columns will be calculated when <code>numCols</code> is invoked.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../serialized-form.html#org.apache.spark.mllib.linalg.distributed.BlockMatrix">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/distributed/BlockMatrix.html#BlockMatrix(org.apache.spark.rdd.RDD, int, int)">BlockMatrix</a></strong>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>> blocks,
int rowsPerBlock,
int colsPerBlock)</code>
<div class="block">Alternate constructor for BlockMatrix without the input of the number of rows and columns.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#BlockMatrix(org.apache.spark.rdd.RDD, int, int, long, long)">BlockMatrix</a></strong>(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>> blocks,
int rowsPerBlock,
int colsPerBlock,
long nRows,
long nCols)</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/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#add(org.apache.spark.mllib.linalg.distributed.BlockMatrix)">add</a></strong>(<a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> other)</code>
<div class="block">Adds two block matrices together.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#blocks()">blocks</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#cache()">cache</a></strong>()</code>
<div class="block">Caches the underlying RDD.</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/distributed/BlockMatrix.html#colsPerBlock()">colsPerBlock</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#multiply(org.apache.spark.mllib.linalg.distributed.BlockMatrix)">multiply</a></strong>(<a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> other)</code>
<div class="block">Left multiplies this <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><code>BlockMatrix</code></a> to <code>other</code>, another <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><code>BlockMatrix</code></a>.</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/distributed/BlockMatrix.html#numColBlocks()">numColBlocks</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#numCols()">numCols</a></strong>()</code>
<div class="block">Gets or computes the 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/distributed/BlockMatrix.html#numRowBlocks()">numRowBlocks</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#numRows()">numRows</a></strong>()</code>
<div class="block">Gets or computes the number of rows.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#persist(org.apache.spark.storage.StorageLevel)">persist</a></strong>(<a href="../../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</code>
<div class="block">Persists the underlying RDD with the specified storage level.</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/distributed/BlockMatrix.html#rowsPerBlock()">rowsPerBlock</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/CoordinateMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">CoordinateMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#toCoordinateMatrix()">toCoordinateMatrix</a></strong>()</code>
<div class="block">Converts to CoordinateMatrix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/IndexedRowMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">IndexedRowMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#toIndexedRowMatrix()">toIndexedRowMatrix</a></strong>()</code>
<div class="block">Converts to IndexedRowMatrix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#toLocalMatrix()">toLocalMatrix</a></strong>()</code>
<div class="block">Collect the distributed matrix on the driver as a `DenseMatrix`.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#transpose()">transpose</a></strong>()</code>
<div class="block">Transpose this <code>BlockMatrix</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html#validate()">validate</a></strong>()</code>
<div class="block">Validates the block matrix info against the matrix data (<code>blocks</code>) and throws an exception if
any error is found.</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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.Logging">
<!-- -->
</a>
<h3>Methods inherited from interface org.apache.spark.<a href="../../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></h3>
<code><a href="../../../../../../org/apache/spark/Logging.html#initializeIfNecessary()">initializeIfNecessary</a>, <a href="../../../../../../org/apache/spark/Logging.html#initializeLogging()">initializeLogging</a>, <a href="../../../../../../org/apache/spark/Logging.html#isTraceEnabled()">isTraceEnabled</a>, <a href="../../../../../../org/apache/spark/Logging.html#log_()">log_</a>, <a href="../../../../../../org/apache/spark/Logging.html#log()">log</a>, <a href="../../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0)">logDebug</a>, <a href="../../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0, java.lang.Throwable)">logDebug</a>, <a href="../../../../../../org/apache/spark/Logging.html#logError(scala.Function0)">logError</a>, <a href="../../../../../../org/apache/spark/Logging.html#logError(scala.Function0, java.lang.Throwable)">logError</a>, <a href="../../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0)">logInfo</a>, <a href="../../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0, java.lang.Throwable)">logInfo</a>, <a href="../../../../../../org/apache/spark/Logging.html#logName()">logName</a>, <a href="../../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0)">logTrace</a>, <a href="../../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0, java.lang.Throwable)">logTrace</a>, <a href="../../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0)">logWarning</a>, <a href="../../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0, java.lang.Throwable)">logWarning</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="BlockMatrix(org.apache.spark.rdd.RDD, int, int, long, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BlockMatrix</h4>
<pre>public BlockMatrix(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>> blocks,
int rowsPerBlock,
int colsPerBlock,
long nRows,
long nCols)</pre>
</li>
</ul>
<a name="BlockMatrix(org.apache.spark.rdd.RDD, int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BlockMatrix</h4>
<pre>public BlockMatrix(<a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>> blocks,
int rowsPerBlock,
int colsPerBlock)</pre>
<div class="block">Alternate constructor for BlockMatrix without the input of the number of rows and columns.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>blocks</code> - The RDD of sub-matrix blocks ((blockRowIndex, blockColIndex), sub-matrix) that
form this distributed matrix. If multiple blocks with the same index exist, the
results for operations like add and multiply will be unpredictable.</dd><dd><code>rowsPerBlock</code> - Number of rows that make up each block. The blocks forming the final
rows are not required to have the given number of rows</dd><dd><code>colsPerBlock</code> - Number of columns that make up each block. The blocks forming the final
columns are not required to have the given number of columns</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="blocks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blocks</h4>
<pre>public <a href="../../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,<a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>>> blocks()</pre>
</li>
</ul>
<a name="rowsPerBlock()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rowsPerBlock</h4>
<pre>public int rowsPerBlock()</pre>
</li>
</ul>
<a name="colsPerBlock()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>colsPerBlock</h4>
<pre>public int colsPerBlock()</pre>
</li>
</ul>
<a name="numRows()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numRows</h4>
<pre>public long numRows()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html#numRows()">DistributedMatrix</a></code></strong></div>
<div class="block">Gets or computes the number of rows.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html#numRows()">numRows</a></code> in interface <code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html" title="interface in org.apache.spark.mllib.linalg.distributed">DistributedMatrix</a></code></dd>
</dl>
</li>
</ul>
<a name="numCols()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numCols</h4>
<pre>public long numCols()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html#numCols()">DistributedMatrix</a></code></strong></div>
<div class="block">Gets or computes the number of columns.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html#numCols()">numCols</a></code> in interface <code><a href="../../../../../../org/apache/spark/mllib/linalg/distributed/DistributedMatrix.html" title="interface in org.apache.spark.mllib.linalg.distributed">DistributedMatrix</a></code></dd>
</dl>
</li>
</ul>
<a name="numRowBlocks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numRowBlocks</h4>
<pre>public int numRowBlocks()</pre>
</li>
</ul>
<a name="numColBlocks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numColBlocks</h4>
<pre>public int numColBlocks()</pre>
</li>
</ul>
<a name="validate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>public void validate()</pre>
<div class="block">Validates the block matrix info against the matrix data (<code>blocks</code>) and throws an exception if
any error is found.</div>
</li>
</ul>
<a name="cache()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cache</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> cache()</pre>
<div class="block">Caches the underlying RDD.</div>
</li>
</ul>
<a name="persist(org.apache.spark.storage.StorageLevel)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>persist</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> persist(<a href="../../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</pre>
<div class="block">Persists the underlying RDD with the specified storage level.</div>
</li>
</ul>
<a name="toCoordinateMatrix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCoordinateMatrix</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/CoordinateMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">CoordinateMatrix</a> toCoordinateMatrix()</pre>
<div class="block">Converts to CoordinateMatrix.</div>
</li>
</ul>
<a name="toIndexedRowMatrix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toIndexedRowMatrix</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/IndexedRowMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">IndexedRowMatrix</a> toIndexedRowMatrix()</pre>
<div class="block">Converts to IndexedRowMatrix. The number of columns must be within the integer range.</div>
</li>
</ul>
<a name="toLocalMatrix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLocalMatrix</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a> toLocalMatrix()</pre>
<div class="block">Collect the distributed matrix on the driver as a `DenseMatrix`.</div>
</li>
</ul>
<a name="transpose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transpose</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> transpose()</pre>
<div class="block">Transpose this <code>BlockMatrix</code>. Returns a new <code>BlockMatrix</code> instance sharing the
same underlying data. Is a lazy operation.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="add(org.apache.spark.mllib.linalg.distributed.BlockMatrix)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> add(<a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> other)</pre>
<div class="block">Adds two block matrices together. The matrices must have the same size and matching
<code>rowsPerBlock</code> and <code>colsPerBlock</code> values. If one of the blocks that are being added are
instances of <code>SparseMatrix</code>, the resulting sub matrix will also be a <code>SparseMatrix</code>, even
if it is being added to a <code>DenseMatrix</code>. If two dense matrices are added, the output will
also be a <code>DenseMatrix</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="multiply(org.apache.spark.mllib.linalg.distributed.BlockMatrix)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>multiply</h4>
<pre>public <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> multiply(<a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed">BlockMatrix</a> other)</pre>
<div class="block">Left multiplies this <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><code>BlockMatrix</code></a> to <code>other</code>, another <a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><code>BlockMatrix</code></a>. The <code>colsPerBlock</code>
of this matrix must equal the <code>rowsPerBlock</code> of <code>other</code>. If <code>other</code> contains
<code>SparseMatrix</code>, they will have to be converted to a <code>DenseMatrix</code>. The output
<a href="../../../../../../org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><code>BlockMatrix</code></a> will only consist of blocks of <code>DenseMatrix</code>. This may cause
some performance issues until support for multiplying two sparse matrices is added.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - (undocumented)</dd>
<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/distributed/CoordinateMatrix.html" title="class in org.apache.spark.mllib.linalg.distributed"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/spark/mllib/linalg/distributed/BlockMatrix.html" target="_top">Frames</a></li>
<li><a href="BlockMatrix.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>