"cumulativePatterns", "empiricalDistPatterns",
"cumulativeTrips", "empiricalDistTrips" } );
Set<TripPattern> patterns = new HashSet<TripPattern>();
for (Vertex v : graph.getVertices()) {
for (PatternHop ph : Iterables.filter(v.getOutgoing(), PatternHop.class)) {
TripPattern ttp = ph.getPattern();
patterns.add(ttp);
}
}
Multiset<Integer> counts = TreeMultiset.create();
int nPatterns = patterns.size();
LOG.info("total number of patterns is: {}", nPatterns);
int nTrips = 0;
for (TripPattern ttp : patterns) {
List<Trip> trips = ttp.getTrips();
counts.add(trips.size());
nTrips += trips.size();
}
LOG.info("total number of trips is: {}", nTrips);
LOG.info("average number of trips per pattern is: {}", nTrips/nPatterns);