blob: dc006184c8adba73a276226f165531aed6ebd6f3 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SparseBlock (SystemDS 2.1.0-SNAPSHOT API)</title>
<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="SparseBlock (SystemDS 2.1.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":10,"i11":10,"i12":10,"i13":6,"i14":10,"i15":10,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/SparseBlock.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/sysds/runtime/data/LibTensorReorg.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/sysds/runtime/data/SparseBlock.html" target="_top">Frames</a></li>
<li><a href="SparseBlock.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.sysds.runtime.data</div>
<h2 title="Class SparseBlock" class="title">Class SparseBlock</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.sysds.runtime.data.SparseBlock</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html" title="class in org.apache.sysds.runtime.data">SparseBlockCOO</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html" title="class in org.apache.sysds.runtime.data">SparseBlockCSR</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlockMCSR.html" title="class in org.apache.sysds.runtime.data">SparseBlockMCSR</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">SparseBlock</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">This SparseBlock is an abstraction for different sparse matrix formats.
Since the design is a tradeoff between performance and generality, we
restrict this abstraction to row-major sparse representations for now.
All sparse matrix block operations are supposed to be implemented
against this abstraction in order to enable variability/extensibility.
Example sparse format that can be implemented efficiently include
CSR, MCSR, and - with performance drawbacks - COO.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.sysds.runtime.data.SparseBlock">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data">SparseBlock.Type</a></span></code>&nbsp;</td>
</tr>
</table>
</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">&nbsp;</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/sysds/runtime/data/SparseBlock.html#SparseBlock--">SparseBlock</a></span>()</code>&nbsp;</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#add-int-int-double-">add</a></span>(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</code>
<div class="block">Add a value to a matrix cell (r,c).</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-">allocate</a></span>(int&nbsp;r)</code>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r if necessary.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-">allocate</a></span>(int&nbsp;r,
int&nbsp;nnz)</code>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r if necessary, w/ given size.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-int-">allocate</a></span>(int&nbsp;r,
int&nbsp;ennz,
int&nbsp;maxnnz)</code>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r w/ the specified estimated nnz and max nnz.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#append-int-int-double-">append</a></span>(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</code>
<div class="block">Append a value to the end of the physical representation.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#checkValidity-int-int-long-boolean-">checkValidity</a></span>(int&nbsp;rlen,
int&nbsp;clen,
long&nbsp;nnz,
boolean&nbsp;strict)</code>
<div class="block">Validate the correctness of the internal data structures of the different
sparse block implementations.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#compact-int-">compact</a></span>(int&nbsp;r)</code>
<div class="block">Re-allocate physical row if physical size exceeds
logical size plus resize factor.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#deleteIndexRange-int-int-int-">deleteIndexRange</a></span>(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu)</code>
<div class="block">Deletes all non-zero values of the given column range [cl,cu) in row r.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-">get</a></span>(int&nbsp;r)</code>
<div class="block">Get values of row r in the format of a sparse row.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-int-">get</a></span>(int&nbsp;r,
int&nbsp;c)</code>
<div class="block">Get value of matrix cell (r,c).</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator--">getIterator</a></span>()</code>
<div class="block">Get a non-zero iterator over the entire sparse block.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-">getIterator</a></span>(int&nbsp;ru)</code>
<div class="block">Get a non-zero iterator over the partial sparse block [0,ru).</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-int-">getIterator</a></span>(int&nbsp;rl,
int&nbsp;ru)</code>
<div class="block">Get a non-zero iterator over the subblock [rl, ru).</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>abstract int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#indexes-int-">indexes</a></span>(int&nbsp;r)</code>
<div class="block">Get the sorted array of column indexes of all non-zero entries in
row r.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAligned-int-org.apache.sysds.runtime.data.SparseBlock-">isAligned</a></span>(int&nbsp;r,
<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a>&nbsp;that)</code>
<div class="block">Indicates if all non-zero values of row r are aligned with
the same row of the given second sparse block instance, which
can be exploited for more efficient operations.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAligned-org.apache.sysds.runtime.data.SparseBlock-">isAligned</a></span>(<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a>&nbsp;that)</code>
<div class="block">Indicates if all non-zero values are aligned with the given
second sparse block instance, which can be exploited for
more efficient operations.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAllocated-int-">isAllocated</a></span>(int&nbsp;r)</code>
<div class="block">Indicates if the underlying data structure for a given row
is already allocated.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isContiguous--">isContiguous</a></span>()</code>
<div class="block">Indicates if the underlying data structures returned by values
and indexes are contiguous arrays, which can be exploited for
more efficient operations.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isEmpty-int-">isEmpty</a></span>(int&nbsp;r)</code>
<div class="block">Get information if row r is empty, i.e., does not contain non-zero
values.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isThreadSafe--">isThreadSafe</a></span>()</code>
<div class="block">Indicates if the underlying implementation allows thread-safe row
updates if concurrent threads update disjoint rows.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#numRows--">numRows</a></span>()</code>
<div class="block">Get the number of rows in the sparse block.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#pos-int-">pos</a></span>(int&nbsp;r)</code>
<div class="block">Get the starting position of row r in the indexes/values arrays returned
by indexes(r) and values(r).</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGT-int-int-">posFIndexGT</a></span>(int&nbsp;r,
int&nbsp;c)</code>
<div class="block">Get position of first column index greater than column c in row r.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGTE-int-int-">posFIndexGTE</a></span>(int&nbsp;r,
int&nbsp;c)</code>
<div class="block">Get position of first column index greater than or equal column c
in row r.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexLTE-int-int-">posFIndexLTE</a></span>(int&nbsp;r,
int&nbsp;c)</code>
<div class="block">Get position of first column index lower than or equal column c
in row r.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset--">reset</a></span>()</code>
<div class="block">Clears the sparse block by deleting non-zero values.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-">reset</a></span>(int&nbsp;ennz,
int&nbsp;maxnnz)</code>
<div class="block">Clears the sparse block by deleting non-zero values.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-int-">reset</a></span>(int&nbsp;r,
int&nbsp;ennz,
int&nbsp;maxnnz)</code>
<div class="block">Clears row r of the sparse block by deleting non-zero values.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-int-double-">set</a></span>(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</code>
<div class="block">Set the value of a matrix cell (r,c).</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-org.apache.sysds.runtime.data.SparseRow-boolean-">set</a></span>(int&nbsp;r,
<a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a>&nbsp;row,
boolean&nbsp;deep)</code>
<div class="block">Set the values of row r to the given sparse row.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int:A-int-int-">setIndexRange</a></span>(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu,
double[]&nbsp;v,
int[]&nbsp;vix,
int&nbsp;vpos,
int&nbsp;vlen)</code>
<div class="block">Sets a sparse array of non-zeros values and indexes into the column range [cl,cu)
in row r.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int-int-">setIndexRange</a></span>(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu,
double[]&nbsp;v,
int&nbsp;vix,
int&nbsp;vlen)</code>
<div class="block">Sets a dense array of non-zeros values into the column range [cl,cu)
in row r.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size--">size</a></span>()</code>
<div class="block">Get the number of non-zero values in the sparse block.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-">size</a></span>(int&nbsp;r)</code>
<div class="block">Get the number of non-zero values in row r.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-">size</a></span>(int&nbsp;rl,
int&nbsp;ru)</code>
<div class="block">Get the number of non-zeros values in the row range
of [rl, ru).</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-int-int-">size</a></span>(int&nbsp;rl,
int&nbsp;ru,
int&nbsp;cl,
int&nbsp;cu)</code>
<div class="block">Get the number of non-zeros values in the row and column
range of [rl/cl, ru/cu);</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort--">sort</a></span>()</code>
<div class="block">Sort all non-zero value/index pairs of the sparse block by row
and column index.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort-int-">sort</a></span>(int&nbsp;r)</code>
<div class="block">Sort all non-zero value/index pairs of row r column index.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>abstract double[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#values-int-">values</a></span>(int&nbsp;r)</code>
<div class="block">Get the array of all non-zero entries in row r, sorted by their column
indexes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/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="SparseBlock--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SparseBlock</h4>
<pre>public&nbsp;SparseBlock()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="allocate-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocate</h4>
<pre>public abstract&nbsp;void&nbsp;allocate(int&nbsp;r)</pre>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r if necessary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
</dl>
</li>
</ul>
<a name="allocate-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocate</h4>
<pre>public abstract&nbsp;void&nbsp;allocate(int&nbsp;r,
int&nbsp;nnz)</pre>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r if necessary, w/ given size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
<dd><code>nnz</code> - number of non-zeros</dd>
</dl>
</li>
</ul>
<a name="allocate-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocate</h4>
<pre>public abstract&nbsp;void&nbsp;allocate(int&nbsp;r,
int&nbsp;ennz,
int&nbsp;maxnnz)</pre>
<div class="block">Allocate the underlying data structure holding non-zero values
of row r w/ the specified estimated nnz and max nnz.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
<dd><code>ennz</code> - estimated non-zeros</dd>
<dd><code>maxnnz</code> - max non-zeros</dd>
</dl>
</li>
</ul>
<a name="compact-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compact</h4>
<pre>public abstract&nbsp;void&nbsp;compact(int&nbsp;r)</pre>
<div class="block">Re-allocate physical row if physical size exceeds
logical size plus resize factor.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
</dl>
</li>
</ul>
<a name="numRows--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numRows</h4>
<pre>public abstract&nbsp;int&nbsp;numRows()</pre>
<div class="block">Get the number of rows in the sparse block.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of rows</dd>
</dl>
</li>
</ul>
<a name="isThreadSafe--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isThreadSafe</h4>
<pre>public abstract&nbsp;boolean&nbsp;isThreadSafe()</pre>
<div class="block">Indicates if the underlying implementation allows thread-safe row
updates if concurrent threads update disjoint rows.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if thread-safe row updates</dd>
</dl>
</li>
</ul>
<a name="isContiguous--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isContiguous</h4>
<pre>public abstract&nbsp;boolean&nbsp;isContiguous()</pre>
<div class="block">Indicates if the underlying data structures returned by values
and indexes are contiguous arrays, which can be exploited for
more efficient operations.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if underlying data structures are contiguous arrays</dd>
</dl>
</li>
</ul>
<a name="isAligned-org.apache.sysds.runtime.data.SparseBlock-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAligned</h4>
<pre>public&nbsp;boolean&nbsp;isAligned(<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a>&nbsp;that)</pre>
<div class="block">Indicates if all non-zero values are aligned with the given
second sparse block instance, which can be exploited for
more efficient operations. Two non-zeros are aligned if they
have the same column index and reside in the same array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>that</code> - sparse block</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if all non-zero values are aligned with the given second sparse block</dd>
</dl>
</li>
</ul>
<a name="isAligned-int-org.apache.sysds.runtime.data.SparseBlock-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAligned</h4>
<pre>public&nbsp;boolean&nbsp;isAligned(int&nbsp;r,
<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a>&nbsp;that)</pre>
<div class="block">Indicates if all non-zero values of row r are aligned with
the same row of the given second sparse block instance, which
can be exploited for more efficient operations. Two non-zeros
are aligned if they have the same column index and reside in
the same array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>that</code> - sparse block</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if all non-zero values of row r are aligned with the same row
of the given second sparse block instance</dd>
</dl>
</li>
</ul>
<a name="isAllocated-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAllocated</h4>
<pre>public abstract&nbsp;boolean&nbsp;isAllocated(int&nbsp;r)</pre>
<div class="block">Indicates if the underlying data structure for a given row
is already allocated.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if already allocated</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public abstract&nbsp;void&nbsp;reset()</pre>
<div class="block">Clears the sparse block by deleting non-zero values. After this call
all size() calls are guaranteed to return 0.</div>
</li>
</ul>
<a name="reset-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public abstract&nbsp;void&nbsp;reset(int&nbsp;ennz,
int&nbsp;maxnnz)</pre>
<div class="block">Clears the sparse block by deleting non-zero values. After this call
all size() calls are guaranteed to return 0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ennz</code> - estimated non-zeros</dd>
<dd><code>maxnnz</code> - max non-zeros</dd>
</dl>
</li>
</ul>
<a name="reset-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public abstract&nbsp;void&nbsp;reset(int&nbsp;r,
int&nbsp;ennz,
int&nbsp;maxnnz)</pre>
<div class="block">Clears row r of the sparse block by deleting non-zero values.
After this call size(r) is guaranteed to return 0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index</dd>
<dd><code>ennz</code> - estimated non-zeros</dd>
<dd><code>maxnnz</code> - max non-zeros</dd>
</dl>
</li>
</ul>
<a name="size--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public abstract&nbsp;long&nbsp;size()</pre>
<div class="block">Get the number of non-zero values in the sparse block.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of non-zero values in sparse block</dd>
</dl>
</li>
</ul>
<a name="size-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public abstract&nbsp;int&nbsp;size(int&nbsp;r)</pre>
<div class="block">Get the number of non-zero values in row r.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of non-zero values in row r</dd>
</dl>
</li>
</ul>
<a name="size-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public abstract&nbsp;long&nbsp;size(int&nbsp;rl,
int&nbsp;ru)</pre>
<div class="block">Get the number of non-zeros values in the row range
of [rl, ru).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rl</code> - row lower index</dd>
<dd><code>ru</code> - row upper index</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of non-zero values in the row range</dd>
</dl>
</li>
</ul>
<a name="size-int-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public abstract&nbsp;long&nbsp;size(int&nbsp;rl,
int&nbsp;ru,
int&nbsp;cl,
int&nbsp;cu)</pre>
<div class="block">Get the number of non-zeros values in the row and column
range of [rl/cl, ru/cu);</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rl</code> - row lower index</dd>
<dd><code>ru</code> - row upper index</dd>
<dd><code>cl</code> - column lower index</dd>
<dd><code>cu</code> - column upper index</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of non-zero values in the row and column range</dd>
</dl>
</li>
</ul>
<a name="isEmpty-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>public abstract&nbsp;boolean&nbsp;isEmpty(int&nbsp;r)</pre>
<div class="block">Get information if row r is empty, i.e., does not contain non-zero
values. Equivalent to size(r)==0. Users should do this check if
it is unknown if the underlying row data structure is allocated.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if row does not contain non-zero values</dd>
</dl>
</li>
</ul>
<a name="checkValidity-int-int-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkValidity</h4>
<pre>public abstract&nbsp;boolean&nbsp;checkValidity(int&nbsp;rlen,
int&nbsp;clen,
long&nbsp;nnz,
boolean&nbsp;strict)</pre>
<div class="block">Validate the correctness of the internal data structures of the different
sparse block implementations.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rlen</code> - number of rows</dd>
<dd><code>clen</code> - number of columns</dd>
<dd><code>nnz</code> - number of non zeros</dd>
<dd><code>strict</code> - enforce optional properties</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the sparse block is valid wrt the corresponding format
such as COO, CSR, MCSR.</dd>
</dl>
</li>
</ul>
<a name="indexes-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexes</h4>
<pre>public abstract&nbsp;int[]&nbsp;indexes(int&nbsp;r)</pre>
<div class="block">Get the sorted array of column indexes of all non-zero entries in
row r. Note that - for flexibility of the implementing format - the
returned array may be larger, where the range for row r is given by
[pos(r),pos(r)+size(r)).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>sorted array of column indexes</dd>
</dl>
</li>
</ul>
<a name="values-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public abstract&nbsp;double[]&nbsp;values(int&nbsp;r)</pre>
<div class="block">Get the array of all non-zero entries in row r, sorted by their column
indexes. Note that - for flexibility of the implementing format - the
returned array may be larger, where the range for row r is given by
[pos(r),pos(r)+size(r)).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>array of all non-zero entries in row r sorted by column indexes</dd>
</dl>
</li>
</ul>
<a name="pos-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pos</h4>
<pre>public abstract&nbsp;int&nbsp;pos(int&nbsp;r)</pre>
<div class="block">Get the starting position of row r in the indexes/values arrays returned
by indexes(r) and values(r).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>starting position of row r</dd>
</dl>
</li>
</ul>
<a name="set-int-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public abstract&nbsp;boolean&nbsp;set(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</pre>
<div class="block">Set the value of a matrix cell (r,c). This might update an existing
non-zero value, insert a new non-zero value, or delete a non-zero value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dd><code>v</code> - zero or non-zero value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if number of non-zeros changed</dd>
</dl>
</li>
</ul>
<a name="set-int-org.apache.sysds.runtime.data.SparseRow-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public abstract&nbsp;void&nbsp;set(int&nbsp;r,
<a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a>&nbsp;row,
boolean&nbsp;deep)</pre>
<div class="block">Set the values of row r to the given sparse row. This might update
existing non-zero values, insert a new row, or delete a row.
NOTE: This method exists for incremental runtime integration and might
be deleted in the future.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>row</code> - sparse row</dd>
<dd><code>deep</code> - indicator to create deep copy of sparse row</dd>
</dl>
</li>
</ul>
<a name="add-int-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public abstract&nbsp;boolean&nbsp;add(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</pre>
<div class="block">Add a value to a matrix cell (r,c). This might update an existing
non-zero value, or insert a new non-zero value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dd><code>v</code> - zero or non-zero value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if number of non-zeros changed</dd>
</dl>
</li>
</ul>
<a name="append-int-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre>public abstract&nbsp;void&nbsp;append(int&nbsp;r,
int&nbsp;c,
double&nbsp;v)</pre>
<div class="block">Append a value to the end of the physical representation. This should
only be used for operations with sequential write pattern or if followed
by a sort() operation. Note that this operation does not perform any
matrix cell updates.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dd><code>v</code> - zero or non-zero value</dd>
</dl>
</li>
</ul>
<a name="setIndexRange-int-int-int-double:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndexRange</h4>
<pre>public abstract&nbsp;void&nbsp;setIndexRange(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu,
double[]&nbsp;v,
int&nbsp;vix,
int&nbsp;vlen)</pre>
<div class="block">Sets a dense array of non-zeros values into the column range [cl,cu)
in row r. The passed value array may be larger and the relevant range
is given by [vix,vix+len).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>cl</code> - lower column index starting at 0</dd>
<dd><code>cu</code> - upper column index starting at 0</dd>
<dd><code>v</code> - value array</dd>
<dd><code>vix</code> - start index in value array</dd>
<dd><code>vlen</code> - number of relevant values</dd>
</dl>
</li>
</ul>
<a name="setIndexRange-int-int-int-double:A-int:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndexRange</h4>
<pre>public abstract&nbsp;void&nbsp;setIndexRange(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu,
double[]&nbsp;v,
int[]&nbsp;vix,
int&nbsp;vpos,
int&nbsp;vlen)</pre>
<div class="block">Sets a sparse array of non-zeros values and indexes into the column range [cl,cu)
in row r. The passed value array may be larger.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>cl</code> - lower column index starting at 0</dd>
<dd><code>cu</code> - upper column index starting at 0</dd>
<dd><code>v</code> - value array</dd>
<dd><code>vix</code> - column index array</dd>
<dd><code>vpos</code> - start index in value and index arrays</dd>
<dd><code>vlen</code> - number of relevant values</dd>
</dl>
</li>
</ul>
<a name="deleteIndexRange-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteIndexRange</h4>
<pre>public abstract&nbsp;void&nbsp;deleteIndexRange(int&nbsp;r,
int&nbsp;cl,
int&nbsp;cu)</pre>
<div class="block">Deletes all non-zero values of the given column range [cl,cu) in row r.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>cl</code> - lower column index starting at 0</dd>
<dd><code>cu</code> - upper column index starting at 0</dd>
</dl>
</li>
</ul>
<a name="sort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sort</h4>
<pre>public abstract&nbsp;void&nbsp;sort()</pre>
<div class="block">Sort all non-zero value/index pairs of the sparse block by row
and column index.</div>
</li>
</ul>
<a name="sort-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sort</h4>
<pre>public abstract&nbsp;void&nbsp;sort(int&nbsp;r)</pre>
<div class="block">Sort all non-zero value/index pairs of row r column index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
</dl>
</li>
</ul>
<a name="get-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public abstract&nbsp;double&nbsp;get(int&nbsp;r,
int&nbsp;c)</pre>
<div class="block">Get value of matrix cell (r,c). In case of non existing values
this call returns 0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>value of cell at position (r,c)</dd>
</dl>
</li>
</ul>
<a name="get-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a>&nbsp;get(int&nbsp;r)</pre>
<div class="block">Get values of row r in the format of a sparse row.
NOTE: This method exists for incremental runtime integration and might
be deleted in the future.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>values of row r as a sparse row</dd>
</dl>
</li>
</ul>
<a name="posFIndexLTE-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>posFIndexLTE</h4>
<pre>public abstract&nbsp;int&nbsp;posFIndexLTE(int&nbsp;r,
int&nbsp;c)</pre>
<div class="block">Get position of first column index lower than or equal column c
in row r. The position is relative to the indexes/values arrays
returned by indexes(r) and values(r). If no such value exists,
this call returns -1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>position of the first column index lower than or equal to column c in row r</dd>
</dl>
</li>
</ul>
<a name="posFIndexGTE-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>posFIndexGTE</h4>
<pre>public abstract&nbsp;int&nbsp;posFIndexGTE(int&nbsp;r,
int&nbsp;c)</pre>
<div class="block">Get position of first column index greater than or equal column c
in row r. The position is relative to the indexes/values arrays
returned by indexes(r) and values(r). If no such value exists,
this call returns -1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>position of the first column index greater than or equal to column c in row r</dd>
</dl>
</li>
</ul>
<a name="posFIndexGT-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>posFIndexGT</h4>
<pre>public abstract&nbsp;int&nbsp;posFIndexGT(int&nbsp;r,
int&nbsp;c)</pre>
<div class="block">Get position of first column index greater than column c in row r.
The position is relative to the indexes/values arrays returned by
indexes(r) and values(r). If no such value exists, this call
returns -1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>r</code> - row index starting at 0</dd>
<dd><code>c</code> - column index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>position of the first column index greater than column c in row r</dd>
</dl>
</li>
</ul>
<a name="getIterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIterator</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;&nbsp;getIterator()</pre>
<div class="block">Get a non-zero iterator over the entire sparse block. Note that
the returned IJV object is reused across next calls and should
be directly consumed or deep copied.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>IJV iterator</dd>
</dl>
</li>
</ul>
<a name="getIterator-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIterator</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;&nbsp;getIterator(int&nbsp;ru)</pre>
<div class="block">Get a non-zero iterator over the partial sparse block [0,ru). Note
that the returned IJV object is reused across next calls and should
be directly consumed or deep copied.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ru</code> - exclusive upper row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>IJV iterator</dd>
</dl>
</li>
</ul>
<a name="getIterator-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIterator</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>&gt;&nbsp;getIterator(int&nbsp;rl,
int&nbsp;ru)</pre>
<div class="block">Get a non-zero iterator over the subblock [rl, ru). Note that
the returned IJV object is reused across next calls and should
be directly consumed or deep copied.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rl</code> - inclusive lower row index starting at 0</dd>
<dd><code>ru</code> - exclusive upper row index starting at 0</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>IJV iterator</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<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/SparseBlock.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/sysds/runtime/data/LibTensorReorg.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/sysds/runtime/data/SparseBlock.html" target="_top">Frames</a></li>
<li><a href="SparseBlock.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>