public interface GenotypeValues
Interface GenotypeValues
represents a value for each
possible genotype for each sample at each marker.
All instances of GenotypeValues
are required to be thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
add(int sample,
double[] values)
Adds the specified genotype values to the stored genotype values
for the specified sample.
|
void |
add(int marker,
int sample,
int genotype,
double value)
Adds the specified genotype value to the stored genotype value.
|
Marker |
marker(int marker)
Returns the specified marker.
|
Markers |
markers()
Returns the list of markers.
|
int |
nMarkers()
Returns the number of markers.
|
int |
nSamples()
Returns the number of samples.
|
Samples |
samples()
Returns the list of samples.
|
java.lang.String |
toString()
Returns a string representation of
this . |
float |
value(int marker,
int sample,
int genotype)
Returns the specified genotype value.
|
float value(int marker, int sample, int genotype)
marker
- a marker indexsample
- a sample indexgenotype
- a genotype indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
java.lang.IndexOutOfBoundsException
- if
genotype < 0 || genotype >= this.marker(marker).nGenotypes()
void add(int sample, double[] values)
for (m=0; m<this.nMarkers(); ++m) { offset = this.markers().sumGenotypes(m); for (gt=0; gt<this.marker(m).nGenotypes(); ++gt) { this.add(marker, sample, gt, values[offset + gt]) } }
sample
- a sample indexvalues
- an array of length this.markers.sumGenotypes()
containing the genotype values to be added.java.lang.IndexOutOfBoundsException
- if
if sample < 0 || sample >= this.nSamples()
java.lang.IllegalArgumentException
- if
values.length != this.markers().sumGenotypes()
java.lang.NullPointerException
- if values == null
void add(int marker, int sample, int genotype, double value)
marker
- a marker indexsample
- a sample indexgenotype
- a genotype indexvalue
- the value to be addedjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
java.lang.IndexOutOfBoundsException
- if
genotype < 0 || genotype >= this.marker(marker).nGenotypes()
int nMarkers()
Markers markers()
Marker marker(int marker)
marker
- a marker indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
int nSamples()
Samples samples()
java.lang.String toString()
this
. The exact details
of the representation are unspecified and subject to change.toString
in class java.lang.Object
this