JavaScript
1class Genom{ 2 constructor(genomList,evaluation){ 3 this.genomList = genomList; 4 this.evaluation = evaluation; 5 } 6 7 get getGenom(){ 8 return this.genomList; 9 } 10 get getEvaluation(){ 11 return this.evaluation; 12 } 13 set setGenom(genomList){ 14 this.genomList = genomList; 15 } 16 set setEvaluation(evaluation){ 17 this.evaluation = evaluation; 18 } 19}
JavaScript
1for(i = 0;i < MAX_GENOM_LIST;i++){ 2 group[i].setEvaluation(1); 3}
私は現在JavaScriptで遺伝的アルゴリズムのプログラムを制作しています。
上のように定義されたクラスのメソッドを呼び出したいのですが、
setEvaluation is not a function と出てしまいます。
何を間違えているのでしょうか?
作成しているプログラムのURL
https://public-darjeeling.github.io/GenerationAlgorithm.html
参考にしたサイト
https://qiita.com/Azunyan1111/items/975c67129d99de33dc21
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。