org.dllearner.utilities.datastructures
Class SetManipulation

java.lang.Object
  extended by org.dllearner.utilities.datastructures.SetManipulation

public class SetManipulation
extends Object


Constructor Summary
SetManipulation()
           
 
Method Summary
static SortedSet<String> fuzzyShrink(SortedSet<String> set, int limit)
          shrinks a set to the limit fuzzy here means the elements will be randomly picked
static SortedSet<Individual> fuzzyShrinkInd(SortedSet<Individual> set, int limit)
          shrinks a set to the limit fuzzy here means the elements will be randomly picked
static
<T> List<T>
getFirst(List<T> list, int nrElements)
          XXX getFirst n Elements from list.
static SortedSet<String> indToString(SortedSet<Individual> set)
           
static void printSet(String s, SortedSet<String> set, org.apache.log4j.Logger logger)
           
static
<T> void
printSet(String s, SortedSet<T> set)
           
static SortedSet<String> stableShrink(SortedSet<String> set, int limit)
          shrinks a set to the limit takes the first elements up to limit
static SortedSet<Individual> stableShrinkInd(SortedSet<Individual> set, int limit)
          shrinks a set to the limit takes the first elements up to limit
static SortedSet<Individual> stringToInd(SortedSet<String> set)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetManipulation

public SetManipulation()
Method Detail

fuzzyShrink

public static SortedSet<String> fuzzyShrink(SortedSet<String> set,
                                            int limit)
shrinks a set to the limit fuzzy here means the elements will be randomly picked

Parameters:
set -
limit -

fuzzyShrinkInd

public static SortedSet<Individual> fuzzyShrinkInd(SortedSet<Individual> set,
                                                   int limit)
shrinks a set to the limit fuzzy here means the elements will be randomly picked

Parameters:
set -
limit -

stableShrink

public static SortedSet<String> stableShrink(SortedSet<String> set,
                                             int limit)
shrinks a set to the limit takes the first elements up to limit

Parameters:
set -
limit -

stableShrinkInd

public static SortedSet<Individual> stableShrinkInd(SortedSet<Individual> set,
                                                    int limit)
shrinks a set to the limit takes the first elements up to limit

Parameters:
set -
limit -

getFirst

public static <T> List<T> getFirst(List<T> list,
                                   int nrElements)
XXX getFirst n Elements from list. changes the list object!!!

Parameters:
list -
nrElements -
Returns:
returns the list shrunken to size.

stringToInd

public static SortedSet<Individual> stringToInd(SortedSet<String> set)

indToString

public static SortedSet<String> indToString(SortedSet<Individual> set)

printSet

public static void printSet(String s,
                            SortedSet<String> set,
                            org.apache.log4j.Logger logger)

printSet

public static <T> void printSet(String s,
                                SortedSet<T> set)


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann