Examples of toArray()


Examples of gnu.trove.list.array.TIntArrayList.toArray()

            for (int j = 0; j < n; j++) {
                if (matrix[i][j]) {
          values.add(j);
                }
            }
      succ[i] = VF.enumerated("succ_"+i,values.toArray(),solver);
        }
        solver.post(ICF.circuit(succ,0));
    }

    @Override
View Full Code Here

Examples of gnu.trove.list.array.TLongArrayList.toArray()

        }
        finally
        {
            if(reader != null) reader.close();
        }
        return tmp.toArray();
    }
   
    /**
     * Batch mode nearest neighbor search for a list of ids contained in a text file from an index directory
     * @param args
View Full Code Here

Examples of gnu.trove.set.TIntSet.toArray()

            }
            if (count == max)
                ties.add(clazz);
        }

        int[] options = ties.toArray(new int[ties.size()]);
        return (options.length == 1)
            ? options[0]
            : options[RANDOM.nextInt(options.length)];
    }
View Full Code Here

Examples of gnu.trove.set.hash.TIntHashSet.toArray()

            }
            if (count == max)
                ties.add(clazz);
        }

        int[] options = ties.toArray(new int[ties.size()]);
        return (options.length == 1)
            ? options[0]
            : options[RANDOM.nextInt(options.length)];
    }
View Full Code Here

Examples of gnu.trove.set.hash.TLongHashSet.toArray()

        if(maxPermutations != positions.length) throw(new InvalidIndexException(reader.rootDir, "Found invalid number of permutations: " + positions.length+ " for input id: " + id));
        for(int i = 0; i < numPermutations; i++)
        {
            getNeighbors(positions[i], beamRadius, permutationLists[i], sims);
        }       
        return sims.toArray();
    }
   
    /**
     * Helper method for getSimilars(long id, int beamRadius, int numPermutations).
     * @param pos
View Full Code Here

Examples of gnu.trove.stack.TIntStack.toArray()

        TIntStack stack = new TIntArrayStack(10, no_entry_value);
        assertEquals( no_entry_value, stack.getNoEntryValue() );

        int[] array;

        array = stack.toArray();
        assertNotNull( array );
        assertEquals( 0, array.length );

        stack.push( 10 );
        stack.push( 20 );
View Full Code Here

Examples of groovy.lang.Tuple.toArray()

  private static Object[] unwrapArgs(Object arguments) {
    if (arguments == null) {
      return MetaClassHelper.EMPTY_ARRAY;
    } else if (arguments instanceof Tuple) {
      Tuple tuple = (Tuple) arguments;
      return tuple.toArray();
    } else if (arguments instanceof Object[]) {
      return (Object[])arguments;
    } else {
      return new Object[]{arguments};
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.doubles.DoubleArrayList.toArray()

          }
        }
      }
    }
    final VolatilitySurfaceData<Double, Double> stdVolSurface = new VolatilitySurfaceData<Double, Double>(rawSurface.getDefinitionName(), rawSurface.getSpecificationName(), rawSurface.getTarget(),
        tList.toArray(new Double[0]), kList.toArray(new Double[0]), volValues);

    // 4. Return
    final ValueProperties stdVolProperties = createValueProperties()
        .with(ValuePropertyNames.SURFACE, surfaceName)
        .with(InstrumentTypeProperties.PROPERTY_SURFACE_INSTRUMENT_TYPE, InstrumentTypeProperties.COMMODITY_FUTURE_OPTION)
View Full Code Here

Examples of jade.util.leap.ArrayList.toArray()

    Iterator it = ca.getAllArguments();
    ArrayList listArg = new ArrayList();
    while (it.hasNext()) {
      listArg.add(it.next());
    }
    final Object[] args = listArg.toArray();
    final JADEPrincipal owner = ca.getOwner();
    final Credentials initialCredentials = ca.getInitialCredentials();

    // Do the job in a separated thread to avoid deadlock
    Thread auxThread = new Thread() {
View Full Code Here

Examples of jade.util.leap.List.toArray()

  }
 
  private void removeAllMTPs(ContainerID cid) {
    try {
      List l = containers.getMTPs(cid);
      Object[] objs = l.toArray();
      for(int i = 0; i < objs.length; i++) {
        MTPDescriptor mtp = (MTPDescriptor)objs[i];
       
        GenericCommand gCmd = new GenericCommand(jade.core.messaging.MessagingSlice.DEAD_MTP, jade.core.messaging.MessagingSlice.NAME, null);
        gCmd.addParam(mtp);
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.