int QccVectorGetSymbolProbs(const int *symbol_list, int symbol_list_length, QccVector probs, int num_symbols);
More specifically, symbol_list is the list of symbol values, symbol_list_length is the length of the symbol list, probs is the list of probabilities returned, and num_symbols is the length of the probability list (one probability for each possible symbol). Each symbol in symbol_list must be an int in the range of 0 to num_symbols - 1. Suppose that symbol is a symbol in the range 0 to num_symbols - 1; QccVectorGetSymbolProbs() counts the number of occurrences of symbol in symbol_list. The probability of symbol, which is returned in probs[symbol] is calculated as count(symbol) / symbol_list_length.
The returned list of probabilities, probs, is a valid probability density it that in sums to 1.0.