|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.test.distribution.pearson.AS159
public class AS159
Algorithm AS 159 accepts a table shape (the number of rows and columns), and two vectors, the lists of row and column sums. There may be 0, 1, or many tables with nonnegative, integral entries that have the given shape and sums. If there is at least one candidate, then the routine will choose one, uniformly over the number of distinct candidates. The routine will report the case if there are no candidates.
Other implementations includes 'rcont2'. For example,
| Nested Class Summary | |
|---|---|
static class |
AS159.RandomMatrix
a random matrix generated by AS159 and its probability |
| Constructor Summary | |
|---|---|
AS159(int[] rowSums,
int[] colSums)
Construct a random table generator according to row and column totals. |
|
AS159(int[] rowSums,
int[] colSums,
RandomNumberGenerator rng)
Construct a random table generator according to row and column totals. |
|
| Method Summary | |
|---|---|
AS159.RandomMatrix |
sample()
Construct a random matrix based on the row and column sums. |
boolean |
validate(Matrix A)
Check whether a matrix satisfies the row and column sums. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AS159(int[] rowSums,
int[] colSums)
rowSums - row totalscolSums - column totals
public AS159(int[] rowSums,
int[] colSums,
RandomNumberGenerator rng)
rowSums - row totalscolSums - column totalsrng - a uniform random number generator| Method Detail |
|---|
public boolean validate(Matrix A)
A - a matrix
public AS159.RandomMatrix sample()
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||