I want to call data structure from another classes but i find a problem here, can you help me?
here the source code
The data structure from class SimBetWithFairRouting
public Map<DTNHost, ArrayList<Double>> neighborsHistory;
and i will call it in this method from class 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;
}
any way i can make this work without changing the map into static form? clue : in the class SimBetWithFairRouting had replicate method, can you help me?