Shell Sidebar
The shell sidebar will help you to use some programming skills to work with GraphTea.
It is something like when you work with Matemathica, Maple or Matlab. You write
some codes and see the results. Shell will help you to do some complex things not available via the
graphical user interface. Working with shell doesn't require to know about Object Oriented Programming, or another programming techniques.
But knowing them will help you to create more powerful scripts!
Working with shell is easy. Just type the commands and shell will execute them.
For example, you may want to create a complete graph with 10 vertices:
a simple shell command
Pressing the TAB key, Shell will try to show you the available options with blue color, (It is called auto complete). Although if you want to use a method and don't know its input parameters just press the TAB key after its opening parenthesis (like the above image), and Shell will help you.
Inside shell type help(); to get a list of available commands. This list contains almost any available commands. to get help of a single command use: help("your_command"); (for example: help("add_edge");). Print(x); will print the value of x as output.
Here is a list of some useful commands of shell:
add_edge(_ae): add_tab(_at): Adds a new Tab to GUI add_vertex(_av): adds a vertex cartesian_product(_cproduct): Computes and shows the Cartesian product of given graphs clear_graph(_cg): Clears the graph close_tab(_ct): closes the selected tab from GUI copy_selected(_c): Copies the selected data to clipboard current_graph: The current editing graph cut(_c): Cuts the selected data to clipboard edge_induced(_e_induce): Edge Induced subgraph of selected edges eig_values(_evs): adjacency matrix eigen values generate_cmn(_g_cmn): generates Cm * Cn generate_cn(_g_cn): generated a Circle with n vertices generate_generalized_peterson(_g_p): generalized peterson generate_kmn(_g_kmn): generates a 2partite complete graph generate_kn(_g_kn): Generates a complete graph with n vertices generate_knd(_g_knd): Generate K(n/d) generate_pmn(_g_pmn): generates Pm*Pn generate_pn(_g_pn): Generates a path with n vertices generate_random(_g_rand): Generates a random graph with N Vertices and E Edges generate_random_tree(_g_rand_t): Generates a random tree generate_sn(_g_sn): Generates a star generate_wheel(_g_w): generate a n vertices wheel graph get_edge_label(_gel): get_edge_weight(_gew): girth_size(_gs): Graph Girth Size gjoin(_jn): Joins two graphs gunion(_un): Creates the union of two given graphs induced(_induce): Vertex Induced subgraph of given vertices is_eulerian(_ie): Is Eulerian is_selected(_is): shows the vertex is selected or not load_graphml(_lg): loads a graph from a GrapmML file MakeSelectionComplementGraph(): Make the selected subgraph complement MakeSelectionCompleteGraph(): Make the selected subgraph a complete graph MakeSelectionEmptyGraph(): Make the selected subgraph an empty graph matrix(_mat): shows the matrix related to the graph max_and_min_degree(_mmd): max and min degree of graph num_of_connected_components(_nocc): number of connected components num_of_edges(_esize): Number of edges in the Graph num_of_quadrangle(_noqa): number of quadrangle num_of_triangles(_notri): Number Of Triangles num_of_vertices(_vsize): Number of vertices in the Graph paste(_p): Pastes from the clipboard product(_product): Computes and shows Popular product of given graphs redo(_r): Redos the last action remove_edge(_re): Removes an Edge remove_vertex(_rv): Removes a Vertex replace(_r): Replaces the given vertex by a new position reset_graph(_rg): Resets the Graph ScaleInSelection(): Shrinks the selected items ScaleOutSelection(): Expands the selected items select_vertex(_sv): set_edge_label(_sel): set_edge_weight(_sew): set_label(_sl): Changes the label of a vertex undo(_u): Undos the last performed action vertex_iterator(_v_i): gets an iterator on vertices of graph vertices_degree_list(_vdl): vertices degrees list