###前提・実現したいこと
このプログラムの
node.next = this.next;
この部分は必要ですか?同じことをしているように思えます。
そもそも何と何を比較しているのですか?
nodeとnode.nextの比較ではないのですか?
追記
this, this.nextを
this, node, next.node(this.next)にする
nodeを挿入する、という理解で良いのでしょうか?
###発生している問題・エラーメッセージ
エラーメッセージ
###該当のソースコード
java
1 public void insert(ev_list node){ 2 //ヒューリスティック関数の値が次のノードの値より大きい、 3 //または次のノードが先端のとき挿入 4 if(this.next == null || this.next.eleme.evaluation + this.next.elem.floor < node.elem.evaluation + node.elem.floor){ 5 node.next = this.next; 6 this.next = node; 7 }else this.next.insert(node); 8 } 9 10st = new field(cell,hashkey(cell) ); 11ev_list list = new ev_list(); 12list.insert(new ev_list(st) ); 13
###試したこと
this, this.nextを
this, node, next.node(this.next)にする
nodeを挿入する、という理解で良いのでしょうか?
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/13 04:02