Ignore:
Timestamp:
12/22/11 10:13:53 (13 years ago)
Author:
sherbold
Message:
  • fixed switch in row/column index when reading stationary distribution
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/FirstOrderMarkovModel.java

    r258 r345  
    148148                for (int i = 0; i < numStates; i++) { 
    149149                        for (int j = 0; j < numStates; j++) { 
    150                                 if (transmissionMatrix.get(i, j) != 0) { 
    151                                         double tmp = stationaryMatrix.get(i, 0); 
     150                                if (transmissionMatrix.get(i, j) != 0 && transmissionMatrix.get(i, j)!=1) { 
     151                                        double tmp = stationaryMatrix.get(0, i); 
    152152                                        tmp *= transmissionMatrix.get(i, j); 
    153153                                        tmp *= Math.log(transmissionMatrix.get(i, j)) / Math.log(2); 
Note: See TracChangeset for help on using the changeset viewer.