Here you can find the source of hash(int state1, int state2, int numStates1)
public static int hash(int state1, int state2, int numStates1)
//package com.java2s; //License from project: Open Source License public class Main { public static int hash(int state1, int state2, int numStates1) { return state1 + numStates1 * state2; }/*www .j av a 2 s. c o m*/ public static int hash(int state1, int state2, int state3, int numStates1, int numStates2) { return state1 + numStates1 * (state2 + numStates2 * state3); } public static int hash(int state1, int state2, int state3, int state4, int numStates1, int numStates2, int numStates3) { return state1 + numStates1 * (state2 + numStates2 * (state3 + numStates3 * state4)); } }