class TEWMA {

    protected int[] indexes(Object o) {
        int[] indexes = new int[nhash];
        byte[] msgDigest = toSHA1(o);
        int numBytes = shash/8;
        
        int k = 0;
        for (int i=0; i<nhash; i++) {
            byte[] bytes = new byte[numBytes];
            for (int j=numBytes-1; j>=0; j--, k++) {
                if (k >= msgDigest.length) {
                    msgDigest = toSHA1(msgDigest);
                    k = 0;
                }
                
                bytes[j] = msgDigest[k];
            }
            
            String hex = bytesToHex(bytes);
            indexes[i] = Integer.parseInt(hex, 16);
        }
        
        return indexes;
    }

    public  TEWMA(int nhash, int shash, double beta, double w);

}