Exemple #1
0
    /**
     * Convert the model into a binary-searchable model for fast lookups.
     * Running this will allow Transitions.
     */
    public void Prepare()
    {
        if (validated)
        {
            throw new Exception("Model has already been prepared.");
        }

        for (int i = 0; i < STATE_COUNT; i++)
        {
            WeightedRandom.MakeWeightArraySearchable(binarySearchPModel[i]);
        }

        validated = true;
    }