別のクラスからデータ構造を呼び出したいのですが、ここで問題が見つかりました。助けてもらえますか?
ここにソースコード
クラス SimBetWithFairRouting のデータ構造
public Map<DTNHost, ArrayList<Double>> neighborsHistory;
そして、クラス NeighbourhoodSimilarity からこのメソッドでそれを呼び出します
private double countDirectSimilarity(double[][] matrixEgoNetwork, int index) {
double sim=0;
for (int i = 0; i < matrixEgoNetwork.length; i++) {
//here the problem
if (matrixEgoNetwork[i][0]==this.countAggrIntStrength(*i will call it in here*) && matrixEgoNetwork[i][index]==1) {
sim++;
}
}
return sim;
}
マップを静的な形式に変更せずにこれを機能させる方法はありますか? 手がかり : SimBetWithFairRouting クラスにレプリケート メソッドがありました。