|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmaltcms.datastructures.array.DenseArray
public class DenseArray
A simple dense array encapsulation class.
| Constructor Summary | |
|---|---|
DenseArray(Array a)
Copy a and save it in internal array |
|
DenseArray(int rows,
int columns,
double defaultValue1)
Create new Array with specified number of rows and columns. |
|
| Method Summary | |
|---|---|
int |
columns()
|
static BufferedImage |
createLayoutImage(DenseArray pa,
Color bg,
Color fg)
|
cross.datastructures.tuple.Tuple2D<ArrayInt.D1,ArrayDouble.D1> |
flatten()
Return array in row compressed storage format. |
double |
get(int row,
int col)
|
ArrayDouble.D2 |
getArray()
Use with caution, creates the dense array according to its bounds in memory. |
int[] |
getColumnBounds(int row)
|
double |
getDefaultValue()
|
int |
getNumberOfStoredElements()
|
Area |
getShape()
|
boolean |
inRange(int i,
int j)
|
int |
rows()
|
void |
set(int row,
int col,
double d)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface maltcms.datastructures.array.IArrayD2Double |
|---|
toString |
| Constructor Detail |
|---|
public DenseArray(Array a)
a -
public DenseArray(int rows,
int columns,
double defaultValue1)
rows - columns - defaultValue1 - | Method Detail |
|---|
public static BufferedImage createLayoutImage(DenseArray pa,
Color bg,
Color fg)
public int columns()
columns in interface IArrayD2Doublepublic cross.datastructures.tuple.Tuple2D<ArrayInt.D1,ArrayDouble.D1> flatten()
IArrayD2Double
flatten in interface IArrayD2Double
public double get(int row,
int col)
get in interface IArrayD2Doublepublic ArrayDouble.D2 getArray()
IArrayD2Double
getArray in interface IArrayD2Doublepublic int[] getColumnBounds(int row)
getColumnBounds in interface IArrayD2Doublepublic double getDefaultValue()
getDefaultValue in interface IArrayD2Doublepublic int getNumberOfStoredElements()
getNumberOfStoredElements in interface IArrayD2Doublepublic Area getShape()
getShape in interface IArrayD2Double
public boolean inRange(int i,
int j)
inRange in interface IArrayD2Doublepublic int rows()
rows in interface IArrayD2Double
public void set(int row,
int col,
double d)
throws ArrayIndexOutOfBoundsException
set in interface IArrayD2Doubled - the value to be set at row,col
ArrayIndexOutOfBoundsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||