public class HapToSeq
extends java.lang.Object
Class HapToSeq stores an array mapping haplotype indices to
allele sequences indices.
Instances of class HapToSeq are immutable.
| Constructor | Description |
|---|---|
HapToSeq(int[] hap2Seq,
int nSeq) |
Constructs a new
HapAlleles instance from the specified data. |
HapToSeq(IntArray hap2Seq,
int nSeq) |
Constructs a new
HapAlleles instance from the specified data. |
| Modifier and Type | Method | Description |
|---|---|---|
IntArray |
hap2Seq() |
Returns the array mapping haplotype indices to sequence indices.
|
int |
nHaps() |
Returns the number of haplotypes.
|
int |
nSeqs() |
Returns the number of sequences.
|
public HapToSeq(int[] hap2Seq,
int nSeq)
HapAlleles instance from the specified data.
The contract for this constructor and class is unspecified if
the sequence indices are not a subset of 0, 1, ..., (nSeq - 1).hap2Seq - an array mapping haplotype index to sequence indexnSeq - the number of distinct sequence indicesjava.lang.IllegalArgumentException - if nSeq < 1java.lang.NullPointerException - ifhap2Seq == nullpublic HapToSeq(IntArray hap2Seq, int nSeq)
HapAlleles instance from the specified data.
The contract for this constructor and class is unspecified if
the sequence indices are not a subset of 0, 1, ..., (nSeq - 1).hap2Seq - an array mapping haplotype index to sequence indexnSeq - the number of distinct sequence indicesjava.lang.NullPointerException - ifhap2Seq == nullpublic int nHaps()
public int nSeqs()
public IntArray hap2Seq()