Lotto-Totostrategen
meine Freeware - Druckversion

+- Lotto-Totostrategen (https://Lotto-Totostrategen.de)
+-- Forum: Gaggas Software für Lotto, Toto, KENO... (https://Lotto-Totostrategen.de/forumdisplay.php?fid=1096)
+--- Forum: freeware (https://Lotto-Totostrategen.de/forumdisplay.php?fid=922)
+--- Thema: meine Freeware (/showthread.php?tid=28934)



meine Freeware - nobbot - 27.05.2025

die Zahlenhäufigkeiten werden wie folgt berechnet:
Code:
if (LOTTO==_nGameType || LOTTO_SYSTEM==_nGameType)
    {
        for (unsigned int i=0; i < m_vLotto.size(); i++)
        {
            for (unsigned int zahl=0; zahl < LOTTO_KUGELN; zahl++)
            {
                count++;
                ++zahlen_idx[m_vLotto[i].Lottozahlen[zahl]];
            }
        }
    }
und damit werden die am wenigsten vorkommende Zahlen berechnet:
Code:
else if (FALSE==_bMaxCount)
    {
        for (unsigned int zahl=0; zahl < m_nNumberOfLotteryNumbers; zahl++)
        {
            unsigned int min_wert=UINT_MAX;
            unsigned int min_zahl=0;

            for (std::map<unsigned int,unsigned int>::iterator it=zahlen_idx.begin(); it!=zahlen_idx.end(); ++it)
            {
                if ((*it).second < min_wert)
                {
                    min_zahl=(*it).first;
                    min_wert=(*it).second;
                }
                count++;
            }
            zahlen.push_back(min_zahl);

            TRACE("Zahl: %d Wert: %d\n", min_zahl, min_wert);

            zahlen_idx[min_zahl]=UINT_MAX;
        }
    }