⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cc.svn-base

📁 Probabilistic graphical models in matlab.
💻 SVN-BASE
字号:
#include <iostream>#include <sstream>#include <string>#include <boost/graph/adjacency_list.hpp>#include <boost/graph/graph_traits.hpp>#include <boost/graph/properties.hpp>#include <boost/graph/subgraph.hpp>#include <boost/random.hpp>#include <boost/timer.hpp>#include <Generic.h>#include <InputFunctions.h>#include <Potential.h>#include <Node.h>#include <RandomVariable.h>#include <OutputGraph.h>#include <Experiment.h>using namespace std;using namespace boost;// Value in the constructor is the seed...lagged_fibonacci607 fibonnacci_number_generator (20);timer global_timer;typedef property< edge_index_t, unsigned int, ContinuousPotential *> NPEdgeProperty;typedef adjacency_list<vecS, vecS, undirectedS, GraphicalModelNode *, 	NPEdgeProperty > NPGraph;typedef boost::property< boost::edge_index_t, unsigned int, DiscretePotential *> DiscretePairwiseEdgeProperty;typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, MessageNode<DiscreteRandomVariable, boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::undirectedS>::vertex_descriptor> *, 	DiscretePairwiseEdgeProperty > DiscretePairwiseGraph;Experiment * current_experiment;bool monitoring = false;//fibonnacci_number_generator.seed(time(NULL));variate_generator <lagged_fibonacci607 &, uniform_real <  > > uniform_distribution_0_1 (fibonnacci_number_generator, uniform_real < > (0.0, 1.0) );unsigned int mrf_rows = 10;unsigned int mrf_columns = 10;int main (int argc,  char * const argv[]){	Experiment main_experiment;		if (argc < 3)	{		cout << "Give me more arguments: pgm input_file output_file" << endl;		return 0;		}		if (!main_experiment.set_up_model_from_file( argv[1]))	{		cout << "A fatal error ocurred while parsing file. Aborting..." << endl;		return 0;	}		main_experiment.get_inference();		main_experiment.export_results_to_file( argv[2]);	    return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -