亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.cpp

?? clustering for ns-2 simulation
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
#include <iostream>#include <fstream>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include <libgen.h>#include "gzstream.h"#include "graph.h"#include "shortest_path.h"#include "utility.h"#include "analyzer_strongness.h"#include "analyzer_sp.h"#include "analyzer_bytes.h"#include "analyzer_clusters.h"#include "analyzer_degree.h"#include "analyzer_backbone_property.h"#include "Measure.h"using namespace std;/** * This flag is true if result file is zipped. */bool use_zipped;/** * This method insure that a directory exists. */void prepareDirectory(const char * directory){	mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXG);}/** * Output a dump result to a file. */void output(string fileName, int nodes, double value){	ofstream out(fileName.c_str(), ios::app);	out << nodes << " " << value << endl;	out.close();}/** * Output percent dump of a file and its normal distribution. * File has suffix "Percent". */void outputPercent(string outputFile, string propertyName, int nodes, double value, double total, int topologies) {	output(outputFile + "/" + propertyName + ".dat", nodes, value / (double)topologies);	output(outputFile + "/" + propertyName + "Percent.dat", nodes, value / total * 100);}/** * Create (if don't exists) a directory: * otuput/datas/layer/ */void prepareDestination(string & outputDirectory, string & layer){	prepareDirectory(outputDirectory.c_str());	prepareDirectory((outputDirectory + string("analysis")).c_str());	prepareDirectory((outputDirectory + string("analysis/") + layer).c_str());}/** * Usage */void usage(){	cout << "usage: analyzer -a analyzer [analyzer's options] [common-options]" << endl;	cout << endl;	cout << "Common options are:" << endl;	cout << "-r result_file				Dump File for a simulation" << endl;	cout << "-d topology_directory		Directory of Topology" << endl;	cout << "-o Output Directory		Output Directory" << endl;	cout << "-z							Dump File is zipped" << endl;	cout << endl;	cout << "Available Analyzers:" << endl;	cout << "> shortest-path" << endl;	cout << "> strongness" << endl;	cout << "> bytes" << endl;	cout << "> clusters" << endl;	cout << endl;	cout << "[\"shortest-path\"]" << endl;	cout << "* Calculate shortest path for a selected layer." << endl;	cout << "Options:" << endl;	cout << "-l layer		Layer Number" << endl;	cout << "-x				Exclude Calculation of Shortest Path on graph" << endl;	cout << endl;	cout << "[\"strongness\"]" << endl;	cout << "* Retrive strongness for a selected layer" << endl;	cout << "-l layer		Layer Number" << endl;	cout << "-t trial		Repetition in strongness calculation" << endl;	cout << endl;	cout << "[\"bytes\"]" << endl;	cout << "* Retrive bytes/msg transmitted in physic layer." << endl;	cout << "Options:" << endl;	cout << "-n Number Nodes			Number of nodes in simulations" << endl;	cout << endl;	cout << "[\"clusters\"]" << endl;	cout << "* Retrive gateway, clusterhead and common nodes of each layer" << endl;	cout << "Options:" << endl;	cout << "None" << endl;	cout << "[\"dca-degree\"]" << endl;	cout << "* Retrive gateway, clusterhead and common nodes of each layer" << endl;	cout << "Options:" << endl;	cout << "-n Nodes" << endl;	cout << "None" << endl;	cout << "[\"degree\"]" << endl;	cout << "* Retrive average degree of backbone of each layer" << endl;	cout << "Options:" << endl;	cout << "-l layer		Layer Number" << endl;	cout << "None" << endl;}int parseFlags(int argc, char * argv[]) {	bool result = true;	string algorithm, resultFile, topologyDirectory, outputDirectory;	int layer, trial, numNodes;		layer = trial = numNodes = -1;	bool exclude = false;	use_zipped = false;		while (result) {				int c = getopt(argc, argv, "a:r:d:o:l:t:n:xz");		if (c == EOF)			break;		switch (c) {						case 'x' :				exclude = true;				break;								// Algorithm.			case 'a' :				algorithm = string(optarg);				break;								// Common Options.			case 'r' :				resultFile = string(optarg);				break;			case 'd' :				topologyDirectory = string(optarg);				break;			case 'o' :				outputDirectory = string(optarg);				break;								// Trial			case 't' :				trial = atoi(optarg);				break;								// Layer			case 'l' :				layer = atoi(optarg);				break;							case 'n' :				numNodes = atoi(optarg);				break;							case 'z' :				use_zipped = true;				break;							default :				cout << "Option not recognized: " << ((char)optopt) << endl;				result = false;				break;		}	}		if (!result)		return 0;		if (algorithm == "shortest-path") {		if (layer < 0) {			cout << "Error Layer must be >= 0" << endl;			return 0;		}				// Calculate Shortest path.		Measure a;		Measure b;		Measure c;				string layer_name;		int nodes_in_dump;		analyze_sp(topologyDirectory,				   resultFile,				   layer - 1,				   a,				   b,				   c,				   layer_name,				   nodes_in_dump,				   exclude);		if (!exclude)			cout << "Avg Shortest Path Graph: " << a.getAverage() << endl;		cout << "Avg Shortest Path Backbone: " << b.getAverage() << endl;		cout << "Avg Shortest Path Inducted: " << c.getAverage() << endl;				// Save Results.		string destination = outputDirectory + "/analysis/" + layer_name + "/";				prepareDestination(outputDirectory, layer_name);				ofstream outShortestPathGraph((outputDirectory + "/analysis/ShortestPathGraph.dat").c_str(), ios::app);		ofstream outShortestPathBackbone((outputDirectory + "/analysis/" + layer_name + "/ShortestPathBackbone.dat").c_str(), ios::app);		ofstream outShortestPathInducted((outputDirectory + "/analysis/" + layer_name + "/ShortestPathInducted.dat").c_str(), ios::app);				if (!exclude)			outShortestPathGraph << nodes_in_dump << " " << a.getAverage() << endl;				outShortestPathBackbone << nodes_in_dump << " " << b.getAverage() << endl;		outShortestPathInducted << nodes_in_dump << " " << c.getAverage() << endl;				outShortestPathGraph.close();		outShortestPathBackbone.close();		outShortestPathInducted.close();				return 1;	}	else if (algorithm == "degree") {		if (layer < 0) {			cout << "Error Layer must be >= 0" << endl;			return 0;		}						// Calculate Shortest path.		Measure degree;		int count = 0;		string layer_name;				analyze_backbone_property(topologyDirectory,				   resultFile,				   layer - 1,				   degree,				   layer_name);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂福利av| 久久99精品久久久久久| 蜜桃av一区二区在线观看| 国产精品小仙女| 欧美私人免费视频| 中文字幕国产精品一区二区| 亚洲国产日韩a在线播放| 国产激情精品久久久第一区二区| 欧美亚洲自拍偷拍| 中文字幕综合网| 国产成人在线视频网站| 欧美一区二区三区爱爱| 亚洲精品国产精华液| 成人丝袜18视频在线观看| 91麻豆精品国产| 亚洲成人免费视频| 91片黄在线观看| 亚洲欧洲精品天堂一级| 国产一区二区三区香蕉| 日韩精品专区在线影院观看| 一区二区三区高清在线| 91丝袜高跟美女视频| 欧美国产精品一区二区| 国产精品一卡二卡在线观看| 日韩免费观看高清完整版| 首页国产丝袜综合| 欧美久久一区二区| 午夜精品久久一牛影视| 欧美日韩黄视频| 日韩国产高清在线| 在线成人免费视频| 日韩在线观看一区二区| 51精品国自产在线| 麻豆91在线看| 欧美大胆人体bbbb| 国内成人精品2018免费看| 精品久久99ma| 国产成都精品91一区二区三| 欧美极品美女视频| aaa亚洲精品| 亚洲蜜桃精久久久久久久| 91丨九色porny丨蝌蚪| 亚洲视频在线一区| 欧美性色黄大片| 日本亚洲最大的色成网站www| 日韩一区二区免费视频| 国产一区久久久| 欧美激情综合五月色丁香| av亚洲精华国产精华| 一区二区三区日韩在线观看| 欧美日韩免费视频| 久久成人免费网站| 国产精品毛片高清在线完整版| 91老师国产黑色丝袜在线| 一区二区三区在线看| 在线电影院国产精品| 国产永久精品大片wwwapp| 日韩毛片精品高清免费| 欧美日韩一级二级| 激情深爱一区二区| 中文字幕一区二区三区乱码在线| 色综合天天综合网天天狠天天| 亚洲一级不卡视频| www久久精品| 91黄色小视频| 国内精品自线一区二区三区视频| 国产精品久久精品日日| 欧美日韩国产一区| 国产一区二区三区四区五区入口 | 国产精品一区一区| 亚洲私人影院在线观看| 欧美人与禽zozo性伦| 国产原创一区二区三区| 亚洲一区视频在线| 国产喂奶挤奶一区二区三区| 91国产福利在线| 国产精品综合二区| 亚洲成av人片在线| 视频一区视频二区中文| 国产精品入口麻豆九色| 日韩一区二区三区视频| 91日韩在线专区| 国产高清不卡二三区| 午夜精品久久久| 亚洲免费av网站| 欧美国产精品一区| 久久综合九色综合欧美亚洲| 欧美体内she精视频| www.成人在线| 国产精品夜夜嗨| 美国一区二区三区在线播放| 伊人开心综合网| 国产精品久久久久影院| 久久综合999| 91麻豆精品国产91久久久久久久久 | 亚洲欧美一区二区视频| 欧美刺激午夜性久久久久久久| 91女厕偷拍女厕偷拍高清| 国产米奇在线777精品观看| 丝袜美腿亚洲综合| 亚洲bdsm女犯bdsm网站| 亚洲久草在线视频| 亚洲精品网站在线观看| 国产精品午夜电影| 欧美国产精品一区二区| 国产欧美一区二区在线| 精品裸体舞一区二区三区| 欧美变态口味重另类| 日韩一级片网站| 日韩欧美一级片| 日韩女优制服丝袜电影| 精品理论电影在线观看| 精品国产乱子伦一区| 日韩精品一区二区三区老鸭窝| 9191成人精品久久| 91精品国产一区二区| 88在线观看91蜜桃国自产| 欧美日韩视频专区在线播放| 欧美综合天天夜夜久久| 欧美视频中文字幕| 欧美一区二区日韩一区二区| 日韩欧美在线一区二区三区| 精品免费一区二区三区| 久久亚洲二区三区| 国产精品全国免费观看高清 | 欧美日本一区二区三区| 3d成人h动漫网站入口| 91精品一区二区三区久久久久久| 欧美精品久久一区二区三区| 7777精品伊人久久久大香线蕉最新版| 欧美色图免费看| 日韩一区二区三区免费看| 欧美va亚洲va在线观看蝴蝶网| 国产亚洲欧美日韩俺去了| 中文字幕精品综合| 亚洲欧美一区二区久久| 水蜜桃久久夜色精品一区的特点| 日本欧美大码aⅴ在线播放| 国产伦精品一区二区三区在线观看| 精品亚洲成av人在线观看| 国产suv精品一区二区6| 色婷婷亚洲综合| 日韩欧美的一区二区| 国产精品久久久久7777按摩 | 欧美另类z0zxhd电影| 精品伦理精品一区| 亚洲欧美色一区| 人人精品人人爱| 成人免费av资源| 欧美另类高清zo欧美| 国产丝袜在线精品| 亚洲一区二区三区在线看| 另类欧美日韩国产在线| 93久久精品日日躁夜夜躁欧美| 欧美日韩日本视频| 国产精品久久久久桃色tv| 亚洲国产精品麻豆| 国产白丝精品91爽爽久久| 欧洲国产伦久久久久久久| 久久综合久久鬼色| 日韩在线a电影| 色综合久久综合| 久久久夜色精品亚洲| 日日摸夜夜添夜夜添国产精品| 成人美女视频在线看| 日韩视频免费观看高清在线视频| 国产精品福利一区二区| 久久99国产精品久久99果冻传媒| 91麻豆国产福利精品| 国产人伦精品一区二区| 久久成人18免费观看| 欧美又粗又大又爽| 中文字幕一区二区在线观看| 经典三级在线一区| 91精品国产手机| 亚洲成在人线免费| 色噜噜久久综合| 中文字幕中文字幕在线一区| 国产成人在线视频播放| 精品精品国产高清a毛片牛牛 | 亚洲欧美偷拍另类a∨色屁股| 国产精品一线二线三线精华| 制服丝袜中文字幕亚洲| 天天色天天操综合| 欧美视频一区在线| 亚洲精品五月天| 91丝袜国产在线播放| 日韩码欧中文字| 972aa.com艺术欧美| 韩国女主播成人在线观看| 制服丝袜成人动漫| 五月婷婷久久丁香| 欧美午夜一区二区三区| 一区二区三区四区乱视频| eeuss鲁片一区二区三区在线看| 久久精品人人做人人爽97 | 日韩在线a电影| 欧美精品三级日韩久久| 午夜精品久久久久久久| 欧美一区日韩一区|