class LogLog implements IRichCardinality {

    @Override
    public IRichCardinality merge(IRichCardinality... estimators) throws LogLogMergeException
    {
        if (estimators == null)
        {
            return new LogLog(M);
        }
        
        byte[] mergedBytes = Arrays.copyOf(this.M, this.M.length);
        for (IRichCardinality estimator : estimators)
        {
            if (!(this.getClass().isInstance(estimator)))
            {
                throw new LogLogMergeException("Cannot merge estimators of different class");
            }
            if (estimator.sizeof() != this.sizeof())
            {
                throw new LogLogMergeException("Cannot merge estimators of different sizes");
            }
            LogLog ll = (LogLog) estimator;
            for (int i = 0; i < mergedBytes.length; ++i)
            {
                mergedBytes[i] = (byte) Math.max(mergedBytes[i], ll.M[i]);
            }
        }

        return new LogLog(mergedBytes);
    }

    public  LogLog(int k);
    public  LogLog(byte[] M);

}