66 if (
this != &source) {
74 if (
this != &source) {
82 auto const time = std::chrono::time_point_cast< std::chrono::milliseconds >(
83 std::chrono::system_clock::now());
84 auto const currentdate = std::format(
"{:%Y-%m-%d %T}", time);
86 const std::string currentSoftware =
"aGrUM " GUM_VERSION;
88 *software = currentSoftware;
95 if (
auto lastModification =
_propertiesMap_.tryGet(
"lastModification")) {
96 *lastModification = currentdate;
104 for (
const auto& name:
names) {
112 if (dSize > 6) result = std::format(
"domainSize: 10^{:.6g}", dSize);
113 else result = std::format(
"domainSize: {}", (
long long)std::round(std::pow(10.0, dSize)));
115 result += std::format(
", dim: {}, mem: ", dim);
117 if (
const Size go = usedMem / (1024 * 1024 * 1024); go > 0) result += std::format(
"{}Go ", go);
118 if (
const Size mo = (usedMem / (1024 * 1024)) % 1024; mo > 0)
119 result += std::format(
"{}Mo ", mo);
120 if (
const Size ko = (usedMem / 1024) % 1024; ko > 0) result += std::format(
"{}Ko ", ko);
121 result += std::format(
"{}o", usedMem % 1024);
virtual ~GraphicalModel()
Destructor.
GraphicalModel & operator=(const GraphicalModel &source)
Private copy operator.
HashTable< std::string, std::string > _propertiesMap_
The properties of this Directed Graphical Model.
void updateMetaData()
update the meta data of this Graphical Model (version, creation date, last modification date) This me...
std::vector< std::string > names(const std::vector< NodeId > &ids) const
transform a vector of NodeId in a vector of names
GraphicalModel()
Default constructor.
virtual NodeId idFromName(std::string_view name) const =0
Getter by name.
NodeSet nodeset(const std::vector< std::string > &names) const
transform a vector of names into a NodeSet
static std::string spaceCplxToString(double dSize, int dim, Size usedMem)
send to the stream the space complexity with 3 parametrs
void insert(const Key &k)
Inserts a new element into the set.
Class representing probabilistic DAG model.
Interface-like class encapsulating basic functionalities for both a IBayesNet and IMarkovRandomField.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities