|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.data.Sample.WeightedSampleFactory
public static class Sample.WeightedSampleFactory
This class enables you to eliminate sequences that occur more than once in one or more samples. The number of occurrences is given by the weight for a sequence.
| Nested Class Summary | |
|---|---|
static class |
Sample.WeightedSampleFactory.SortOperation
This enum defines the different types of sort operations
that can be performed while creating a Sample.WeightedSampleFactory. |
| Constructor Summary | |
|---|---|
Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample... data)
This constructor creates a Sample.WeightedSampleFactory on the given
Sample(s). |
|
Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample[] data,
double[][] weights,
int length)
This constructor creates a Sample.WeightedSampleFactory on the given
array of Samples and weights. |
|
Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample data,
double[] weights)
This constructor creates a Sample.WeightedSampleFactory on the given
Sample and weights. |
|
Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample data,
double[] weights,
int length)
This constructor creates a Sample.WeightedSampleFactory on the given
Sample and weights. |
|
| Method Summary | |
|---|---|
Sequence |
getElementAt(int index)
Returns the sequence with index index. |
int |
getNumberOfElements()
Returns the number of elements in the internal Sample. |
Sample |
getSample()
Returns the sample, where each sequence occurs only once. |
double |
getSumOfWeights()
Returns the sum of all weights. |
double |
getWeight(int index)
Returns the weight for the sequence with index index. |
double[] |
getWeights()
Returns a copy of the weights for the sample. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample... data)
throws WrongAlphabetException,
WrongLengthException
Sample.WeightedSampleFactory on the given
Sample(s).
sort - the Sample.WeightedSampleFactory.SortOperationdata - the Sample(s)
WrongAlphabetException - if the alphabets of the samples do not match
WrongLengthException - does not happen
public Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample data,
double[] weights)
throws WrongAlphabetException,
WrongLengthException
Sample.WeightedSampleFactory on the given
Sample and weights.
sort - the Sample.WeightedSampleFactory.SortOperationdata - the Sampleweights - the weights for each element in the Sample
WrongAlphabetException - if the alphabets of the samples do not match
WrongLengthException - does not happen
public Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample data,
double[] weights,
int length)
throws WrongAlphabetException,
WrongLengthException
Sample.WeightedSampleFactory on the given
Sample and weights.
sort - the Sample.WeightedSampleFactory.SortOperationdata - the Sampleweights - the weight for each element in the Samplelength - the length of the elements in the resulting
Sample.WeightedSampleFactory
WrongAlphabetException - if the alphabets of the samples do not match
WrongLengthException - if the length is not supported
public Sample.WeightedSampleFactory(Sample.WeightedSampleFactory.SortOperation sort,
Sample[] data,
double[][] weights,
int length)
throws WrongAlphabetException,
WrongLengthException
Sample.WeightedSampleFactory on the given
array of Samples and weights.
sort - the Sample.WeightedSampleFactory.SortOperationdata - the Sampleweights - the weights for each element in each Samplelength - the length of the elements in the resulting
Sample.WeightedSampleFactory
WrongAlphabetException - if the alphabets of the samples do not match
WrongLengthException - if the length is not supported| Method Detail |
|---|
public Sequence getElementAt(int index)
index.
index - the index of the sequence
indexpublic int getNumberOfElements()
Sample.
Samplepublic Sample getSample()
public double getSumOfWeights()
public double getWeight(int index)
index.
index - the index of the sequence
indexpublic double[] getWeights()
getSample()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||