public class DenseBlockLDRB extends DenseBlock
DenseBlock.Type| Constructor and Description |
|---|
DenseBlockLDRB(int rlen,
int clen) |
DenseBlockLDRB(int rlen,
int clen,
int blen) |
| Modifier and Type | Method and Description |
|---|---|
int |
blockSize()
Get the number of rows per block, except last one.
|
int |
blockSize(int bix)
Get the number of rows of the given block.
|
long |
capacity()
Get the total length of allocated blocks.
|
long |
countNonZeros()
Compute the number of non-zero values, which potentially
makes a full pass over the underlying blocks.
|
int |
countNonZeros(int r)
Compute the number of non-zero values for the given row,
which potentially makes a full pass over the underlying row.
|
long |
countNonZeros(int rl,
int ru,
int cl,
int cu)
Compute the number of non-zero values, which potentially
makes a full pass over the underlying blocks in the row range.
|
double |
get(int r,
int c)
Get the value for a given row and column.
|
void |
incr(int r,
int c)
Increments the given value for a given row and column.
|
void |
incr(int r,
int c,
double delta)
Increments the given value for a given row and column
by delta.
|
int |
index(int r)
Get the block index for a given row.
|
boolean |
isContiguous()
Indicates if the dense block has a single
underlying block, i.e., if numBlocks==1.
|
boolean |
isContiguous(int rl,
int ru)
Indicates if the dense block has a single
underlying block for the given row range.
|
int |
numBlocks()
Get the number of allocated blocks.
|
int |
numRows()
Get the number of rows.
|
int |
pos(int r)
Get the position for a given row within
its associated block.
|
int |
pos(int r,
int c)
Get the position for a given row and column
within the associated block.
|
void |
reset()
Resets the dense block by deleting non-zero values.
|
void |
reset(int rlen,
int clen)
Resets the dense block by deleting non-zero values.
|
void |
reset(int rlen,
int clen,
double v)
Resets the dense block by setting the given value.
|
DenseBlock |
set(DenseBlock db)
Copy the given dense block.
|
DenseBlock |
set(double v)
Set the given value for the entire dense block (fill).
|
DenseBlock |
set(int r,
double[] v)
Copy the given vector into the given row.
|
DenseBlock |
set(int r,
int c,
double v)
Set the given value for a given row and column.
|
DenseBlock |
set(int rl,
int ru,
int cl,
int cu,
DenseBlock db)
Copy the given dense block into the specified
index range.
|
DenseBlock |
set(int rl,
int ru,
int cl,
int cu,
double v)
Set the given value for an entire index range of the
dense block (fill).
|
long |
size()
Get the length of the dense block as the product
of row and column dimensions.
|
int |
size(int bix)
Get the length of the given block.
|
String |
toString() |
double[][] |
values()
Get the allocated blocks.
|
double[] |
values(int r)
Get the allocated block for the given row.
|
double[] |
valuesAt(int bix)
Get an allocated block.
|
set, setpublic DenseBlockLDRB(int rlen,
int clen)
public DenseBlockLDRB(int rlen,
int clen,
int blen)
public void reset()
DenseBlockreset in class DenseBlockpublic void reset(int rlen,
int clen)
DenseBlockreset in class DenseBlockrlen - number of rowsclen - number of columnspublic void reset(int rlen,
int clen,
double v)
DenseBlockreset in class DenseBlockrlen - number of rowsclen - number of columnsv - valuepublic int numRows()
DenseBlocknumRows in class DenseBlockpublic int numBlocks()
DenseBlocknumBlocks in class DenseBlockpublic int blockSize()
DenseBlockblockSize in class DenseBlockpublic int blockSize(int bix)
DenseBlockblockSize in class DenseBlockbix - block indexpublic boolean isContiguous()
DenseBlockisContiguous in class DenseBlockpublic boolean isContiguous(int rl,
int ru)
DenseBlockisContiguous in class DenseBlockrl - row lower indexru - row upper index (inclusive)public long size()
DenseBlocksize in class DenseBlockpublic int size(int bix)
DenseBlocksize in class DenseBlockbix - block indexpublic long capacity()
DenseBlockcapacity in class DenseBlockpublic long countNonZeros()
DenseBlockcountNonZeros in class DenseBlockpublic int countNonZeros(int r)
DenseBlockcountNonZeros in class DenseBlockr - row indexpublic long countNonZeros(int rl,
int ru,
int cl,
int cu)
DenseBlockcountNonZeros in class DenseBlockrl - row lower indexru - row upper index (exclusive)cl - column lower indexcu - column upper index (exclusive)public double[][] values()
DenseBlockvalues in class DenseBlockpublic double[] values(int r)
DenseBlockvalues in class DenseBlockr - row indexpublic double[] valuesAt(int bix)
DenseBlockvaluesAt in class DenseBlockbix - block indexpublic int index(int r)
DenseBlockindex in class DenseBlockr - row indexpublic int pos(int r)
DenseBlockpos in class DenseBlockr - row indexpublic int pos(int r,
int c)
DenseBlockpos in class DenseBlockr - row indexc - column indexpublic void incr(int r,
int c)
DenseBlockincr in class DenseBlockr - row indexc - column indexpublic void incr(int r,
int c,
double delta)
DenseBlockincr in class DenseBlockr - row indexc - column indexdelta - increment valuepublic DenseBlock set(double v)
DenseBlockset in class DenseBlockv - valuepublic DenseBlock set(int rl, int ru, int cl, int cu, double v)
DenseBlockset in class DenseBlockrl - row lower indexru - row upper index (exclusive)cl - column lower indexcu - column upper index (exclusive)v - valuepublic DenseBlock set(int r, int c, double v)
DenseBlockset in class DenseBlockr - row indexc - column indexv - valuepublic DenseBlock set(int r, double[] v)
DenseBlockset in class DenseBlockr - row indexv - value vectorpublic DenseBlock set(DenseBlock db)
DenseBlockset in class DenseBlockdb - dense blockpublic DenseBlock set(int rl, int ru, int cl, int cu, DenseBlock db)
DenseBlockset in class DenseBlockrl - row lower indexru - row upper index (exclusive)cl - column lower indexcu - column upper index (exclusive)db - dense blockpublic double get(int r,
int c)
DenseBlockget in class DenseBlockr - row indexc - column indexpublic String toString()
toString in class DenseBlockCopyright © 2018 The Apache Software Foundation. All rights reserved.