protected void Initialize() { this.front = new VertexCollection(); this.front.AddRange(this.goals); this.newFront = new VertexCollection(); this.probs = new VertexDoublesDictionary(); this.costs = new VertexDoublesDictionary(); IVertexEnumerator enumerator = this.TestGraph.Graph.get_Vertices().GetEnumerator(); while (enumerator.MoveNext()) { IVertex vertex = enumerator.get_Current(); DoubleCollection doubles = new DoubleCollection(); if (this.Goals.Contains(vertex)) { doubles.Add(0.0); } else { doubles.Add(1.0); } this.probs.Add(vertex, doubles); doubles = new DoubleCollection(); doubles.Add(0.0); this.costs.Add(vertex, doubles); } IVertexEnumerator enumerator2 = this.TestGraph.States.GetEnumerator(); while (enumerator2.MoveNext()) { IVertex v = enumerator2.get_Current(); this.Strategy.SetChooseEdge(v, 0, null); } }
protected void Initialize() { this.front = new VertexCollection(); this.front.AddRange(this.goals); this.newFront = new VertexCollection(); this.probs = new VertexDoublesDictionary(); this.costs = new VertexDoublesDictionary(); foreach(IVertex v in this.TestGraph.Graph.Vertices) { // setting probs DoubleCollection col =new DoubleCollection(); if (this.Goals.Contains(v)) { col.Add(0); } else { col.Add(1); } this.probs.Add(v,col); // setting costs col = new DoubleCollection(); col.Add(0); this.costs.Add(v,col); } foreach(IVertex v in this.TestGraph.States) { this.Strategy.SetChooseEdge(v,0,null); } }