revert to calling static methods again
[aco.git] / aco / strategy / HeuristicInformationStrategy.java
blob78f9d56505b2ff12cda004bde2f23d2b162ddd39
1 package aco.strategy;
3 import aco.mediator.*;
5 public class HeuristicInformationStrategy {
7 protected double[][] heuristicInformation;
9 protected ACOMediator acom;
11 public HeuristicInformationStrategy(ACOMediator acom) {
12 this.acom = acom;
15 public void computeHeuristicInformation() {
16 for (int i = 0; i < acom.getNumOfCities(); i++) {
17 for (int j = 0; j < acom.getNumOfCities(); j++) {
18 acom.setHeuristicInformation(i,j,
19 (1.0/(double)acom.getDistance(i, j) ));