Files
OrdonnancementCorrectif/src/General/Model/STFInstanceStaticInfo.hpp
T
2026-06-03 22:48:34 +02:00

46 lines
1.2 KiB
C++

#ifndef ORDONNANCEMENTCORRECTIF_STFINSTANCESTATICINFO_HPP
#define ORDONNANCEMENTCORRECTIF_STFINSTANCESTATICINFO_HPP
#include <unordered_map>
#include <vector>
#include <cmath>
#include "EmplacementVoie.h"
namespace modellib {
class OperationRequise;
class Voie;
struct hash_pair {
size_t operator()(const std::pair<OperationRequise*, Voie*> &p) const {
auto hash1 = std::hash<OperationRequise*>{}(p.first);
auto hash2 = std::hash<Voie*>{}(p.second);
if (hash1 != hash2) {
return hash1 ^ hash2;
}
return hash1;
}
};
class Rame;
class STFInstanceStaticInfo {
private:
public:
std::unordered_map<std::pair<OperationRequise *, Voie*>, bool, hash_pair> matchesInfraOpTrack;
std::unordered_map<OperationRequise *, Rame *> trainOfOperation;
std::vector<std::pair<Rame *, std::vector<OperationRequise *>>> operationsOfTrain;
std::vector<EmplacementVoie*> trackIntervals;
std::unordered_map<EmplacementVoie*,unsigned int> trackIntervalsIds;
std::unordered_map<Rame*,unsigned int> ramesIds;
double multiIndicator{};
STFInstanceStaticInfo() = default;
};
}
#endif