Accord.Statistics.Models.Markov.Topology.Custom.Create C# (CSharp) Method

Create() public method

Creates the state transitions matrix and the initial state probabilities for this topology.
public Create ( bool logarithm, double &transitionMatrix, double &initialState ) : int
logarithm bool
transitionMatrix double
initialState double
return int
        public int Create(bool logarithm, out double[,] transitionMatrix, out double[] initialState)
        {
            if (logarithm)
            {
                transitionMatrix = Elementwise.Log(A);
                initialState = Elementwise.Log(pi);
            }
            else
            {
                transitionMatrix = (double[,])A.Clone();
                initialState = (double[])pi.Clone();
            }

            return states;
        }