Package com.mojang.ld22.item

Examples of com.mojang.ld22.item.Item


    } catch (IOException e) {
      e.printStackTrace();
    }

    resetGame();
    setMenu(new TitleMenu());
  }
View Full Code Here


            pendingLevelChange = 0;
          }
        }
        if (wonTimer > 0) {
          if (--wonTimer == 0) {
            setMenu(new WonMenu());
          }
        }
        level.tick();
        Tile.tickCount++;
      }
View Full Code Here

    StringTokenizer t = new StringTokenizer(line);
    List<Item> items = new ArrayList<Item>();
   
    while(t.countTokens() > 1){
      String item = t.nextToken();
      items.add(new Item(item));
    }
   
    // record the max value found for svm preperation
    Item i = Collections.max(items, new Comparator<Item>() {
   
      public int compare(Item o1, Item o2) {
        return Integer.valueOf(o1.getItemName()).compareTo(Integer.valueOf(o2.getItemName()));
      }
   
    });
    int largest = Integer.valueOf(i.getItemName()).intValue();
    if(Double.isNaN(largestItemFoundInit) ||  largest > largestItemFound){
      largestItemFound = largest;
    }
    String classLabel = t.nextToken();
    Transaction tran = new Transaction(TID++,classLabel,items);
View Full Code Here

          // min sup is not met, so chop off patterns until we meet min sup
           else{ //count < min_sup
           Pattern freqpat = fp.getPattern();
           List<Item> list = freqpat.getPatternBase();
           //add this label to the list so we don't chop off part of the cond pat base until it's count has been calculated
           list.add(new Item(label));
           while(list.size() > 0){
            String tlabel = list.get(0).getItemName();
            list.remove(list.size()-1);
            FPTree temp = tree.getSubTreeByLabel(tlabel);
            for(int i = 1; i<list.size();i++){
View Full Code Here

//   
//    DDPMine m = new DDPMine(tDB,1);
//    List<Pattern> results = m.perform(t.getHeader());
//    System.out.println(results);
    Pattern pp = new Pattern();
    pp.insertItem(new Item("d"));
//    pp.insertItem(new Item("b"));
    ConditionalDB d = tDB.getConditionalDBForPattern(pp);
    FPTree tr = d.buildConditionalFPTree();
   
  }
View Full Code Here

  public Transaction(int tid,String classLabel,String ... item){
    this.tid = tid;
    this.classLabel = classLabel;
    for(int i=0;i<item.length;i++){
      items.add(new Item(item[i]));
    }
  }
View Full Code Here

   * @param maxPatternValue
   */
  private void primePatternMappings(int maxPatternValue){
    int nextIntForMap = ++maxPatternValue;
    for(Pattern p : frequentPatterns){
      Item i = new Item(String.valueOf(nextIntForMap++));
      frequentPatternMappings.put(p, i);
    }
  }
View Full Code Here

    // consider removing and making part of the inputFileReader
    StringTokenizer t = new StringTokenizer(line);
    List<Item> items = new ArrayList<Item>();
   
    while(t.countTokens() > 1){
      items.add(new Item(t.nextToken()));
    }

    String classLabel = t.nextToken();
    Transaction tran = new Transaction(TID++,classLabel,items);
    return tran;
View Full Code Here

    t.processFile("D:\\workspace\\CS412_HW3\\src\\train2.txt");
    t.returnNewFile("c:\\train2Modified2.txt");
  }
  private static void primePattern(Pattern p, Integer ...strings ){
    for(Integer s: strings){
      Item item = new Item(String.valueOf(s));
      p.insertItem(item);
    }
  }
View Full Code Here

        return bestPat;
      }
      for(FrequentPattern fpp: fp){
        System.out.println();
      }
      Item ai = child.getLabel();
      Pattern B = new Pattern(alpha);
      B.insertItem(ai);//with support = ai.support
      double ig_b = myDBRef.IG(B);
      boolean isCovered = myDBRef.isCovered(B);
      if(!isCovered){
View Full Code Here

TOP

Related Classes of com.mojang.ld22.item.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.