Examples of forEach()


Examples of com.android.dx.cf.code.BytecodeArray.forEach()

        length -= codeLength;
        BytecodeArray code =
            new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength),
                              pool);
        if (observer != null) {
            code.forEach(new CodeObserver(code.getBytes(), observer));
        }

        // u2 exception_table_length
        int exceptionTableLength = bytes.getUnsignedShort(offset);
        ByteCatchList catches = (exceptionTableLength == 0) ?
View Full Code Here

Examples of com.carrotsearch.hppc.CharIntOpenHashMap.forEach()

            counts.putOrAdd(CHARS[i], 1, 1);
        }
        // [[[end:character-counting]]]

        final TotalCounter counter = new TotalCounter();
        counts.forEach(counter);
        Assert.assertEquals(counter.total, DATA.length);
    }

    @Test
    @Ignore
View Full Code Here

Examples of com.carrotsearch.hppc.IntArrayDeque.forEach()

        // Deques also support iteration through [type]Procedure interfaces.
        // The apply() method will be called once for each element in the deque.
       
        // Iteration from head to tail
        deque.forEach(new IntProcedure()
        {
            public void apply(int value)
            {
                System.out.println(value);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.IntArrayList.forEach()

        // [[[start:iteration-lists-using-procedures]]]
        final IntArrayList list = prepare(10);

        // Lists also support iteration through [type]Procedure interfaces.
        // The apply() method will be called once for each element in the list.
        list.forEach(new IntProcedure()
        {
            public void apply(int value)
            {
                System.out.println(value);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.IntCharOpenHashMap.forEach()

        // Maps also support iteration through [keyType][valueType]Procedure interfaces.
        // The apply() method will be called once for each key/value pair in the map.
       
        // Iteration from head to tail
        map.forEach(new IntCharProcedure()
        {
            public void apply(int key, char value)
            {
                System.out.println(key + " -> " + value);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.IntIntOpenHashMap.forEach()

        final IntIntOpenHashMap map = new IntIntOpenHashMap();
        map.put(1, 2);
        map.put(2, 5);
        map.put(3, 10);

        int count = map.forEach(new IntIntProcedure()
        {
           int count;
           public void apply(int key, int value)
           {
               if (value >= 5) count++;
View Full Code Here

Examples of com.carrotsearch.hppc.IntOpenHashSet.forEach()

        // Sets also support iteration through [type]Procedure interfaces.
        // The apply() method will be called once for each element in the set.
       
        // Iteration from head to tail
        set.forEach(new IntProcedure()
        {
            public void apply(int value)
            {
                System.out.println(value);
            }
View Full Code Here

Examples of com.fasterxml.jackson.databind.node.ArrayNode.forEach()

        try {
            List<ODocument> docs = DocumentService.getDocuments(collection, params);

            String s = JSONFormats.prepareDocToJson(docs, JSONFormats.Formats.DOCUMENT_PUBLIC);
            ArrayNode lst = (ArrayNode)Json.mapper().readTree(s);
            lst.forEach((j)->((ObjectNode)j).remove(TO_REMOVE).remove("@rid"));
            return lst;
        } catch (SqlInjectionException | IOException e) {
            throw new CommandExecutionException(command,"error executing command: "+e.getMessage(),e);
        } catch (InvalidCollectionException e) {
            throw new CommandExecutionException(command,"invalid collection: "+collection,e);
View Full Code Here

Examples of com.github.neuralnetworks.tensor.Tensor.forEach()

  RBM firstRBM = dbn.getFirstNeuralNetwork();

  Tensor t = firstRBM.getMainConnections().getWeights();
  float[] e1 = t.getElements();
  t.forEach(i -> e1[i] = 0.2f);
 
  t = firstRBM.getVisibleBiasConnections().getWeights();
  float[] e2 = t.getElements();
  t.forEach(i -> e2[i] = 0.1f);
View Full Code Here

Examples of com.github.neuralnetworks.tensor.Tensor.forEach()

  float[] e1 = t.getElements();
  t.forEach(i -> e1[i] = 0.2f);
 
  t = firstRBM.getVisibleBiasConnections().getWeights();
  float[] e2 = t.getElements();
  t.forEach(i -> e2[i] = 0.1f);

  t = firstRBM.getHiddenBiasConnections().getWeights();
  float[] e3 = t.getElements();
  t.forEach(i -> e3[i] = 0.3f);
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.