00001 #ifndef PREDICTION_TIME_ADVANCE_TABLE_H_INCLUDED_ 00002 #define PREDICTION_TIME_ADVANCE_TABLE_H_INCLUDED_ 00003 00004 #include<string> 00005 00006 #include "time.h" 00007 #include "segment_graph.h" 00008 00009 namespace risc { 00010 00011 namespace sg { 00012 00013 class PredictionTimeAdvanceTable { 00014 00015 public: 00016 00017 PredictionTimeAdvanceTable(risc::sg::SegmentGraph &sg, int prediction_steps); 00018 00024 void print(); 00025 00030 void print(std::string filename); 00031 00036 int index_to_segment_id(int index); 00037 00042 int segment_id_to_index(int segment_id); 00043 00044 00045 std::vector<std::vector< risc::sg::Time> > table_; 00046 00047 std::vector<int> index_to_segment_; 00048 00049 int prediction_steps_; 00050 00051 private: 00052 00057 void compute_table(); 00058 00063 void analyze(VertexDescriptor start, int steps); 00064 00065 SegmentGraph &sg_; 00066 }; 00067 00068 } // end of namespace sg 00069 00070 } // end of namespace risc 00071 00072 #endif /* PREDICTION_TIME_ADVANCE_TABLE_H_INCLUDED_ */ 00073 00074 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */