예제 #1
0
int main(int argc, char** argv)
{
    HelpStruct help;
    help.description = "Throws grains on specified cells of the grid.\n"
                       "Throwing is meant without any stabilization.";
    help.syntax = "math/add <i1> <i2> ... <in>";
    help.add_param("<i1> <i2> ... <in>", "Numbers to be addded. 0 <= n.");

    MyProgram program;
    return program.run(argc, argv, &help);
}
예제 #2
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.syntax = "io/scat [<infile>]";
	help.description = "Reads grid from stdin and writes it to stdout. Useful for formatting.";
	help.input = "input grid, or none if a file was given as an argument";
	help.output = "the same grid";
	help.add_param("infile", "specifies a file to read a grid from");

	MyProgram p;
	return p.run(argc, argv, &help);
}
예제 #3
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.description = "Computig the unique (until permutation) sequence of numbers\n"
		"which - added - give the specified grid. Separated by spaces.";
	help.input = "input grid";
	help.output = "sequence of numbers";
	help.syntax = "io/field_to_seq [newlines]";
	help.add_param("newlines", "newlines are chosen as separators, instead of spaces");

	MyProgram program;
	return program.run(argc, argv, &help);
}
예제 #4
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.syntax = "img/transform <equation> [<format> [<iterations>]]";
	help.description = "Transforms given image using a CA\n";
	help.input = "input image";
	help.output = "output image";
	help.add_param("<equation>", "transformation equation");
	help.add_param("<format>", "format string, like ARGB");
	help.add_param("<iterations>", "number of subsequent iterations");
	MyProgram p;
	return p.run(argc, argv, &help);
}
예제 #5
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.syntax = "ca/active_cells <ca-table-file>"
		"";
	help.description = "Visualizes which cells are active";
	help.add_param("<ca-table-file>", "path to ca in table format");
	help.input = "the input configuration";
	help.output = "boolean grid which is true where the input grid is active";

	MyProgram p;
	return p.run(argc, argv, &help);
}
예제 #6
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.syntax = "math/calc <equation> [newlines]";
	help.description = eqsolver::get_help_description();
	help.input = "sequence to be modified";
	help.output = "modified sequence";
	help.add_param("<equation>", "Manipulation formula in x. Double quotes suggested.");
	help.add_param("newlines", "newlines are chosen as separators, instead of spaces");

	MyProgram p;
	return p.run(argc, argv, &help);
}
int main(int argc, char** argv)
{
	HelpStruct help;
	help.description = "Converts the binary avalanche output of algorithms in algo into human readable avalanches.\n"
		"Not efficient for large amount of data (code could be improved)";
	help.input = "the binary avalanche data";
	help.output = "the human readable avalanche data (a number sequence)";
	help.syntax = "io/avalanches_bin2human <width> [ids]";
	help.add_param("<width>", "width of grid used to compute the input data");
	help.add_param("ids", "if given, prepends n to the nth avalanche");

	MyProgram program;
	return program.run(argc, argv, &help);
}
예제 #8
0
int main(int argc, char** argv)
{
	HelpStruct help;
	help.syntax = "gui_qt/gui_qt [<ca_formula> [<input_formula>]]";
	help.description = "GUI to simulate CA.";
	help.input = "start grid for simulation";
	help.output = "end grid of simulation";
	help.add_param("ca_equation", "formula for the ca, default is ASM");
	help.add_param("input_formula", "formula for mouse click input"
		"default is `v+1'");

	MyProgram p;
	return p.run(argc, argv, &help);
}
예제 #9
0
int main(int argc, char** argv)
{
	increase_stack_size(1000);

	HelpStruct help;
	help.syntax = "usr/search <ca-table-file> <border> [dump|nodump [split|left|dumb]]"
		"";
	help.description = "Computes all end configurations "
		"using split algorithm.";
	help.input = "Input grid in a format generated with ../ca/dump.";
	help.output = "All possible end configurations, including sccs";
	help.add_param("ca-table-file", "file containing the ca's equation");
	help.add_param("border", "state that, set on border, will be dead");
	help.add_param("dump|nodump", "whether to dump graph on exit/abort");
	help.add_param("split|left|dumb",
		"algorithm to use, default is split");

	MyProgram p;
	return p.run(argc, argv, &help);
}
예제 #10
0
void main()
{
	srand(time(NULL));
	MyProgram myProgram;
	myProgram.go();
}