Package adams.flow.container
Class WekaNearestNeighborSearchContainer
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.WekaNearestNeighborSearchContainer
-
- All Implemented Interfaces:
adams.core.CloneHandler<adams.flow.container.Container>,adams.core.GlobalInfoSupporter,adams.data.spreadsheet.SpreadSheetSupporter,adams.flow.container.Container,Serializable
public class WekaNearestNeighborSearchContainer extends adams.flow.container.AbstractContainerA container for nearest neighbor search (instance and neighborhood).- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALUE_DISTANCESthe identifier for the distances.static StringVALUE_INSTANCEthe identifier for the Instance.static StringVALUE_NEIGHBORHOODthe identifier for the neighborhood.
-
Constructor Summary
Constructors Constructor Description WekaNearestNeighborSearchContainer()Initializes the container.WekaNearestNeighborSearchContainer(weka.core.Instance inst, weka.core.Instances hood)Initializes the container with the filter and the associated data.WekaNearestNeighborSearchContainer(weka.core.Instance inst, weka.core.Instances hood, double[] distances)Initializes the container with the filter and the associated data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitHelp()Initializes the help strings.booleanisValid()Checks whether the setup of the container is valid.Iterator<String>names()Returns all value names that can be used (theoretically).
-
-
-
Field Detail
-
VALUE_INSTANCE
public static final String VALUE_INSTANCE
the identifier for the Instance.- See Also:
- Constant Field Values
-
VALUE_NEIGHBORHOOD
public static final String VALUE_NEIGHBORHOOD
the identifier for the neighborhood.- See Also:
- Constant Field Values
-
VALUE_DISTANCES
public static final String VALUE_DISTANCES
the identifier for the distances.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WekaNearestNeighborSearchContainer
public WekaNearestNeighborSearchContainer()
Initializes the container.
Only used for generating help information.
-
WekaNearestNeighborSearchContainer
public WekaNearestNeighborSearchContainer(weka.core.Instance inst, weka.core.Instances hood)Initializes the container with the filter and the associated data.- Parameters:
inst- the instance that triggered the nearest neighbor searchhood- the neighborhood
-
WekaNearestNeighborSearchContainer
public WekaNearestNeighborSearchContainer(weka.core.Instance inst, weka.core.Instances hood, double[] distances)Initializes the container with the filter and the associated data.- Parameters:
inst- the instance that triggered the nearest neighbor searchhood- the neighborhooddistances- the distances, can be null
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelpin classadams.flow.container.AbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
namesin interfaceadams.flow.container.Container- Specified by:
namesin classadams.flow.container.AbstractContainer- Returns:
- enumeration over all possible value names
-
isValid
public boolean isValid()
Checks whether the setup of the container is valid.- Specified by:
isValidin interfaceadams.flow.container.Container- Specified by:
isValidin classadams.flow.container.AbstractContainer- Returns:
- true if all the necessary values are available
-
-