| <!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>SparseBlockCSR (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="SparseBlockCSR (SystemDS 2.1.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":9,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/SparseBlockCSR.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/SparseBlockCOO.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockFactory.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/sysds/runtime/data/SparseBlockCSR.html" target="_top">Frames</a></li> |
| <li><a href="SparseBlockCSR.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.classes.inherited.from.class.org.apache.sysds.runtime.data.SparseBlock">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.sysds.runtime.data</div> |
| <h2 title="Class SparseBlockCSR" class="title">Class SparseBlockCSR</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><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">org.apache.sysds.runtime.data.SparseBlock</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.sysds.runtime.data.SparseBlockCSR</li> |
| </ul> |
| </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> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">SparseBlockCSR</span> |
| extends <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></pre> |
| <div class="block">SparseBlock implementation that realizes a traditional 'compressed sparse row' |
| representation, where the entire sparse block is stored as three arrays: ptr |
| of length rlen+1 to store offsets per row, and indexes/values of length nnz |
| to store column indexes and values of non-zero entries. This format is very |
| memory efficient for sparse (but not ultra-sparse) matrices and provides very |
| good performance for common operations, partially due to lower memory bandwidth |
| requirements. However, this format is slow on incremental construction (because |
| it does not allow append/sort per row) without reshifting. Finally, the total |
| nnz is limited to INTEGER_MAX, whereas for SparseBlockMCSR only the nnz per |
| row are limited to INTEGER_MAX. |
| |
| TODO: extensions for faster incremental construction (e.g., max row) |
| TODO more efficient fused setIndexRange impl to avoid repeated copies and updates</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.sysds.runtime.data.SparseBlockCSR">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> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.sysds.runtime.data.SparseBlock"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.sysds.runtime.data.<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></h3> |
| <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data">SparseBlock.Type</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-int-">SparseBlockCSR</a></span>(int rlen)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-int:A-int:A-double:A-int-">SparseBlockCSR</a></span>(int[] rowPtr, |
| int[] colInd, |
| double[] values, |
| int nnz)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-int-int-">SparseBlockCSR</a></span>(int rlen, |
| int capacity)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-int-int:A-int:A-double:A-">SparseBlockCSR</a></span>(int rows, |
| int[] rowInd, |
| int[] colInd, |
| double[] values)</code> |
| <div class="block">Copy constructor for COO representation</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-int-int-int:A-">SparseBlockCSR</a></span>(int rows, |
| int nnz, |
| int[] colInd)</code> |
| <div class="block">Copy constructor for given array of column indexes, which |
| identifies rows by position and implies values of 1.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-org.apache.sysds.runtime.data.SparseBlock-">SparseBlockCSR</a></span>(<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a> sblock)</code> |
| <div class="block">Copy constructor sparse block abstraction.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#SparseBlockCSR-org.apache.sysds.runtime.data.SparseRow:A-int-">SparseBlockCSR</a></span>(<a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a>[] rows, |
| int nnz)</code> |
| <div class="block">Copy constructor old sparse row representation.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#add-int-int-double-">add</a></span>(int r, |
| int c, |
| double 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#allocate-int-">allocate</a></span>(int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#allocate-int-int-">allocate</a></span>(int r, |
| int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#allocate-int-int-int-">allocate</a></span>(int r, |
| int ennz, |
| int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#append-int-int-double-">append</a></span>(int r, |
| int c, |
| double 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>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#checkValidity-int-int-long-boolean-">checkValidity</a></span>(int rlen, |
| int clen, |
| long nnz, |
| boolean 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#compact-int-">compact</a></span>(int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#deleteIndexRange-int-int-int-">deleteIndexRange</a></span>(int r, |
| int cl, |
| int 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>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#estimateSizeInMemory-long-long-double-">estimateSizeInMemory</a></span>(long nrows, |
| long ncols, |
| double sparsity)</code> |
| <div class="block">Get the estimated in-memory size of the sparse block in CSR |
| with the given dimensions w/o accounting for overallocation.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><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/SparseBlockCSR.html#get-int-">get</a></span>(int r)</code> |
| <div class="block">Get values of row r in the format of a sparse row.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#get-int-int-">get</a></span>(int r, |
| int c)</code> |
| <div class="block">Get value of matrix cell (r,c).</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#indexes--">indexes</a></span>()</code> |
| <div class="block">Get raw access to underlying array of column indices |
| For use in GPU code</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#indexes-int-">indexes</a></span>(int 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="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#initSparse-int-int-java.io.DataInput-">initSparse</a></span>(int rlen, |
| int nnz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a> in)</code> |
| <div class="block">Initializes the CSR sparse block from an ordered input |
| stream of sparse rows (rownnz, jv-pairs*).</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#initUltraSparse-int-java.io.DataInput-">initUltraSparse</a></span>(int nnz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a> in)</code> |
| <div class="block">Initializes the CSR sparse block from an ordered input |
| stream of ultra-sparse ijv triples.</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/SparseBlockCSR.html#isAllocated-int-">isAllocated</a></span>(int r)</code> |
| <div class="block">Indicates if the underlying data structure for a given row |
| is already allocated.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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="i17" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#isEmpty-int-">isEmpty</a></span>(int 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="i18" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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="i19" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#numRows--">numRows</a></span>()</code> |
| <div class="block">Get the number of rows in the sparse block.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#pos-int-">pos</a></span>(int 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="i21" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#posFIndexGT-int-int-">posFIndexGT</a></span>(int r, |
| int c)</code> |
| <div class="block">Get position of first column index greater than column c in row r.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#posFIndexGTE-int-int-">posFIndexGTE</a></span>(int r, |
| int 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="i23" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#posFIndexLTE-int-int-">posFIndexLTE</a></span>(int r, |
| int 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="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#reset--">reset</a></span>()</code> |
| <div class="block">Clears the sparse block by deleting non-zero values.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#reset-int-int-">reset</a></span>(int ennz, |
| int maxnnz)</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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#reset-int-int-int-">reset</a></span>(int r, |
| int ennz, |
| int maxnnz)</code> |
| <div class="block">Clears row r of the sparse block by deleting non-zero values.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#rowPointers--">rowPointers</a></span>()</code> |
| <div class="block">Get raw access to underlying array of row pointers |
| For use in GPU code</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#set-int-int-double-">set</a></span>(int r, |
| int c, |
| double 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#set-int-org.apache.sysds.runtime.data.SparseRow-boolean-">set</a></span>(int r, |
| <a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a> row, |
| boolean 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#setIndexRange-int-int-int-double:A-int:A-int-int-">setIndexRange</a></span>(int r, |
| int cl, |
| int cu, |
| double[] v, |
| int[] vix, |
| int vpos, |
| int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#setIndexRange-int-int-int-double:A-int-int-">setIndexRange</a></span>(int r, |
| int cl, |
| int cu, |
| double[] v, |
| int vix, |
| int 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#setIndexRange-int-int-int-int-double:A-int-int-">setIndexRange</a></span>(int rl, |
| int ru, |
| int cl, |
| int cu, |
| double[] v, |
| int vix, |
| int vlen)</code> |
| <div class="block">Inserts a sorted row-major array of non-zero values into the row and column |
| range [rl,ru) and [cl,cu).</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#setIndexRange-int-int-int-int-org.apache.sysds.runtime.data.SparseBlock-">setIndexRange</a></span>(int rl, |
| int ru, |
| int cl, |
| int cu, |
| <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a> sb)</code> |
| <div class="block">Inserts a sparse block into the row and column range [rl,ru) and [cl,cu).</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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="i35" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#size-int-">size</a></span>(int r)</code> |
| <div class="block">Get the number of non-zero values in row r.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#size-int-int-">size</a></span>(int rl, |
| int ru)</code> |
| <div class="block">Get the number of non-zeros values in the row range |
| of [rl, ru).</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#size-int-int-int-int-">size</a></span>(int rl, |
| int ru, |
| int cl, |
| int 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="i38" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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="i39" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#sort-int-">sort</a></span>(int r)</code> |
| <div class="block">Sort all non-zero value/index pairs of row r column index.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code><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/SparseBlockCSR.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#values--">values</a></span>()</code> |
| <div class="block">Get raw access to underlying array of values |
| For use in GPU code</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.html#values-int-">values</a></span>(int 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.org.apache.sysds.runtime.data.SparseBlock"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.sysds.runtime.data.<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></h3> |
| <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator--">getIterator</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-">getIterator</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-int-">getIterator</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAligned-int-org.apache.sysds.runtime.data.SparseBlock-">isAligned</a>, <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAligned-org.apache.sysds.runtime.data.SparseBlock-">isAligned</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="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="SparseBlockCSR-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(int rlen)</pre> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(int rlen, |
| int capacity)</pre> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-int:A-int:A-double:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(int[] rowPtr, |
| int[] colInd, |
| double[] values, |
| int nnz)</pre> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-org.apache.sysds.runtime.data.SparseBlock-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(<a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a> sblock)</pre> |
| <div class="block">Copy constructor sparse block abstraction.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sblock</code> - sparse block to copy</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-org.apache.sysds.runtime.data.SparseRow:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(<a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a>[] rows, |
| int nnz)</pre> |
| <div class="block">Copy constructor old sparse row representation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rows</code> - array of sparse rows</dd> |
| <dd><code>nnz</code> - number of non-zeroes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-int-int:A-int:A-double:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(int rows, |
| int[] rowInd, |
| int[] colInd, |
| double[] values)</pre> |
| <div class="block">Copy constructor for COO representation</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rows</code> - number of rows</dd> |
| <dd><code>rowInd</code> - row indices</dd> |
| <dd><code>colInd</code> - column indices</dd> |
| <dd><code>values</code> - non zero values</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SparseBlockCSR-int-int-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SparseBlockCSR</h4> |
| <pre>public SparseBlockCSR(int rows, |
| int nnz, |
| int[] colInd)</pre> |
| <div class="block">Copy constructor for given array of column indexes, which |
| identifies rows by position and implies values of 1.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rows</code> - number of rows</dd> |
| <dd><code>nnz</code> - number of non-zeros</dd> |
| <dd><code>colInd</code> - column indexes</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="initUltraSparse-int-java.io.DataInput-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initUltraSparse</h4> |
| <pre>public void initUltraSparse(int nnz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a> in) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Initializes the CSR sparse block from an ordered input |
| stream of ultra-sparse ijv triples.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nnz</code> - number of non-zeros to read</dd> |
| <dd><code>in</code> - data input stream of ijv triples, ordered by ij</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if deserialization error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="initSparse-int-int-java.io.DataInput-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initSparse</h4> |
| <pre>public void initSparse(int rlen, |
| int nnz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a> in) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Initializes the CSR sparse block from an ordered input |
| stream of sparse rows (rownnz, jv-pairs*).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rlen</code> - number of rows</dd> |
| <dd><code>nnz</code> - number of non-zeros to read</dd> |
| <dd><code>in</code> - data input stream of sparse rows, ordered by i</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if deserialization error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="estimateSizeInMemory-long-long-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>estimateSizeInMemory</h4> |
| <pre>public static long estimateSizeInMemory(long nrows, |
| long ncols, |
| double sparsity)</pre> |
| <div class="block">Get the estimated in-memory size of the sparse block in CSR |
| with the given dimensions w/o accounting for overallocation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nrows</code> - number of rows</dd> |
| <dd><code>ncols</code> - number of columns</dd> |
| <dd><code>sparsity</code> - sparsity ratio</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>memory estimate</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="rowPointers--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rowPointers</h4> |
| <pre>public int[] rowPointers()</pre> |
| <div class="block">Get raw access to underlying array of row pointers |
| For use in GPU code</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of row pointers</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="indexes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>indexes</h4> |
| <pre>public int[] indexes()</pre> |
| <div class="block">Get raw access to underlying array of column indices |
| For use in GPU code</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of column indexes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="values--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>values</h4> |
| <pre>public double[] values()</pre> |
| <div class="block">Get raw access to underlying array of values |
| For use in GPU code</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of values</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocate-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocate</h4> |
| <pre>public void allocate(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-">SparseBlock</a></code></span></div> |
| <div class="block">Allocate the underlying data structure holding non-zero values |
| of row r if necessary.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-">allocate</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void allocate(int r, |
| int nnz)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-">allocate</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void allocate(int r, |
| int ennz, |
| int maxnnz)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#allocate-int-int-int-">allocate</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void compact(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#compact-int-">SparseBlock</a></code></span></div> |
| <div class="block">Re-allocate physical row if physical size exceeds |
| logical size plus resize factor.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#compact-int-">compact</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int numRows()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#numRows--">SparseBlock</a></code></span></div> |
| <div class="block">Get the number of rows in the sparse block.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#numRows--">numRows</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 boolean isThreadSafe()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isThreadSafe--">SparseBlock</a></code></span></div> |
| <div class="block">Indicates if the underlying implementation allows thread-safe row |
| updates if concurrent threads update disjoint rows.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isThreadSafe--">isThreadSafe</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 boolean isContiguous()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isContiguous--">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isContiguous--">isContiguous</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if underlying data structures are contiguous arrays</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isAllocated-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAllocated</h4> |
| <pre>public boolean isAllocated(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAllocated-int-">SparseBlock</a></code></span></div> |
| <div class="block">Indicates if the underlying data structure for a given row |
| is already allocated.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isAllocated-int-">isAllocated</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void reset()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset--">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset--">reset</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="reset-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reset</h4> |
| <pre>public void reset(int ennz, |
| int maxnnz)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-">reset</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void reset(int r, |
| int ennz, |
| int maxnnz)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#reset-int-int-int-">reset</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 long size()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size--">SparseBlock</a></code></span></div> |
| <div class="block">Get the number of non-zero values in the sparse block.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size--">size</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int size(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-">SparseBlock</a></code></span></div> |
| <div class="block">Get the number of non-zero values in row r.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-">size</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 long size(int rl, |
| int ru)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-">SparseBlock</a></code></span></div> |
| <div class="block">Get the number of non-zeros values in the row range |
| of [rl, ru).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-">size</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 long size(int rl, |
| int ru, |
| int cl, |
| int cu)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#size-int-int-int-int-">size</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 boolean isEmpty(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isEmpty-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#isEmpty-int-">isEmpty</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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="indexes-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>indexes</h4> |
| <pre>public int[] indexes(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#indexes-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#indexes-int-">indexes</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 double[] values(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#values-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#values-int-">values</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int pos(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#pos-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#pos-int-">pos</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 boolean set(int r, |
| int c, |
| double v)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-int-double-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-int-double-">set</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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="add-int-int-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public boolean add(int r, |
| int c, |
| double v)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#add-int-int-double-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#add-int-int-double-">add</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void set(int r, |
| <a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a> row, |
| boolean deep)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-org.apache.sysds.runtime.data.SparseRow-boolean-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#set-int-org.apache.sysds.runtime.data.SparseRow-boolean-">set</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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="append-int-int-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>append</h4> |
| <pre>public void append(int r, |
| int c, |
| double v)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#append-int-int-double-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#append-int-int-double-">append</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void setIndexRange(int r, |
| int cl, |
| int cu, |
| double[] v, |
| int vix, |
| int vlen)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int-int-">setIndexRange</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void setIndexRange(int r, |
| int cl, |
| int cu, |
| double[] v, |
| int[] vix, |
| int vpos, |
| int vlen)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int:A-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#setIndexRange-int-int-int-double:A-int:A-int-int-">setIndexRange</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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="setIndexRange-int-int-int-int-double:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIndexRange</h4> |
| <pre>public void setIndexRange(int rl, |
| int ru, |
| int cl, |
| int cu, |
| double[] v, |
| int vix, |
| int vlen)</pre> |
| <div class="block">Inserts a sorted row-major array of non-zero values into the row and column |
| range [rl,ru) and [cl,cu). Note: that this is a CSR-specific method to address |
| performance issues due to repeated re-shifting on update-in-place.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rl</code> - lower row index, starting at 0, inclusive</dd> |
| <dd><code>ru</code> - upper row index, starting at 0, exclusive</dd> |
| <dd><code>cl</code> - lower column index, starting at 0, inclusive</dd> |
| <dd><code>cu</code> - upper column index, starting at 0, exclusive</dd> |
| <dd><code>v</code> - right-hand-side dense block</dd> |
| <dd><code>vix</code> - right-hand-side dense block index</dd> |
| <dd><code>vlen</code> - right-hand-side dense block value length</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setIndexRange-int-int-int-int-org.apache.sysds.runtime.data.SparseBlock-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIndexRange</h4> |
| <pre>public void setIndexRange(int rl, |
| int ru, |
| int cl, |
| int cu, |
| <a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a> sb)</pre> |
| <div class="block">Inserts a sparse block into the row and column range [rl,ru) and [cl,cu). |
| Note: that this is a CSR-specific method to address performance issues |
| due to repeated re-shifting on update-in-place.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rl</code> - lower row index, starting at 0, inclusive</dd> |
| <dd><code>ru</code> - upper row index, starting at 0, exclusive</dd> |
| <dd><code>cl</code> - lower column index, starting at 0, inclusive</dd> |
| <dd><code>cu</code> - upper column index, starting at 0, exclusive</dd> |
| <dd><code>sb</code> - right-hand-side sparse block</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="deleteIndexRange-int-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deleteIndexRange</h4> |
| <pre>public void deleteIndexRange(int r, |
| int cl, |
| int cu)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#deleteIndexRange-int-int-int-">SparseBlock</a></code></span></div> |
| <div class="block">Deletes all non-zero values of the given column range [cl,cu) in row r.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#deleteIndexRange-int-int-int-">deleteIndexRange</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 void sort()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort--">SparseBlock</a></code></span></div> |
| <div class="block">Sort all non-zero value/index pairs of the sparse block by row |
| and column index.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort--">sort</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sort-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sort</h4> |
| <pre>public void sort(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort-int-">SparseBlock</a></code></span></div> |
| <div class="block">Sort all non-zero value/index pairs of row r column index.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#sort-int-">sort</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 double get(int r, |
| int c)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-int-">get</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 <a href="../../../../../org/apache/sysds/runtime/data/SparseRow.html" title="class in org.apache.sysds.runtime.data">SparseRow</a> get(int r)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#get-int-">get</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int posFIndexLTE(int r, |
| int c)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexLTE-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexLTE-int-int-">posFIndexLTE</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int posFIndexGTE(int r, |
| int c)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGTE-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGTE-int-int-">posFIndexGTE</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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 int posFIndexGT(int r, |
| int c)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGT-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#posFIndexGT-int-int-">posFIndexGT</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <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> toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#toString--">toString</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="checkValidity-int-int-long-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>checkValidity</h4> |
| <pre>public boolean checkValidity(int rlen, |
| int clen, |
| long nnz, |
| boolean strict)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#checkValidity-int-int-long-boolean-">SparseBlock</a></code></span></div> |
| <div class="block">Validate the correctness of the internal data structures of the different |
| sparse block implementations.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#checkValidity-int-int-long-boolean-">checkValidity</a></code> in class <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html" title="class in org.apache.sysds.runtime.data">SparseBlock</a></code></dd> |
| <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> |
| </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/SparseBlockCSR.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/SparseBlockCOO.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockFactory.html" title="class in org.apache.sysds.runtime.data"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/sysds/runtime/data/SparseBlockCSR.html" target="_top">Frames</a></li> |
| <li><a href="SparseBlockCSR.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.classes.inherited.from.class.org.apache.sysds.runtime.data.SparseBlock">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |