Package uk.ac.cam.ch.wwmm.ptclib.misc

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.StringGISModelReader


    Elements maxents = elem.getChildElements("maxent");
    modelsByType = new HashMap<String,GISModel>();
    for(int i=0;i<maxents.size();i++) {
      Element maxent = maxents.get(i);
      String type = maxent.getAttributeValue("type");
      StringGISModelReader sgmr = new StringGISModelReader(maxent.getValue());
      GISModel gm = sgmr.getModel();
      modelsByType.put(type, gm);
    }   
  }
View Full Code Here


    gmByPrev = new HashMap<String,GISModel>();
    tagSet = new HashSet<String>();
    for(int i=0;i<maxents.size();i++) {
      Element maxent = maxents.get(i);
      String prev = maxent.getAttributeValue("prev");
      StringGISModelReader sgmr = new StringGISModelReader(maxent.getValue());
      GISModel gm = sgmr.getModel();
      gmByPrev.put(prev, gm);
      tagSet.add(prev);
      for(int j=0;j<gm.getNumOutcomes();j++) {
        tagSet.add(gm.getOutcome(j));
      }
View Full Code Here

    sgmw.persist();
    String modelStr = sgmw.toString();

    //System.out.println(modelStr);
   
    StringGISModelReader sgmr = new StringGISModelReader(modelStr);
    gis = sgmr.getModel();
    System.out.println("Round trip in " + (System.currentTimeMillis() - time));
    System.out.println(modelStr.length());
   
    //if(true) return;
   
View Full Code Here

  private void load(Element rootElem) throws Exception {
    Elements ee = rootElem.getChildElements("classifier");
    classifiers = new HashMap<String,GISModel>();
    for(int i=0;i<ee.size();i++) {
      String type = ee.get(i).getAttributeValue("type");
      StringGISModelReader sgmr = new StringGISModelReader(ee.get(i).getValue());
      classifiers.put(type, sgmr.getModel());
    }
  }
View Full Code Here

TOP

Related Classes of uk.ac.cam.ch.wwmm.ptclib.misc.StringGISModelReader

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.