+namespace simgrid {
+namespace mc {
+
+class StateCommDet {
+ // State* state_;
+
+public:
+ std::vector<std::vector<simgrid::mc::PatternCommunication>> incomplete_comm_pattern_;
+ std::vector<unsigned> communication_indices_;
+
+ static simgrid::xbt::Extension<simgrid::mc::State, StateCommDet> EXTENSION_ID;
+ explicit StateCommDet(State* /* ptr*/) //: state_(ptr)
+ {
+ copy_incomplete_comm_pattern();
+ copy_index_comm_pattern();
+ }
+
+ void copy_incomplete_comm_pattern()
+ {
+ incomplete_comm_pattern_.clear();
+ const unsigned long maxpid = api::get().get_maxpid();
+ for (unsigned long i = 0; i < maxpid; i++) {
+ std::vector<simgrid::mc::PatternCommunication> res;
+ for (auto const& comm : incomplete_communications_pattern[i])
+ res.push_back(comm->dup());
+ incomplete_comm_pattern_.push_back(std::move(res));
+ }
+ }
+
+ void copy_index_comm_pattern()
+ {
+ communication_indices_.clear();
+ for (auto const& list_process_comm : initial_communications_pattern)
+ this->communication_indices_.push_back(list_process_comm.index_comm);
+ }
+};
+
+simgrid::xbt::Extension<simgrid::mc::State, StateCommDet> StateCommDet::EXTENSION_ID;
+
+} // namespace mc
+} // namespace simgrid
+