Package com.dsi.parallax.ml.vector

Examples of com.dsi.parallax.ml.vector.LinearVector.resetValue()


    long before = usedMem();
    LinearVector vector = type.getVector(dimension);
    // loadFactor is the % of dimensions that are non-0
    for (int start = 0; start < dimension; start += stepSize) {
      vector.resetValue(start, 1.);
    }
    return usedMem() - before;
  }

  public static long insertTime(VectorType type, int dimension, int stepSize) {
View Full Code Here


    LinearVector vector = type.getVector(dimension);
    long before = System.currentTimeMillis();
    // loadFactor is the % of dimensions that are non-0

    for (int start = 0; start < dimension; start += stepSize) {
      vector.resetValue(start, 1.);
    }
    return System.currentTimeMillis() - before;
  }

  private static long usedMem() {
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.