本文整理汇总了C++中ProgramState::setMolloyReedGraph方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramState::setMolloyReedGraph方法的具体用法?C++ ProgramState::setMolloyReedGraph怎么用?C++ ProgramState::setMolloyReedGraph使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramState
的用法示例。
在下文中一共展示了ProgramState::setMolloyReedGraph方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (!args_info->r_given) {
usageErrorMessage("Extended Hot graph generation requires the parameter user to selected the edges in the graph after connecting a vertex.");
ERROR_EXIT;
}
if (!args_info->t_given) {
usageErrorMessage("Extended Hot graph generation requires the parameter user select between how many loops the core is recalculated.");
ERROR_EXIT;
}
int n = args_info->n_arg;
int m = args_info->m_arg;
float xi = args_info->xi_arg;
int q = args_info->q_arg;
float r = args_info->r_arg;
int t = args_info->t_arg;
VALIDATE_POS(n);
VALIDATE_POS(m);
VALIDATE_POS(q);
VALIDATE_POS(xi);
VALIDATE_POS(r);
VALIDATE_POS(t);
state->setExtendedHotGraph(m, n, xi, q, r, t);
cout << "Succesfully created an Extended Hot graph with " + to_string(n) + " nodes.\n";
} else if (args_info->molloy_given) {
if (!args_info->ks_given) {
usageErrorMessage("A file with Ks and its nodes is needed to create a Molloy Reed graph.");
ERROR_EXIT;
}
string path = args_info->ks_arg;
state->setMolloyReedGraph(path);
} else if (args_info->hyperbolic_given) {
if (!args_info->n_given) {
usageErrorMessage("Hiperbolic graph generation requires a number of nodes.");
ERROR_EXIT;
}
if (!args_info->a_given) {
usageErrorMessage("Hiperbolic graph generation requires a radial density.");
ERROR_EXIT;
}
if (!args_info->deg_given) {
usageErrorMessage("Hiperbolic graph generation requires an average node degree.");
ERROR_EXIT;
}
int n = args_info->n_arg;
float a = args_info->a_arg;
float c = args_info->deg_arg;
state->setHiperbolicGraph(n, a, c);
} else {
usageErrorMessage("A network must be specified in order to work.");
ERROR_EXIT;
}
if (args_info->betweenness_given) {
//if (state->isWeighted()) {
// errorMessage("Betweenness for weighted graphs is not supported.");
// ERROR_EXIT;
//}else{
printf("Weighted Betweenness");
int vertex_id = args_info->betweenness_arg;
double ret = state->betweenness((unsigned int)args_info->betweenness_arg);
if(ret != -1) {