internal static double[] GetExpectations(Graph graph,/*int[] sources,*/ HSet targets, int nStates) { double[] ret = ValueIteration(graph, targets, nStates); //ValueIteration(graph,sources,targets,nStates); if(ret==null) return graph.GetDistancesToAcceptingStates(targets.ToArray(typeof(int))as int[]); //return graph.GetDistancesToAcceptingStates(sources,targets.ToArray(typeof(int))as int[]); else return ret; }
static internal double [] GetExpectations(Graph graph, /*int[] sources,*/ HSet targets, int nStates) { double[] ret = ValueIteration(graph, targets, nStates); //ValueIteration(graph,sources,targets,nStates); if (ret == null) { return(graph.GetDistancesToAcceptingStates(targets.ToArray(typeof(int)) as int[])); } //return graph.GetDistancesToAcceptingStates(sources,targets.ToArray(typeof(int))as int[]); else { return(ret); } }