#include <Feature.h>
Inheritance diagram for Feature:
Public Types | |
enum | FeatureType { boolean, nominal, ordinal, numerical_discrete, numerical_continuous } |
Public Member Functions | |
virtual | ~Feature () |
virtual FeatureType | getType () const =0 |
virtual const string | getName () const =0 |
virtual double | getPosition () const =0 |
bool | isExternalizable () |
virtual double | getDistance (Feature *f) const =0 |
virtual void | moveTowards (Feature *f, double factor)=0 |
virtual Feature * | clone () const =0 |
virtual string | serialize () const =0 |
virtual void | unserialize (string value)=0 |
virtual void | aggregate (aggregatelist samples)=0 |
virtual string | toString () const =0 |
Protected Member Functions | |
Feature (bool ext) | |
Feature () | |
Protected Attributes | |
const bool | externalize |
A feature represents a single dimension in the cluster space and implements the necessary funcionality to compare features of the same kind and measure distances between them. A feature is identified by a name which has to be unique in the scope of its feature provider. It abstracts the type and structure of the underlying sensor data and can also apply arbitrary data processing and transformation to the raw sensor data. Typically, a sensor (i.e. a FeatureProvider) will provide multiple features which are extracted using domain-specific knowledge.
A feature will also be referenced as sample. Samples are a more generic from of a feature only containing information about their position and without information about corresponding neighbours, age, error, etc.
|
Possible feature types |
|
Constructor for usage in PerstantFeature Sets the externalization flag to the given value.
|
|
Default constructor Sets the externalization flag to false.
|
|
Destructor Empty virtual destructor to have an entry in the implementing classes method table. This ensures that derived classes get destructed correctly. |
|
Aggregate a sample values from other sources
Implemented in AbstractStringFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Clone a feature A feature must be able to clone itself. This is typically implemented with a copy constructor, but should return a new object. Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Calculates the distance between two features
Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Query a features name
Implemented in AbstractStringFeature, AbstractStringListFeature, ActiveWindowFeature, AudioBandFeature, AudioMeanFeature, AudioPeakFeature, BluetoothPeersFeature, BluetoothNumPeersFeature, GSMCellFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, SystemCommandStringListFeature, TimeFeature, WlanActiveEssidFeature, WlanActiveMacAddressFeature, WlanActiveModeFeature, WlanActiveSignalLevelFeature, WlanPeersFeature, and WlanNumPeersFeature. |
|
Query a features position
Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Query a features type
Implemented in AbstractStringFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Query externalization flag
|
|
Move feature Moves the feature towards a given sample value by the specified factor (factor times the distance). If the factor is 0, the old feature value must not change. If the factor is 1, the new feature value should be equivalent to the sample s.
Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Serialize a samples data to a string
Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
|
Unserialize a samples data from a string
Implemented in AbstractStringFeature, AbstractStringListFeature, NumericalDiscreteFeature, NumericalContinuousFeature, PowerFeature, TimeFeature, and WlanActiveModeFeature. |
|
Externalization flag If true, then this feature has persistent data which should be preserved across restarts of the application (e.g. a list of already seen feature values for nominal and ordinal types or maximum and minimum values for numerical types). For all persistant features, the object should be cast to PersistentFeature, because only subclasses of this type are (by policy) allowed to set this variable to true.
|