Examples of Index


Examples of com.splunk.Index

                Command.error("Index " + name + " already exists");
            indexes.create(name);
            return;
        }

        Index index = indexes.get(name);
        if (index == null)
            Command.error("Index '" + name + "' does not exists");

        if (action.equals("clean")) {
            try {
                index.clean(180);   // Timeout after 3 minutes.
            } catch (SplunkException e) {
                if (e.getCode() == SplunkException.INTERRUPTED) {
                    // User pressed Ctrl-C
                    return;
                } else {
                    throw e;
                }
            }
        }
        else if (action.equals("disable"))
            index.disable();
        else if (action.equals("enable"))
            index.enable();
        else
            Command.error("Unknown action '" + action + "'");
    }
View Full Code Here

Examples of com.sun.java.util.jar.pack.ConstantPool.Index

        requiredEntries.add(getRefString(""))// uconditionally present
        visitRefs(VRM_PACKAGE, requiredEntries);
        ConstantPool.completeReferencesIn(requiredEntries, false);
        if (verbose > 1)
            Utils.log.fine("Sorting CP entries");
        Index   cpAllU = ConstantPool.makeIndex("unsorted", requiredEntries);
        Index[] byTagU = ConstantPool.partitionByTag(cpAllU);
        for (int i = 0; i < ConstantPool.TAGS_IN_ORDER.length; i++) {
            byte tag = ConstantPool.TAGS_IN_ORDER[i];
            // Work on all entries of a given kind.
            Index ix = byTagU[tag];
            if (ix == nullcontinue;
            ConstantPool.sort(ix);
            cp.initIndexByTag(tag, ix);
            byTagU[tag] = null// done with it
        }
        for (int i = 0; i < byTagU.length; i++) {
            assert(byTagU[i] == null)// all consumed
        }
        for (int i = 0; i < ConstantPool.TAGS_IN_ORDER.length; i++) {
            byte tag = ConstantPool.TAGS_IN_ORDER[i];
            Index ix = cp.getIndexByTag(tag);
            assert(ix.assertIsSorted());
            if (verbose > 2Utils.log.fine(ix.dumpString());
        }
    }
View Full Code Here

Examples of com.tinkerpop.blueprints.Index

        this.indices.put(index.getIndexName(), index);
        return index;
    }

    public <T extends Element> Index<T> getIndex(final String indexName, final Class<T> indexClass) {
        Index index = this.indices.get(indexName);
        if (null == index)
            return null;
        if (!indexClass.isAssignableFrom(index.getIndexClass()))
            throw ExceptionFactory.indexDoesNotSupportClass(indexName, indexClass);
        else
            return index;
    }
View Full Code Here

Examples of de.fhg.igd.mongomvcc.impl.internal.Index

   * @return the index. The index provides access to all objects from
   * the currently checked out branch/commit and stores information on
   * dirty objects.
   */
  public Index getIndex() {
    Index r = _index.get();
    if (r == null) {
      r = new Index(getHeadCommit(), _tree);
      _index.set(r);
    }
    return r;
  }
View Full Code Here

Examples of de.iritgo.aktera.persist.base.AbstractPersistentMetaData.Index

      Set indicies = pmd.getIndicies();

      for (Iterator ii = indicies.iterator(); ii.hasNext();)
      {
        Index index = (Index) ii.next();
        String oneIndexName = index.getIndexName();
        String dropIndex = null;

        try
        {
          dropIndex = constructIndexSQL(pmd, index, false);
          log.debug("Dropping index " + index.getIndexName() + " with sql syntax: " + dropIndex);
          stmt.executeUpdate(dropIndex);
        }
        catch (SQLException s)
        {
          log.error("Could not drop index " + oneIndexName + " on table " + pmd.getTableName() + ".");
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.index.Index

          if(factory.getInputTypeRestriction().isAssignableFromType(meta)) {
            @SuppressWarnings("unchecked")
            final IndexFactory<Object, ?> ofact = (IndexFactory<Object, ?>) factory;
            @SuppressWarnings("unchecked")
            final Relation<Object> orep = (Relation<Object>) relation;
            final Index index = ofact.instantiate(orep);
            addIndex(index);
            index.insertAll(ids);
          }
        }
      }

      // fire insertion event
View Full Code Here

