Modifier and Type | Class and Description |
---|---|
static class |
DataSet.WeightedDataSetFactory.SortOperation
This
enum defines the different types of sort operations
that can be performed while creating a DataSet.WeightedDataSetFactory . |
Modifier and Type | Method and Description |
---|---|
DataSet |
getDataSet()
|
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() |
public 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.SortOperation
data
- the given DataSet
(s)WrongAlphabetException
- if the alphabets of the DataSet
s do not matchWrongLengthException
- does not happen (forwarded from
DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
)DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public 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.SortOperation
data
- the given DataSet
weights
- the weights for each element in the DataSet
WrongAlphabetException
- if the alphabets of the DataSet
s do not matchWrongLengthException
- does not happen (forwarded from
DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
)DataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public 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.SortOperation
data
- the given DataSet
weights
- the weight for each element in the DataSet
length
- the length of the elements in the resulting
DataSet.WeightedDataSetFactory
WrongAlphabetException
- if the alphabets of the DataSet
s do not matchWrongLengthException
- if the length is not supportedDataSet.WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation, DataSet[], double[][], int)
public WeightedDataSetFactory(DataSet.WeightedDataSetFactory.SortOperation sort, DataSet[] data, double[][] weights, int length) throws WrongAlphabetException, WrongLengthException
DataSet.WeightedDataSetFactory
on the given array of
DataSet
s and an array of weights
with a given
length
and DataSet.WeightedDataSetFactory.SortOperation
sort
.sort
- the given DataSet.WeightedDataSetFactory.SortOperation
data
- the given DataSet
weights
- the weights for each element in each DataSet
length
- the length of the elements in the resulting
DataSet.WeightedDataSetFactory
WrongAlphabetException
- if the alphabets of the DataSet
s do not matchWrongLengthException
- if the length is not supportedpublic int getNumberOfElements()
public double getSumOfWeights()
public double getWeight(int index)
Sequence
with index
index
.public double[] getWeights()
DataSet
.DataSet