Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update(TNode newParent, IOperator creator, Problem p){
- double newCost = newParent.cost + p.Cost( newParent.state, creator );
- if( newCost < this.cost ){
- this.parent = newParent;
- this.cost = newCost;
- this.creator = creator;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement