Example usage for org.apache.commons.math3.util OpenIntToDoubleHashMap OpenIntToDoubleHashMap

List of usage examples for org.apache.commons.math3.util OpenIntToDoubleHashMap OpenIntToDoubleHashMap

Introduction

In this page you can find the example usage for org.apache.commons.math3.util OpenIntToDoubleHashMap OpenIntToDoubleHashMap.

Prototype

public OpenIntToDoubleHashMap(final int expectedSize, final double missingEntries) 

Source Link

Document

Build an empty map with specified size.

Usage

From source file:com.cloudera.oryx.common.math.OpenMapRealVector.java

/**
 * Build a vector with known the sparseness and zero tolerance
 * setting (for advanced use only).// w w w .j a  v a 2s.  c o  m
 *
 * @param dimension Size of the vector.
 * @param expectedSize Expected number of non-zero entries.
 * @param epsilon Tolerance below which a value is considered zero.
 */
public OpenMapRealVector(int dimension, int expectedSize, double epsilon) {
    virtualSize = dimension;
    entries = new OpenIntToDoubleHashMap(expectedSize, 0.0);
    this.epsilon = epsilon;
}