org.android.activityminer.logic.util
Class FeatureSetCreator

Package class diagram package FeatureSetCreator
java.lang.Object
  extended by org.android.activityminer.logic.util.FeatureSetCreator

public class FeatureSetCreator
extends Object

Utility class for the creation of feature sets for evaluation.


Constructor Summary
FeatureSetCreator()
           
 
Method Summary
static
<T> Set<Set<T>>
powerSet(Set<T> set)
          Does create a power set from the given set.
static
<T> void
removeEmtySet(Set<Set<T>> powerSet)
          Does remove the empty set from a power set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureSetCreator

public FeatureSetCreator()
Method Detail

powerSet

public static final <T> Set<Set<T>> powerSet(Set<T> set)
Does create a power set from the given set. Follows an implementation from http://rosettacode.org/wiki/Power_set#Iterative.
The original set is not modified!

Type Parameters:
T - the element type of the set
Parameters:
set - the original set to create a power set for
Returns:
the power set of the original set

removeEmtySet

public static final <T> void removeEmtySet(Set<Set<T>> powerSet)
Does remove the empty set from a power set.

Type Parameters:
T - the element type of the set
Parameters:
powerSet - the power set to remove empty set from