質問編集履歴

2

タイトルを修正しました

2016/09/13 10:22

投稿

randmaster
randmaster

スコア31

test CHANGED
@@ -1 +1 @@
1
- 山登り法とうアルゴリズムプログラムについてです.教えてください
1
+ stepメソッドが何をしてか分かりません
test CHANGED
File without changes

1

PointクラスとHillClimbingクラスを編集しました

2016/09/13 10:22

投稿

randmaster
randmaster

スコア31

test CHANGED
File without changes
test CHANGED
@@ -184,9 +184,9 @@
184
184
 
185
185
 
186
186
 
187
- double x = rnd.nextDouble();
187
+ double x = rnd.nextDouble() * rnd.nextInt(100);
188
-
188
+
189
- double y = rnd.nextDouble();
189
+ double y = rnd.nextDouble() * rnd.nextInt(100);
190
190
 
191
191
 
192
192
 
@@ -518,6 +518,16 @@
518
518
 
519
519
 
520
520
 
521
+ @Override
522
+
523
+ public String toString() {
524
+
525
+ return "Point [x=" + x + ", y=" + y + "]";
526
+
527
+ }
528
+
529
+
530
+
521
531
  }
522
532
 
523
533
  ```