字符串转值

@param nums     多个数字
@param sperator 分隔符
@return int[]
191999
public static int[] parseInts(String nums, String sperator) {
        String[] ss = StringUtils.split(nums, sperator);
        int[] ints = new int[ss.length];
        for (int i = 0; i < ss.length; i++) {
            ints[i] = Integer.parseInt(ss[i]);
        }
        return ints;
    }
693919
public static String[] stringToStringArray(final String instr, final String delim) throws NoSuchElementException, NumberFormatException {
        final StringTokenizer toker = new StringTokenizer(instr, delim);
        final String stringArray[] = new String[toker.countTokens()];
        int i = 0;
        while (toker.hasMoreTokens()) {
            stringArray[i++] = toker.nextToken();
        }
        return stringArray;
    }
539359
public static IElectronContainer[] getElectronContainerArray(IAtomContainer container) {
        IElectronContainer[] ret = new IElectronContainer[container.getElectronContainerCount()];
        for (int i = 0; i < ret.length; ++i)
            ret[i] = container.getElectronContainer(i);
        return ret;
    }
906512
public int[] asArray() {
	    int arr[] = new int[size()];
	    OrdinalIterator iter = iterator();
	    
	    int ordinal = iter.nextOrdinal();
	    int i = 0;

	    while(ordinal != NO_MORE_ORDINALS) {
	        arr[i++] = ordinal;
	        ordinal = iter.nextOrdinal();
	    }
	    
	    return arr;
	}
1311901
public E[] asArray(IntFunction<E[]> arrayFactory) {
        long size = count();
        if (size >= Nodes.MAX_ARRAY_SIZE)
            throw new IllegalArgumentException(Nodes.BAD_SIZE);
        E[] result = arrayFactory.apply((int) size);
        copyInto(result, 0);
        return result;
    }
178997
public static int[] sequence(int start, int end) {
    if(start >= end) {
      return EMPTY_INTS;
    }
    int[] ret = new int[end - start];
    for(int j = 0; start < end; start++, j++) {
      ret[j] = start;
    }
    return ret;
  }
1017774
public static <T> List<T> collect(Iterator<T> iterator) {
        List<T> list = new ArrayList<T>();
        while (iterator.hasNext()) {
            list.add(iterator.next());
        }
        return list;
    }
1064454
public int[] getTenors() {
		Set<Integer> setTenors	= new HashSet<>();

		for(int moneyness : getGridNodesPerMoneyness().keySet()) {
			setTenors.addAll(Arrays.asList((IntStream.of(keyMap.get(moneyness)[1]).boxed().toArray(Integer[]::new))));
		}
		return setTenors.stream().sorted().mapToInt(Integer::intValue).toArray();
	}
116885
public INDArray[] output(MultiDataSetIterator iterator){
        List<INDArray[]> outputs = new ArrayList<>();
        while(iterator.hasNext()){
            MultiDataSet next = iterator.next();
            INDArray[] out = output(false, next.getFeatures(), next.getFeaturesMaskArrays(), next.getLabelsMaskArrays());
            outputs.add(out);
        }
        INDArray[][] arr = outputs.toArray(new INDArray[outputs.size()][0]);
        return DataSetUtil.mergeFeatures(arr, null).getFirst();
    }
1277853
public int num2index(double value, double[] cuts) {
    int count = 0;
    while ((count < cuts.length) && (cuts[count] <= value)) {
      count++;
    }
    return count;
  }
68799
public long numParams() {
        int ret = 0;
        for (Map.Entry<String, INDArray> entry : params.entrySet()) {
            ret += entry.getValue().length();
        }
        return ret;
    }
826431
@Override
    public DataSet next(int num) {
        if (!hasNext()) {
            throw new NoSuchElementException("No next element");
        }
        DataSet next;
        batch++;
        iterationsCounter.incrementAndGet();
        if (iter == null) {
            // return full DataSet
            if (num == -1) {
                next = ds;
                if (epochs < numEpochs)
                    trackEpochs();
            }
            // return DataSet broken into batches
            else {
                if (batchedDS.isEmpty() && num > 0)
                    batchedDS = ds.batchBy(num);
                next = batchedDS.get(batch);
                if (batch + 1 == batchedDS.size()) {
                    trackEpochs();
                    if (epochs < numEpochs)
                        batch = -1;
                }
            }
        } else {
            next = (num == -1 ? iter.next() : iter.next(num));
            if (next == null) {
                throw new IllegalStateException("Iterator returned null DataSet");
            }
            if (!iter.hasNext()) {
                trackEpochs();
                // track number of epochs and won't reset if it's over
                if (epochs < numEpochs) {
                    iter.reset();
                    lastBatch = batch;
                    batch = 0;
                }
            }
        }
        if (preProcessor != null)
            preProcessor.preProcess(next);
        return next;
    }
893906
Vector getCounters(ElemNumber numberElem)
  {

    Vector counters = (Vector) this.get(numberElem);

    return (null == counters) ? putElemNumber(numberElem) : counters;
  }
91247
List<Iterator<BlockInfo>> getBlocksIterarors(int numShards) {
    List<Iterator<BlockInfo>> iterators = new ArrayList<Iterator<BlockInfo>>();
    if (numShards <= 0) {
      throw new IllegalArgumentException("Number of shards must be greater than 0");
    }
    for (int i = 0; i < numShards; i++) {
      Iterator<BlockInfo> iterator = blocks.shardIterator(i, numShards);
      if (iterator != null) {
        iterators.add(iterator);
      }
    }   
    return iterators;
  }
1190146
public static int numPoints(INDArrayIndex... indexes) {
        int ret = 0;
        for (int i = 0; i < indexes.length; i++)
            if (indexes[i] instanceof PointIndex)
                ret++;
        return ret;
    }
255305
@Override
    public Double[] getMultipliers() {
        Double[] returnArray = new Double[this.atomContainerCount];
        System.arraycopy(this.multipliers, 0, returnArray, 0, this.atomContainerCount);
        return returnArray;
    }
49422
public static <T> T[] toArray(Iterator<T> iterator, Class<T> componentType) {
		return toArray(CollectionUtil.newArrayList(iterator), componentType);
	}