//Many-to-many
 public void SetProbability(List <T> keyFromStates, List <T> keyToStates, ProbabilityFunctions.ProbabilityFunction probabilityFunction, float[] parameters = null, bool normalize = true)
 {
     foreach (T keyFromState in keyFromStates)
     {
         SetProbability(keyFromState, keyToStates, probabilityFunction, parameters, normalize);
     }
 }
    //One-to-many
    public void SetProbability(T keyFromState, List <T> keyToStates, ProbabilityFunctions.ProbabilityFunction probabilityFunction, float[] parameters = null, bool normalize = true)
    {
        //float t = 0;
        //float step = 1.0f / (keyToStates.Count - 1);
        int id = 0;

        foreach (T keyToState in keyToStates)
        {
            SetProbability(keyFromState, keyToState, probabilityFunction(id, keyToStates.Count, parameters), false);
            //t += step;
            id++;
        }

        if (normalize)
        {
            NormalizeProbabilities(keyFromState);
        }
    }
 //One-to-all
 public void SetProbability(T keyFromState, ProbabilityFunctions.ProbabilityFunction probabilityFunction, float[] parameters = null, bool normalize = true)
 {
     SetProbability(keyFromState, new List <T>(map[keyFromState].Keys), probabilityFunction, parameters, normalize);
 }
 //All-to-all
 public void SetProbability(ProbabilityFunctions.ProbabilityFunction probabilityFunction, float[] parameters = null, bool normalize = true)
 {
     SetProbability(new List <T>(map.Keys), probabilityFunction, parameters, normalize);
 }