|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.data.DataSet.WeightedDataSetFactory
public static class DataSet.WeightedDataSetFactory
This class enables you to eliminate Sequences that occur more
than once in one or more DataSets. The number of occurrences is
given by the weight for a Sequence.
| Nested Class Summary | |
|---|---|
static class |
DataSet.WeightedDataSetFactory.SortOperation
This enum defines the different types of sort operations
that can be performed while creating a DataSet.WeightedDataSetFactory. |
| Method Summary | |
|---|---|
DataSet |
getDataSet()
Returns the DataSet, where each Sequence occurs only
once. |
Sequence |
getElementAt(int index)
Returns the Sequence with index index. |
int |
getNumberOfElements()
Returns the number of elements, i.e. |
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 DataSet. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation sort,
DataSet... data)
throws WrongAlphabetException,
WrongLengthException
DataSet.WeightedDataSetFactory on the given
DataSet(s) with DataSet.WeightedDataSetFactory.SortOperation sort.
sort - the given DataSet.WeightedDataSetFactory.SortOperationdata - the given DataSet(s)
WrongAlphabetException - if the alphabets of the DataSets do not match
WrongLengthException - does not happen (forwarded from
DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
)DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation sort,
DataSet data,
double[] weights)
throws WrongAlphabetException,
WrongLengthException
DataSet.WeightedDataSetFactory on the given
DataSet and an array of weights with
DataSet.WeightedDataSetFactory.SortOperation sort.
sort - the given DataSet.WeightedDataSetFactory.SortOperationdata - the given DataSetweights - the weights for each element in the DataSet
WrongAlphabetException - if the alphabets of the DataSets do not match
WrongLengthException - does not happen (forwarded from
DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
)DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation sort,
DataSet data,
double[] weights,
int length)
throws WrongAlphabetException,
WrongLengthException
DataSet.WeightedDataSetFactory on the given
DataSet and an array of weights with a given
length and DataSet.WeightedDataSetFactory.SortOperation sort.
sort - the given DataSet.WeightedDataSetFactory.SortOperationdata - the given DataSetweights - the weight for each element in the DataSetlength - the length of the elements in the resulting
DataSet.WeightedDataSetFactory
WrongAlphabetException - if the alphabets of the DataSets do not match
WrongLengthException - if the length is not supportedDataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation sort,
DataSet[] data,
double[][] weights,
int length)
throws WrongAlphabetException,
WrongLengthException
DataSet.WeightedDataSetFactory on the given array of
DataSets and an array of weights with a given
length and DataSet.WeightedDataSetFactory.SortOperation sort.
sort - the given DataSet.WeightedDataSetFactory.SortOperationdata - the given DataSetweights - the weights for each element in each DataSetlength - the length of the elements in the resulting
DataSet.WeightedDataSetFactory
WrongAlphabetException - if the alphabets of the DataSets do not match
WrongLengthException - if the length is not supported| Method Detail |
|---|
public Sequence getElementAt(int index)
Sequence with index index.
index - the index of the Sequence
Sequence with index indexpublic int getNumberOfElements()
Sequences, in the
internal DataSet.
Sequences, in the
internal DataSetpublic DataSet getDataSet()
DataSet, where each Sequence occurs only
once.
DataSet, where each Sequence occurs only
oncepublic double getSumOfWeights()
public double getWeight(int index)
Sequence with index
index.
index - the index of the Sequence
Sequence with index
indexpublic double[] getWeights()
DataSet.
DataSetpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||