I am using the boost/random.hpp to fill a std::map with random numbers on the interval [1,3] and have kind of thrown together something that will give me the % of each count in relation to the total amount of generated numbers but was looking for a maybe a more efficient way of doing it. I have been trying to find something in the boost library but am having trouble finding something completely relevant; is there something in boost that can use my map (I don't want to change my map types) and calculate the %'s or anything else I should consider?

```
int main()
 {
    std::map <int, long> results;
    int current;
    long one = 0;
    long two = 0;
    long three = 0;
    long total = 0;

    boost::random::mt19937 rng;
    rng.seed(static_cast<boost::uint32_t> (std::time(0)));
    boost::random::uniform_int_distribution<int> random(1,3);

    for (int n = 0; n < 1000000; ++n)
    {
        current = random(rng);
        ++total;

        switch (current)
        {
            case 1:
                ++one;
                break;
            case 2:
                ++two;
                break;
            case 3:
                ++three;
                break;
        }
    }

    results[1] = one;
    results[2] = two;
    results[3] = three;

    std::cout << (double) results[1]/total*100 << std::endl; // etc.
}

```

edit: I don't want to change the map container in any way.