Package com.dsi.parallax.ml.vector

Examples of com.dsi.parallax.ml.vector.LinearVector


 
  public static long memoryFootprint(VectorType type, int dimension,
      int stepSize) {

    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;
  }
View Full Code Here


    return usedMem() - before;
  }

  public static long insertTime(VectorType type, int dimension, int stepSize) {

    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;
  }
View Full Code Here

TOP

Related Classes of com.dsi.parallax.ml.vector.LinearVector

Copyright © 2018 www.massapicom. 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.