本文整理汇总了C++中vle::devs::InitEventList::getBoolean方法的典型用法代码示例。如果您正苦于以下问题:C++ InitEventList::getBoolean方法的具体用法?C++ InitEventList::getBoolean怎么用?C++ InitEventList::getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vle::devs::InitEventList
的用法示例。
在下文中一共展示了InitEventList::getBoolean方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: use_erdosrenyi_graph_generator
void use_erdosrenyi_graph_generator(const vle::devs::InitEventList& events)
{
vle::translator::graph_generator::parameter param{
std::bind(&Builder::graph_generator_make_model,
this,
std::placeholders::_1,
std::placeholders::_2,
std::placeholders::_3),
graph_generator_connectivity(),
directed
};
vle::translator::graph_generator gg(param);
if (events.exist("fraction"))
gg.make_erdos_renyi(*this,
generator,
model_number,
events.getDouble("fraction"),
events.getBoolean("allow-self-loops"));
else
gg.make_erdos_renyi(*this,
generator,
model_number,
events.getInt("edges_number"),
events.getBoolean("allow-self-loops"));
}
示例2: rgg
void use_1d_regular_graph_generator(const vle::devs::InitEventList& events)
{
vle::translator::regular_graph_generator::parameter param{
std::bind(&Builder::regular_graph_generator_make_model,
this,
std::placeholders::_1,
std::placeholders::_2,
std::placeholders::_3),
regular_graph_generator_connectivity()
};
vle::translator::regular_graph_generator rgg(param);
const auto& v = events.getSet("mask").value();
std::vector<std::string> mask;
std::transform(v.begin(),
v.end(),
std::back_inserter(mask),
[](const auto& v) { return v->toString().value(); });
rgg.make_1d(*this,
events.getInt("lenght"),
events.getBoolean("graph-wrap"),
mask,
events.getInt("x-mask"));
}
示例3: if
Builder(const vle::devs::ExecutiveInit& init,
const vle::devs::InitEventList& events)
: vle::devs::Executive(init, events)
{
model_prefix = events.getString("model-prefix");
model_classname = events.getString("model-class");
condition_name = events.getString("node-condition");
graph_type = events.getString("graph-type");
graph_connectivity = events.getString("graph-connectiviy");
directed = events.getBoolean("graph-directed");
if (graph_type == "graph")
use_graph_generator(events);
else if (graph_type == "regular")
use_regular_graph_generator(events);
else
throw vle::utils::ModellingError("Unknown graph type %s",
graph_type.c_str());
}
示例4: use_sortederdesrenyi_graph_generator
void use_sortederdesrenyi_graph_generator(
const vle::devs::InitEventList& events)
{
vle::translator::graph_generator::parameter param{
std::bind(&Builder::graph_generator_make_model,
this,
std::placeholders::_1,
std::placeholders::_2,
std::placeholders::_3),
graph_generator_connectivity(),
directed
};
vle::translator::graph_generator gg(param);
gg.make_sorted_erdos_renyi(*this,
generator,
model_number,
events.getDouble("probability"),
events.getBoolean("allow-self-loops"));
}