public class ContainsElementFilter extends BaseDatasetFilter
CompositionDataset.
Usage: <Element names...>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String[] |
ElementList
Elements that compounds are not allowed to contain
|
protected int[] |
ExcludedIndex
List of IDs of those elements
|
| Constructor and Description |
|---|
ContainsElementFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
entryContainsElement(CompositionEntry entry)
Determine whether an entry contains one of the specified elements.
|
protected static int[] |
getElementIndices(java.lang.String[] ElementList)
Given a list of elements, return their indices.
|
boolean[] |
label(Dataset D)
Given a dataset, determine which entries passes the filter.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setElementList(java.lang.String[] elements)
Define list of elements to use for filter.
|
void |
setElementListByIndex(int[] elements)
Define a list of elements to use for the filter
|
void |
setOptions(java.util.List<java.lang.Object> OptionsObj)
Set any options for this object.
|
void |
train(Dataset TrainingSet)
Train a dataset splitter, if necessary
|
filter, parallelLabel, parallelMinimum, setExclude, toExcludeprotected java.lang.String[] ElementList
protected int[] ExcludedIndex
protected static int[] getElementIndices(java.lang.String[] ElementList)
ElementList - List of element names to operate onpublic void setOptions(java.util.List<java.lang.Object> OptionsObj)
throws java.lang.Exception
OptionsOptionsObj - Array of options as Objects - can be nulljava.lang.Exception - if problem with inputspublic void setElementList(java.lang.String[] elements)
ElementList - List of element abbreviationspublic void setElementListByIndex(int[] elements)
elements - Index of the elementspublic java.lang.String printUsage()
Optionspublic void train(Dataset TrainingSet)
BaseDatasetFiltertrain in class BaseDatasetFilterTrainingSet - Dataset to use for trainingpublic boolean[] label(Dataset D)
BaseDatasetFilterlabel in class BaseDatasetFilterD - Dataset to be labeledpublic boolean entryContainsElement(CompositionEntry entry)
entry - Entry in question