I have a contiguous ordered data structure (0 based index):
x= [1/3, 1/3, 1/3]
Let's say I selected index 1 and increased the probability by 1/3. Rest of the probabilities each decrease by 1/6 and the total probability remains P = 1.
x= [1/6, 2/3, 1/6]
Let's say I selected index 2 and increased the probability by 1/3. Rest of the probabilities in total need to decrease by 1/3 to make the total probability remain P= 1.
x= [1/10, 2/5, 1/2]
Is there a name for this kind of data structure? I'd like to research that name and use a library instead of my custom rolled code if possible.