test.cpp

来自「这个代码包括求图的最大生成树和M着色问题.」· C++ 代码 · 共 24 行

CPP
24
字号
/* file: test.cpp * to-do: just for test, test each class and it's method * email: efiish@gmail.com * date: 06.11.30 */#include <stdio.h>#include "graph_matrix.h"	// for test the class mgraph
#include "mcolor.h"	// for mcolor algorithmint main(){  mgraph g(5);  g.read_file("test.g");	// create graph from file  g.print();			// print the graph's edge matrix
  // now get the maximum span tree
  printf("\t\t max spanning tree \n");
  mgraph span_tree(5);
  g.max_span_tree(span_tree);
  span_tree.print();
  //mcolor it
  printf("\t\t 3-coloring \n");
  mcolor(3,g);  return 0;}

⌨️ 快捷键说明

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