Пример #1
0
int main(int argc, const char *argv[])  
{
	test_cluster();
//	test_conf();

}
Пример #2
0
// ----------------------------------------------------------------
int main(int argc, char** argv)
{
	STRANDOM(); // Seed the random-number generator.

	// If the user invoked us with no arguments, give them a usage message.

	if (argc < 2)
		main_usage(argv[0]);

	// Invoke the appropriate subroutine (if any) for the first argument the
	// user typed, passing all remaining arguments along to that subroutine.
	// If the first argument is unrecognized, give them a usage message.
	//
	// Sample command line:  "./perco2 print p=0.6 M=8 N=16".

	if      (strcmp(argv[1], "print") == 0)
		test_print_lattice(argc, argv);
	else if (strcmp(argv[1], "plot") == 0)
		test_plot_lattice(argc, argv);

	else if (strcmp(argv[1], "nei") == 0)
		test_get_bonded_neighbors(argc, argv);

	else if (strcmp(argv[1], "cluster") == 0)
		test_cluster(argc, argv);
	else if (strcmp(argv[1], "plotcluster") == 0)
		test_plot_cluster(argc, argv);
	else if (strcmp(argv[1], "meanC0size") == 0)
		test_mean_C0_size(argc, argv);
	else if (strcmp(argv[1], "meanfC0size") == 0)
		test_mean_finite_C0_size(argc, argv);
	else if (strcmp(argv[1], "corrlen") == 0)
		test_corrlen(argc, argv);

	else if (strcmp(argv[1], "1o2") == 0)
		test_A1_oo_A2(argc, argv);
	else if (strcmp(argv[1], "P1o2") == 0) // This is tau(p) in greeks.sh.
		test_P_A1_oo_A2(argc, argv);

	else if (strcmp(argv[1], "clnos") == 0)
		test_cluster_numbers(argc, argv);
	else if (strcmp(argv[1], "plotclusters") == 0)
		test_plot_clusters(argc, argv);
	else if (strcmp(argv[1], "clszs") == 0)
		test_cluster_sizes(argc, argv);

	else if (strcmp(argv[1], "AinC") == 0)
		test_A_in_C(argc, argv);
	else if (strcmp(argv[1], "PAinC") == 0) // This is theta(p) in greeks.sh.
		test_P_A_in_C(argc, argv);

	else if (strcmp(argv[1], "U2inC") == 0)
		test_A1_or_A2_in_C(argc, argv);
	else if (strcmp(argv[1], "PU2inC") == 0) // This is sigma(p) in greeks.sh.
		test_P_A1_or_A2_in_C(argc, argv);

	else
		main_usage(argv[0]);

	return 0;
}