Examples of normalize()


Examples of aima.core.probability.CategoricalDistribution.normalize()

        unboundEvidence = true;
        break;
      }
    }
    if (!unboundEvidence) {
      rVal.normalize();
    }

    return rVal;
  }
View Full Code Here

Examples of aima.core.probability.util.ProbabilityTable.normalize()

      }
    };
    Q.iterateOverTable(di);

    // return NORMALIZE(Q(X))
    return Q.normalize();
  }

  //
  // START-BayesInference
  public CategoricalDistribution ask(final RandomVariable[] X,
View Full Code Here

Examples of aspect.util.Vector3.normalize()

        for (int i = 0; i < numEdges; i++) {
            for (int j = 0; j < c.numEdges; j++) {
                Vector3 cross = Vector3.cross(edges[i], cedges[j]);
                if (cross.mag2() != 0.0f) {
                    axes[pos++] = cross.normalize();
                } else {
                    axes[pos++] = null;
                }
            }
        }
View Full Code Here

Examples of bixo.urls.BaseUrlNormalizer.normalize()

            List<String> lines = FileUtils.readLines(new File(args[0]));

            BaseUrlNormalizer urlNormalizer = new SimpleUrlNormalizer();
            for (String url : lines) {
                curUrl = url;
                String normalized = urlNormalizer.normalize(curUrl);
                if (!normalized.equalsIgnoreCase(curUrl)) {
                    System.out.println(curUrl + " ==> " + normalized);
                }
            }
        } catch (Throwable t) {
View Full Code Here

Examples of bixo.urls.SimpleUrlNormalizer.normalize()

        try {
            Tap urlSink = platform.makeTap(platform.makeBinaryScheme(CrawlDbDatum.FIELDS), crawlDbPath, SinkMode.REPLACE);
            TupleEntryCollector writer = urlSink.openForWrite(platform.makeFlowProcess());
            SimpleUrlNormalizer normalizer = new SimpleUrlNormalizer();

            CrawlDbDatum datum = new CrawlDbDatum(normalizer.normalize("http://" + targetDomain), 0, 0, UrlStatus.UNFETCHED, 0);

            writer.add(datum.getTuple());
            writer.close();
        } catch (Exception e) {
            throw e;
View Full Code Here

Examples of cambridge.model.TemplateDocument.normalize()

      try {
         TemplateTokenizer tokenizer = new TemplateTokenizer(ParserTest.class.getResourceAsStream("full.html"));
         TemplateParser parser = new TemplateParser(tokenizer);
         TemplateDocument t = parser.parse();
         assertNotNull(t);
         FragmentList fragments = t.normalize();


         StringWriter builder = new StringWriter();

         for (Fragment f : fragments) {
View Full Code Here

Examples of cc.mallet.grmm.types.Factor.normalize()

      Factor fromCpf = jt.getCPF (from);
      Factor toCpf = jt.getCPF (to);
      Factor oldSepsetPot = jt.getSepsetPot (from, to);
      Factor lambda = fromCpf.marginalize (sepset);

      lambda.normalize ();

      jt.setSepsetPot (lambda, from, to);
      toCpf = toCpf.multiply (lambda);
      toCpf.divideBy (oldSepsetPot);
      toCpf.normalize ();
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.url.WebUrlImpl.normalize()

    // Cache the action urls
    StringBuffer flavors = new StringBuffer();
    synchronized (urlCache) {
      for (RequestFlavor flavor : action.getFlavors()) {
        WebUrl actionUrl = new WebUrlImpl(action.getSite(), action.getPath(), Resource.LIVE, flavor);
        String normalizedUrl = actionUrl.normalize(false, false, true);
        urlCache.put(normalizedUrl, pool);
        if (flavors.length() > 0)
          flavors.append(",");
        flavors.append(flavor.toString().toLowerCase());
        logger.trace("Caching action '{}' for url {}", action, normalizedUrl);
View Full Code Here

Examples of ch.entwine.weblounge.common.url.WebUrl.normalize()

    // Cache the action urls
    StringBuffer flavors = new StringBuffer();
    synchronized (urlCache) {
      for (RequestFlavor flavor : action.getFlavors()) {
        WebUrl actionUrl = new WebUrlImpl(action.getSite(), action.getPath(), Resource.LIVE, flavor);
        String normalizedUrl = actionUrl.normalize(false, false, true);
        urlCache.put(normalizedUrl, pool);
        if (flavors.length() > 0)
          flavors.append(",");
        flavors.append(flavor.toString().toLowerCase());
        logger.trace("Caching action '{}' for url {}", action, normalizedUrl);
View Full Code Here

Examples of client.net.sf.saxon.ce.functions.codenorm.Normalizer.normalize()

            return sv;
        }


        Normalizer norm = new Normalizer(fb, c.getConfiguration());
        CharSequence result = norm.normalize(sv.getStringValueCS());
        return StringValue.makeStringValue(result);
    }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.