| <!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>SparseBlockCOO (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="SparseBlockCOO (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}; |
| 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/SparseBlockCOO.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/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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/SparseBlockCOO.html" target="_top">Frames</a></li> |
| <li><a href="SparseBlockCOO.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 SparseBlockCOO" class="title">Class SparseBlockCOO</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.SparseBlockCOO</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">SparseBlockCOO</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 'coordinate matrix' |
| representation, where the entire sparse block is stored as triples in three arrays: |
| row indexes, column indexes, and values, where row indexes and colunm indexes are |
| sorted in order to allow binary search. This format is very memory efficient for |
| ultra-sparse matrices, allows fast incremental construction but has performance |
| drawbacks for row-major access through our sparse block abstraction since there |
| is no constant-time random access to individual rows. Similar to CSR, the nnz |
| is limited to Integer.MAX_VALUE. |
| |
| In contrast to COO matrix formats with three arrays, we use 1+#dims arrays |
| to represent the values and indexes of all dimensions.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.sysds.runtime.data.SparseBlockCOO">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/SparseBlockCOO.html#SparseBlockCOO-int-">SparseBlockCOO</a></span>(int rlen)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#SparseBlockCOO-int-int-">SparseBlockCOO</a></span>(int rlen, |
| int capacity)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#SparseBlockCOO-org.apache.sysds.runtime.data.SparseBlock-">SparseBlockCOO</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="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#SparseBlockCOO-org.apache.sysds.runtime.data.SparseRow:A-int-">SparseBlockCOO</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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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/SparseBlockCOO.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 COO |
| 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/SparseBlockCOO.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/SparseBlockCOO.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><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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#getIterator--">getIterator</a></span>()</code> |
| <div class="block">Get a non-zero iterator over the entire sparse block.</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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#getIterator-int-">getIterator</a></span>(int ru)</code> |
| <div class="block">Get a non-zero iterator over the partial sparse block [0,ru).</div> |
| </td> |
| </tr> |
| <tr id="i13" 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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#getIterator-int-int-">getIterator</a></span>(int rl, |
| int ru)</code> |
| <div class="block">Get a non-zero iterator over the subblock [rl, ru).</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i15" class="rowColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i16" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i17" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i19" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i22" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i23" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i24" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i25" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i27" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i28" class="altColor"> |
| <td class="colFirst"><code>int[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.html#rowIndexes--">rowIndexes</a></span>()</code> |
| <div class="block">Get raw access to underlying array of row indices |
| For use in GPU code</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i30" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i31" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i32" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i33" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i34" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i35" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i36" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i37" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i38" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i39" class="rowColor"> |
| <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/SparseBlockCOO.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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="i41" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCOO.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#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="SparseBlockCOO-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCOO</h4> |
| <pre>public SparseBlockCOO(int rlen)</pre> |
| </li> |
| </ul> |
| <a name="SparseBlockCOO-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCOO</h4> |
| <pre>public SparseBlockCOO(int rlen, |
| int capacity)</pre> |
| </li> |
| </ul> |
| <a name="SparseBlockCOO-org.apache.sysds.runtime.data.SparseBlock-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SparseBlockCOO</h4> |
| <pre>public SparseBlockCOO(<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="SparseBlockCOO-org.apache.sysds.runtime.data.SparseRow:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SparseBlockCOO</h4> |
| <pre>public SparseBlockCOO(<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-zeros</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="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 COO |
| 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="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="checkValidity-int-int-long-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <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> |
| <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="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="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="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="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="getIterator--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIterator</h4> |
| <pre>public <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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>> getIterator()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator--">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator--">getIterator</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>IJV iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getIterator-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIterator</h4> |
| <pre>public <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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>> getIterator(int ru)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-">getIterator</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>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 <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><<a href="../../../../../org/apache/sysds/runtime/matrix/data/IJV.html" title="class in org.apache.sysds.runtime.matrix.data">IJV</a>> getIterator(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#getIterator-int-int-">SparseBlock</a></code></span></div> |
| <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="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/sysds/runtime/data/SparseBlock.html#getIterator-int-int-">getIterator</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> - 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="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="rowIndexes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rowIndexes</h4> |
| <pre>public int[] rowIndexes()</pre> |
| <div class="block">Get raw access to underlying array of row indices |
| For use in GPU code</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of row indices</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 indices</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="values--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <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> |
| </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/SparseBlockCOO.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/SparseBlock.Type.html" title="enum in org.apache.sysds.runtime.data"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/sysds/runtime/data/SparseBlockCSR.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/SparseBlockCOO.html" target="_top">Frames</a></li> |
| <li><a href="SparseBlockCOO.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> |