All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.sketches.hive.quantiles.Util Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
/*
 * Copyright 2016, Yahoo! Inc.
 * Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms.
 */

package com.yahoo.sketches.hive.quantiles;

import java.util.ArrayList;
import java.util.List;

final class Util {

  static double[] objectsToPrimitives(final Double[] array) {
    final double[] result = new double[array.length];
    for (int i = 0; i < array.length; i++) {
      result[i] = array[i];
    }
    return result;
  }

  static List primitivesToList(final double[] array) {
    final List result = new ArrayList(array.length);
    for (double item: array) { result.add(item); }
    return result;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy