Skip to content

Commit

Permalink
Fixed #16 and fixed #17
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezsieira committed Mar 31, 2013
1 parent a47697a commit ecbd954
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import es.usc.citius.lab.hipster.node.ComparableNode;
import es.usc.citius.lab.hipster.node.NodeBuilder;
import es.usc.citius.lab.hipster.node.Transition;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;

/**
Expand All @@ -35,13 +37,17 @@ public class ADStarIterator<S> implements Iterator<ComparableNode<S>> {
private Double epsilon = 1.0;

public ADStarIterator(S begin, S goal, TransitionFunction<S> predecessors, TransitionFunction<S> successors, CostFunction<S, Double> costFunction, HeuristicFunction<S, Double> heuristic, NodeBuilder<S, ADStarNode<S>> builder) {
this.beginNode = this.nodeBuilder.node(null, new Transition<S>(null, begin));
this.goalNode = this.nodeBuilder.node(null, new Transition<S>(null, goal));
this.nodeBuilder = builder;
this.predecessorFunction = predecessors;
this.successorFunction = successors;
this.costFunction = costFunction;
this.heuristicFunction = heuristic;
this.nodeBuilder = builder;
this.open = new HashMap<S, ADStarNode<S>>();
this.closed = new HashMap<S, ADStarNode<S>>();
this.incons = new HashMap<S, ADStarNode<S>>();
this.queue = new PriorityQueue<ADStarNode<S>>();
this.beginNode = this.nodeBuilder.node(null, new Transition<S>(null, begin));
this.goalNode = this.nodeBuilder.node(null, new Transition<S>(null, goal));

/*Initialization step*/
this.beginNode.setG(0);
Expand Down

0 comments on commit ecbd954

Please sign in to comment.