|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.multicorebsp.util.MatrixData<DoubleData>
com.multicorebsp.util.DoubleData
public class DoubleData
Enables storage of double data types in matrices.
| Field Summary | |
|---|---|
double[] |
values
Stores the real values in double precision. |
| Constructor Summary | |
|---|---|
|
DoubleData()
Base constructor, all data arrays remain null. |
|
DoubleData(double[] _R)
Base constructor, copies data handle by reference(!). |
protected |
DoubleData(DoubleData toCopy)
Deep copy constructor. |
|
DoubleData(int length)
Base constructor, initialises zero data. |
| Method Summary | |
|---|---|
void |
add(int i,
int j)
Adds the values of two nonzeroes and saves it at the last index available. |
void |
parseAndWrite(int i,
java.util.Scanner s)
Parses an input stream and writes the contect to the i'th index. |
void |
removeDuplicates(int nr)
Removes duplicates from the data structure. |
DoubleData |
safeClone()
|
DoubleData |
safeClone(int i,
int j)
Clones only a subset of the data. |
void |
swap(int i,
int j)
Swaps data elements. |
| Methods inherited from class com.multicorebsp.util.MatrixData |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double[] values
| Constructor Detail |
|---|
public DoubleData()
public DoubleData(int length)
public DoubleData(double[] _R)
protected DoubleData(DoubleData toCopy)
| Method Detail |
|---|
public void add(int i,
int j)
MatrixData
add in class MatrixData<DoubleData>i - First nonzero index (will remain unchanged).j - Second nonzero index (will be replaced by sum).public void removeDuplicates(int nr)
MatrixData
removeDuplicates in class MatrixData<DoubleData>nr - Number of elements to remove.
public void swap(int i,
int j)
MatrixData
swap in class MatrixData<DoubleData>i - First indexj - Second indexpublic DoubleData safeClone()
public DoubleData safeClone(int i,
int j)
MatrixData
safeClone in class MatrixData<DoubleData>i - Lower bound of the index to copy.j - Upper bound on the index to copy.
public void parseAndWrite(int i,
java.util.Scanner s)
MatrixData
parseAndWrite in class MatrixData<DoubleData>i - At what index to save input.s - Where to get the input from.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||