Example usage for org.apache.commons.math3.util MathUtils hash

List of usage examples for org.apache.commons.math3.util MathUtils hash

Introduction

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

Prototype

public static int hash(double[] value) 

Source Link

Document

Returns an integer hash code representing the given double array.

Usage

From source file:org.apereo.portal.events.aggr.stat.JpaStatisticalSummary.java

/**
 * Returns hash code based on values of statistics
 * @return hash code//from  w  w w.  jav a 2  s  .c o  m
 */
@Override
public int hashCode() {
    int result = 31 + MathUtils.hash(getGeometricMean());
    result = result * 31 + MathUtils.hash(getGeometricMean());
    result = result * 31 + MathUtils.hash(getMax());
    result = result * 31 + MathUtils.hash(getMean());
    result = result * 31 + MathUtils.hash(getMin());
    result = result * 31 + MathUtils.hash(getN());
    result = result * 31 + MathUtils.hash(getSum());
    result = result * 31 + MathUtils.hash(getSumsq());
    result = result * 31 + MathUtils.hash(getVariance());
    return result;
}

From source file:org.matheclipse.commons.parser.client.eval.ComplexNode.java

@Override
public int hashCode() {
    long rbits = MathUtils.hash(value.getReal());
    long ibits = MathUtils.hash(value.getImaginary());
    return (int) (rbits ^ (ibits >>> 32));
}

From source file:org.matheclipse.commons.parser.client.eval.DoubleNode.java

@Override
public int hashCode() {
    return MathUtils.hash(value);// Double.doubleToLongBits(value);
    // return (int)(bits ^ (bits >>> 32));
}