Examples of intern()


Examples of org.apache.mahout.vectorizer.encoders.Dictionary.intern()

            null, true, conf);
    while (iter.hasNext()) {
      Pair<Text, VectorWritable> next = iter.next();
      String ng = next.getFirst().toString();

      int actual = asfDictionary.intern(ng);
      Vector result = classifier.classifyFull(next.getSecond().get());
      int cat = result.maxValueIndex();
      double score = result.maxValue();
      double ll = classifier.logLikelihood(actual, next.getSecond().get());
      ClassifierResult cr = new ClassifierResult(asfDictionary.values().get(cat), score, ll);
View Full Code Here

Examples of org.apache.mahout.vectorizer.encoders.Dictionary.intern()

  @Test
  public void testDictionaryOrder() {
    Dictionary dict = new Dictionary();

    dict.intern("a");
    dict.intern("d");
    dict.intern("c");
    dict.intern("b");
    dict.intern("qrz");
View Full Code Here

Examples of org.apache.mahout.vectorizer.encoders.Dictionary.intern()

  @Test
  public void testDictionaryOrder() {
    Dictionary dict = new Dictionary();

    dict.intern("a");
    dict.intern("d");
    dict.intern("c");
    dict.intern("b");
    dict.intern("qrz");

    assertEquals("[a, d, c, b, qrz]", dict.values().toString());
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.intern()

        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange == null ? null : exchange.intern(),
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey == null ? null : routingKey.intern(false));

    }

    public AMQMethodBody convertToBody(MessagePublishInfo info)
    {
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.intern()

        else
        {
            try
            {
                exchange = virtualHost.createExchange(null,
                                                      exchangeName == null ? null : exchangeName.intern().toString(),
                                                      body.getType() == null ? null : body.getType().intern().toString(),
                                                      body.getDurable(),
                                                      body.getAutoDelete(),
                        null);
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.intern()

                }
                else
                {
                    try
                    {
                        exchange = exchangeFactory.createExchange(exchangeName == null ? null : exchangeName.intern(),
                                                                  body.getType() == null ? null : body.getType().intern(),
                                                                  body.getDurable(),
                                                                  body.getPassive(), body.getTicket());
                        exchangeRegistry.registerExchange(exchange);
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.intern()

        else
        {
            try
            {
                exchange = virtualHost.createExchange(null,
                                                      exchangeName == null ? null : exchangeName.intern().toString(),
                                                      body.getType() == null ? null : body.getType().intern().toString(),
                                                      body.getDurable(),
                                                      body.getAutoDelete(),
                        null);
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.intern()

        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange == null ? null : exchange.intern(),
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey == null ? null : routingKey.intern());

    }

    public AMQMethodBody convertToBody(MessagePublishInfo info)
    {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager.intern()

    accessRules[i] = new ClasspathAccessRule(pattern, problemId);
  }
  JavaModelManager manager = JavaModelManager.getJavaModelManager();
  String[] messageTemplates = new String[AccessRuleSet.MESSAGE_TEMPLATES_LENGTH];
  for (int i = 0; i < AccessRuleSet.MESSAGE_TEMPLATES_LENGTH; i++) {
    messageTemplates[i] = manager.intern(in.readUTF());
  }
  AccessRuleSet accessRuleSet = new AccessRuleSet(accessRules, messageTemplates);
  return accessRuleSet;
}
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.intern()

    char[] pattern = readName(in);
    int problemId = in.readInt();
    accessRules[i] = new ClasspathAccessRule(pattern, problemId);
  }
  JavaModelManager manager = JavaModelManager.getJavaModelManager();
  return new AccessRuleSet(accessRules, in.readByte(), manager.intern(in.readUTF()));
}

void tagAsNoopBuild() {
  this.buildNumber = -1; // tag the project since it has no source folders and can be skipped
}
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.