|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.strbio.math.DVector
org.strbio.math.DHalfMatrix
public class DHalfMatrix
like an upper triangular DMatrix. This pretends that you have a NxN matrix, but only allows access to elements in the upper triangular part (not including the diagonal). Allowed elements are of the form (i, i+1...n-1). You can access the data[] directly or call inherited methods from DVector, but you SHOULDN'T DO THIS.
DMatrix
Field Summary |
---|
Fields inherited from class org.strbio.math.DVector |
---|
data |
Constructor Summary | |
---|---|
DHalfMatrix()
Makes a new DHalfMatrix with no data. |
|
DHalfMatrix(DHalfMatrix x)
This makes a DHalfMatrix from another one, making a separate copy of the data. |
|
DHalfMatrix(int x)
This makes a new DHalfMatrix which is the upper triangular part of a square matrix. |
Method Summary | |
---|---|
int |
cols()
Returns the number of columns (of the theoretical whole matrix, not just the upper triangular part. |
void |
load(java.io.BufferedReader fp)
Loads from an open BufferedReader. |
void |
print(PrintfStream outfile)
Print nicely formatted data to a PrintfStream. |
int |
rows()
Returns the number of rows (of the theoretical whole matrix, not just the upper triangular part. |
void |
setValueAt(int x,
int y,
double d)
This allows you to set a value at column x, row y in the theoretical whole matrix. |
double |
valueAt(int x,
int y)
This allows you to get a value at column x, row y in the theoretical whole matrix. |
Methods inherited from class org.strbio.math.DVector |
---|
add, add, append, append, average, averageRW, covar, cross, cross, dimension, distance, distance, divide, divide, dot, dot, equals, findNClosest, length, linearFit, load, makeZScores, max, median, min, multiply, multiply, multiply, multiply, multiply, multiply, norm, normalize, pearson, print, reverse, reverse, save, save, setValue, setValueAt, sort, stdev, stdevp, subtract, subtract, transform, valueAt, zScore |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DHalfMatrix(int x)
x
- the number of rows and columns (x by x matrix)public DHalfMatrix()
public DHalfMatrix(DHalfMatrix x)
Method Detail |
---|
public final int rows()
public final int cols()
public final double valueAt(int x, int y)
x
- column numbery
- row numberpublic final void setValueAt(int x, int y, double d)
x
- column numbery
- row numberd
- double to storepublic final void print(PrintfStream outfile) throws java.io.IOException
java.io.IOException
public final void load(java.io.BufferedReader fp) throws java.io.IOException
load
in class DVector
java.io.IOException
DVector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |