Java Array Hash Code deepHashCode(double[][] matrix)

Here you can find the source of deepHashCode(double[][] matrix)

Description

Computes hashCode of a given matrix

License

Open Source License

Parameter

Parameter Description
matrix the matrix

Return

the computed hash code

Declaration

public static int deepHashCode(double[][] matrix) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

public class Main {
    /**//from w  w  w. j  a va  2  s. com
     * Computes hashCode of a given matrix
     * @param matrix the matrix
     * @return the computed hash code
     */
    public static int deepHashCode(double[][] matrix) {
        int retVal = 0;
        for (int i = 0; i < matrix.length; i++) {
            retVal += Arrays.hashCode(matrix[i]);
        }
        return retVal;
    }
}

Related

  1. arrayHashCode(Object[] arr)
  2. arrayHashCode(Object[] objects)
  3. byteArrayHashCode(final byte[] array)
  4. calculateHash(byte[] data)
  5. deepHash(Object[] t)
  6. hashCode(byte[] bytes)
  7. hashCode(byte[] obj)
  8. hashCode(final Object[] array1)
  9. hashCode(Map a)