资源简介
Infomap算法源码 一种高效的发现非重叠社区发现算法
输出必须是存放在dist/文件夹里面,而且如果该文件夹没有创建出来,程序将出错。
输入文件可以为各种文本格式.dat等,默认为无向网络
参考文献:Maps of random walks on complex networks reveal community structure
代码片段和文件信息
/**********************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013 Daniel Edler Martin Rosvall
For more information see
This file is part of Infomap software package.
Infomap software package is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation either version 3 of the License or
(at your option) any later version.
Infomap software package is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Infomap software package. If not see .
**********************************************************************************/
#include
#include
#include
#include
#include “utils/Logger.h“
#include “io/Config.h“
#include “infomap/InfomapContext.h“
#include “utils/Stopwatch.h“
#include “io/ProgramInterface.h“
#include “io/convert.h“
#include “utils/FileURI.h“
#include “utils/Date.h“
#include
#include “io/version.h“
void runInfomap(Config const& config)
{
InfomapContext context(config);
context.getInfomap()->run();
}
Config getConfig(int argc char *argv[])
{
Config conf;
ProgramInterface api(“Infomap“
“Implementation of the Infomap clustering algorithm based on the Map Equation (see www.mapequation.org)“
INFOMAP_VERSION);
// --------------------- Input options ---------------------
api.addNonOptionArgument(conf.networkFile “network_file“
“The file containing the network data. Accepted formats: Pajek (implied by .net) and link list (.txt)“);
api.addOptionArgument(conf.inputFormat ‘i‘ “input-format“
“Specify input format (‘pajek‘ or ‘link-list‘) to override format possibly implied by file extension.“ “s“);
api.addOptionArgument(conf.parseWithoutIOStreams “without-iostream“
“Parse the input network data without the iostream library. Can be a bit faster but not as robust.“);
api.addOptionArgument(conf.zerobasedNodeNumbers ‘z‘ “zero-based-numbering“
“Assume node numbers start from zero in the input file instead of one.“);
api.addOptionArgument(conf.includeSelflinks ‘k‘ “include-self-links“
“Include links with the same source and target node. (Ignored by default.)“);
api.addOptionArgument(conf.nodeLimit ‘O‘ “node-limit“
“Limit the number of nodes to read from the network. Ignore links connected to ignored nodes.“ “n“);
api.addOptionArgument(conf.clusterDataFile ‘c‘ “cluster-data“
“Provide an initial two-level solution (.clu format).“ “p“);
// --------------------- Output options ---------------------
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-21 11:17 Infomap-0.12.13\
文件 1300 2013-10-03 18:21 Infomap-0.12.13\CHANGES.txt
文件 34520 2013-04-26 12:28 Infomap-0.12.13\LICENSE_AGPLv3.txt
文件 2226 2013-11-14 13:36 Infomap-0.12.13\Makefile
文件 949 2013-05-08 20:41 Infomap-0.12.13\README.txt
目录 0 2013-11-15 15:48 Infomap-0.12.13\src\
文件 6148 2013-11-01 10:33 Infomap-0.12.13\src\.DS_Store
目录 0 2013-11-21 11:16 Infomap-0.12.13\src\infomap\
文件 2040 2013-05-03 08:43 Infomap-0.12.13\src\infomap\Edge.h
文件 10236 2013-06-19 14:02 Infomap-0.12.13\src\infomap\flowData.h
文件 2672 2013-06-19 14:02 Infomap-0.12.13\src\infomap\flowData_traits.h
文件 8297 2013-10-03 18:21 Infomap-0.12.13\src\infomap\FlowNetwork.cpp
文件 2418 2013-05-03 08:43 Infomap-0.12.13\src\infomap\FlowNetwork.h
文件 50636 2013-11-15 15:48 Infomap-0.12.13\src\infomap\Infomapba
文件 11884 2013-11-14 13:36 Infomap-0.12.13\src\infomap\Infomapba
文件 1801 2013-10-03 18:21 Infomap-0.12.13\src\infomap\InfomapContext.cpp
文件 1454 2013-05-03 08:43 Infomap-0.12.13\src\infomap\InfomapContext.h
文件 1264 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapDirected.cpp
文件 1548 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapDirected.h
文件 1292 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapDirectedUnrecordedTeleportation.cpp
文件 1657 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapDirectedUnrecordedTeleportation.h
文件 1581 2013-05-03 08:43 Infomap-0.12.13\src\infomap\InfomapGreedy.cpp
文件 62630 2013-10-03 18:21 Infomap-0.12.13\src\infomap\InfomapGreedy.h
文件 1101 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapUndirdir.cpp
文件 1488 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapUndirdir.h
文件 1104 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapUndirected.cpp
文件 1499 2013-06-19 14:02 Infomap-0.12.13\src\infomap\InfomapUndirected.h
文件 26335 2013-11-21 11:16 Infomap-0.12.13\src\infomap\Network.cpp
文件 2677 2013-11-15 15:48 Infomap-0.12.13\src\infomap\Network.h
文件 3432 2013-05-03 08:43 Infomap-0.12.13\src\infomap\Node.cpp
文件 11848 2013-05-03 08:43 Infomap-0.12.13\src\infomap\Node.h
............此处省略32个文件信息
- 上一篇:Openxm
l白皮书译文 - 下一篇:verilog微波炉定时器设计
评论
共有 条评论