Examples of de.torstennahm.integrate.sparse.index.Index

    boolean calc = false;
   
    for (int i = 0; i < GridVisualizer.GRIDSIZE; i++) {
      for (int j = 0; j < GridVisualizer.GRIDSIZE; j++) {
        if (dim0 != dim1 || i == j) {
          Index index = new FastIndex();
          index = index.set(dim0, i);
          index = index.set(dim1, j);
         
          int[] pixel = positionToPixel(new int[] {i, j});
         
          EvalData data;
          synchronized (valueMap) {
            data = valueMap.get(index);
          }
          if (data == null) {
            calc = true;
          } else {
            double contribution = data.contribution;
            if (! Double.isNaN(contribution)) {
              double b = 0.0;
              double integrate = Math.abs(contribution);
              int evals = evaluator.pointsForIndex(index);
             
              if (mode == 0) {
                b = 0.7 - 0.7 * MathTN.log10(integrate) / MathTN.log10(MathTN.FUDGE);
              } else if (mode == 1) {
                b = 0.4 + 0.1 * MathTN.log10(evals);
              } else if (mode == 2) {
                b = 0.7 - 0.7 * MathTN.log10(integrate / evals) / MathTN.log10(MathTN.FUDGE);
              }
             
              g.setColor(colorScale.getColor((b + colorOffset) * colorFactor));
              g.fillRect(pixel[0], pixel[1], boxSize, boxSize);
//              if (contribution > 0) {
//                g.setColor(Color.BLACK);
//                g.fillRect(pixel[0] + (boxSize * 3) / 8, pixel[1] + (boxSize * 3) / 8, boxSize / 4, boxSize / 4);
//              }
            }
          }
        }
      }
    }
   
    g.setColor(Color.RED);
   
    for (int i = 0; i < GridVisualizer.GRIDSIZE; i++) {
      for (int j = 0; j < GridVisualizer.GRIDSIZE; j++) {
        if (dim0 != dim1 || i == j) {
          Index index = new FastIndex();           
          index = index.set(dim0, i);
          index = index.set(dim1, j);
         
          int[] pixel = positionToPixel(new int[] {i, j});
         
          boolean borderX = false, borderY = false;
          boolean evaluated;
          synchronized (indicesEvaluated) {
             evaluated = isEvaluatedInTimeLimit(index, timeLimit);
             if (! evaluated) {
              if (isEvaluatedInTimeLimit(index.add(dim0, -1), timeLimit)) {
                borderX = true;
              }
             
              if (isEvaluatedInTimeLimit(index.add(dim1, -1), timeLimit)) {
                borderY = true;
              }
             }
          }
         
View Full Code Here

Examples of edu.luc.cs.laufer.cs313.occurences.Index

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {

    Index index = new DefaultIndexImpl();

    String in = "politics without without principle\npleasure without conscience";
    StreamTokenizer s = new StreamTokenizer(new StringReader(in));
    s.ordinaryChar('.');

    int token;
    while ((token = s.nextToken()) != StreamTokenizer.TT_EOF) {
      if (token == StreamTokenizer.TT_WORD) {
        index.add(s.sval, s.lineno());
      }
    }

    System.out.println(index);
  }
View Full Code Here

Examples of edu.stanford.nlp.util.Index

  public static FloatFactorTable getFloatFactorTable(float[][] weights, int[][] data, List<Index<CRFLabel>> labelIndices, int numClasses) {

    FloatFactorTable factorTable = null;

    for (int j = 0; j < labelIndices.size(); j++) {
      Index labelIndex = labelIndices.get(j);
      FloatFactorTable ft = new FloatFactorTable(numClasses, j + 1);
     
      // ...and each possible labeling for that clique
      for (int k = 0; k < labelIndex.size(); k++) {
        int[] label = ((CRFLabel) labelIndex.get(k)).getLabel();
        float weight = 0.0f;
        for (int m = 0; m < data[j].length; m++) {
          //System.err.println("**"+weights[data[j][m]][k]);     
          weight += weights[data[j][m]][k];
        }
View Full Code Here

Examples of fr.inra.lipm.jezlucene.action.Index

        }

        final String[] parameters = Arrays.copyOfRange(args, 1, args.length);
        final Main main = new Main();
        if (args[0].equalsIgnoreCase("index")) {
            final Index indexer = new Index();
            main.parseParameters(indexer, parameters);
            indexer.index();
        }
        else if (args[0].equalsIgnoreCase("search")) {
            final Search searcher = new Search();
            main.parseParameters(searcher, parameters);
            System.out.println(searcher.search());
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.