Hello everybody !!! This is a copy of a mail I sent to Robert Miller,
who may require a larger audience :-)

-------------------

I was thinking about the huge list of functions we have at the moment
in the Graph class, and the length of Graph.py.

Well, I am at the moment convinced ( if you are not of the same mind,
please tell me ), that the best way would be to create different files
for different "types" of functions, and import them the following way
: let us say we have such a file named graph/cliques.py containing all
the functions beginning by "cliques". We sould then just have to add
in the "main" file graph.py the line : from sage.graphs import cliques

This way, when we use tab completion on "g." or on "Graph.", see the
module "clique" , on which we could then use tab completion again
through "Graph.clique."

This would actually be a pretty natural way for the user to find
functions.... I spent "some time" tring to sort this long list : I
tought this could give good results, so I gave it a try, but this by
itself is no reason not to discard it totally if you do not like the
idea. Anyway after sorting this all is mixed up in my head, so I will
trust your judgement :-)

Oh, an by the way... I just did a grep "def" to find these functions,
then just moved them in the sections I deemed appropriate, but many
function would have to be renamed : for example it would be natural to
rename Graph.eulerian.eulerian_orientation to
Graph.eulerian.orientation ... And now, here's the list !!!!

Graph.connectivity :

   def is_connected(self):
   def connected_components(self):
   def connected_components_number(self):
   def connected_components_subgraphs(self):
   def connected_component_containing_vertex(self, vertex):
   def blocks_and_cut_vertices(self):
   def transitive_closure(self):
   def transitive_reduction(self):
   def is_transitively_reduced(self):

Graph.trees :

   def is_tree(self):
   def is_forest(self):
   def spanning_trees_count(self, root_vertex=None):
   def min_spanning_tree(self, weight_function=lambda e: 1,

Graph.matrix :

   def adjacency_matrix(self, sparse=None, boundary_first=False):
   def incidence_matrix(self, sparse=True):
   def weighted_adjacency_matrix(self, sparse=True, boundary_first=False):
   def kirchhoff_matrix(self, weighted=None, indegree=True, **kwds):

Graph.embedding :

   def set_embedding(self, embedding):
   def get_embedding(self):
   def check_embedding_validity(self, embedding=None):
   def set_planar_positions(self, set_embedding=False,
on_embedding=None, external_face=None, test=False, circular=False):
   def is_drawn_free_of_edge_crossings(self):
   def genus(self, set_embedding=True, on_embedding=None,
minimal=True, maximal=False, circular=False, ordered=True):
   def check_pos_validity(self, pos=None):
   def set_pos(self, pos):
   def get_pos(self):
   def get_boundary(self):
   def set_boundary(self, boundary):
   def trace_faces(self, comb_emb):
   def is_planar(self, on_embedding=None, kuratowski=False,
set_embedding=False, set_pos=False):
   def is_circular_planar(self, ordered=True, on_embedding=None,
kuratowski=False, set_embedding=False, set_pos=False):

Graph.formats :
   def networkx_graph(self, copy=True):
   def graphviz_string(self):
   def graphviz_to_file_named(self, filename):
   def write_to_eps(self, filename, iterations=50):
   def graphviz_string(self):
   def graph6_string(self):
   def sparse6_string(self):
   def latex_options(self):
   def set_latex_options(self, **kwds):

Graph.statistics :
   def density(self):
   def order(self):
   def size(self):
   def cluster_triangles(self, nbunch=None, with_labels=False):
   def clustering_average(self):
   def clustering_coeff(self, nbunch=None, with_labels=False, weights=False):
   def cluster_transitivity(self):
   def cores(self, with_labels=False):
   def centrality_betweenness(self, normalized=True):
   def centrality_degree(self, v=None):
   def centrality_closeness(self, v=None):
   def is_equitable(self, partition, quotient_matrix=False):
   def coarsest_equitable_refinement(self, partition, sparse=True):

Graph.vertices :

   def add_vertex(self, name=None):
   def add_vertices(self, vertices):
   def delete_vertex(self, vertex, in_order=False):
   def delete_vertices(self, vertices):
   def has_vertex(self, vertex):
   def vertex_boundary(self, vertices1, vertices2=None):
   def set_vertices(self, vertex_dict):
   def set_vertex(self, vertex, object):
   def get_vertex(self, vertex):
   def get_vertices(self, verts=None):
   def loop_vertices(self):
   def vertex_iterator(self, vertices=None):
   def neighbor_iterator(self, vertex):
   def vertices(self, boundary_first=False):
   def neighbors(self, vertex):
   def merge_vertices(self,vertices):
   def degree(self, vertices=None, labels=False):
   def degree_histogram(self):
   def degree_iterator(self, vertices=None, labels=False):
   def degree_sequence(self):
   def relabel(self, perm=None, inplace=True, return_map=False):
   def is_regular(self, k = None):
   def canonical_label(self, partition=None, certify=False,
verbosity=0, edge_labels=False):
   def degree_to_cell(self, vertex, cell):

Graph.operators :

   def cartesian_product(self, other):
   def tensor_product(self, other):
   def lexicographic_product(self, other):
   def strong_product(self, other):
   def disjunctive_product(self, other):
   def disjoint_union(self, other, verbose_relabel=True):
   def union(self, other):
   def line_graph(self, labels=True):
   def to_simple(self):
   def is_subgraph(self, other):
   def subgraph(self, vertices=None, edges=None, inplace=False,
   def random_subgraph(self, p, inplace=False):
   def add_cycle(self, vertices):
   def add_path(self, vertices):
   def complement(self):

Graph.distances :

   def girth(self):
   def eccentricity(self, v=None, dist_dict=None, with_labels=False):
   def radius(self):
   def center(self):
   def diameter(self):
   def distance(self, u, v):
   def distance_graph(self, dist):
   def periphery(self):
   def interior_paths(self, start, end):
   def all_paths(self, start, end):
   def shortest_path(self, u, v, by_weight=False, bidirectional=True):
   def shortest_path_length(self, u, v, by_weight=False,
   def shortest_paths(self, u, by_weight=False, cutoff=None):
   def shortest_path_lengths(self, u, by_weight=False, weight_sums=None):
   def shortest_path_all_pairs(self, by_weight=True, default_weight=1):
   def breadth_first_search(self, start, ignore_direction=False,
distance=None, neighbors=None):
   def depth_first_search(self, start, ignore_direction=False,
distance=None, neighbors=None):

Graph.edges :

   def add_edge(self, u, v=None, label=None):
   def add_edges(self, edges):
   def delete_edge(self, u, v=None, label=None):
   def delete_edges(self, edges):
   def delete_multiedge(self, u, v):
   def set_edge_label(self, u, v, l):
   def has_edge(self, u, v=None, label=None):
   def edges(self, labels=True, sort=True):
   def edge_boundary(self, vertices1, vertices2=None, labels=True):
   def edge_iterator(self, vertices=None, labels=True, ignore_direction=False):
   def edges_incident(self, vertices=None, labels=True):
   def edge_label(self, u, v=None):
   def edge_labels(self):
   def remove_multiple_edges(self):
   def remove_loops(self, vertices=None):
   def loop_edges(self):
   def number_of_loops(self):
   def allows_loops(self):
   def allow_loops(self, new, check=True):
   def loops(self, new=None, labels=True):
   def has_multiple_edges(self, to_undirected=False):
   def allows_multiple_edges(self):
   def allow_multiple_edges(self, new, check=True):
   def multiple_edges(self, new=None, to_undirected=False, labels=True):
   def has_loops(self):

Graph.cliques :

   def cliques_maximal(self):
   def cliques(self):
   def cliques_maximum(self):
   def clique_maximum(self):
   def clique_number(self, algorithm="cliquer", cliques=None):
   def cliques_number_of(self, vertices=None, cliques=None, with_labels=False):
   def cliques_get_max_clique_graph(self, name=''):
   def cliques_get_clique_bipartite(self, **kwds):
   def cliques_vertex_clique_number(self, algorithm="cliquer", vertices=None,
   def cliques_containing_vertex(self, vertices=None, cliques=None,
with_labels=False):
   def clique_complex(self):
   def is_clique(self, vertices=None, directed_clique=False):
   def is_independent_set(self, vertices=None):
   def independent_set(self):

Graph.matrix :

   def weighted(self, new=None):
   def antisymmetric(self):
   def eigenvectors(self, laplacian=False):
   def eigenspaces(self, laplacian=False):
   def spectrum(self, laplacian=False):

Graph.coloring :

   def chromatic_polynomial(self):
   def chromatic_number(self, algorithm="DLX"):
   def coloring(self, algorithm="DLX", hex_colors=False):
   def bipartite_color(self):
   def bipartite_sets(self):
   def is_bipartite(self):

Graph.plot :
   def plot(self, **options):
   def show(self, **kwds):
   def plot3d(self, bgcolor=(1,1,1), vertex_colors=None, vertex_size=0.06,
   def show3d(self, bgcolor=(1,1,1), vertex_colors=None, vertex_size=0.06,
   def graphplot(self, **options):

Graph.eulerian:
   def eulerian_orientation(self):
   def eulerian_circuit(self, return_vertices=False, labels=True):
   def is_eulerian(self):

Graph.groups :
   def automorphism_group(self, partition=None, translation=False,
   def is_vertex_transitive(self, partition=None, verbosity=0,

Graph.misc :
   def is_isomorphic(self, other, certify=False, verbosity=0,
edge_labels=False):
   def name(self, new=None):
   def clear(self):
   def characteristic_polynomial(self, var='x', laplacian=False):
   def to_directed(self, implementation='networkx', sparse=None):


If you like this idea, we will obviously have to go over it several
times, moving things around and renaming others... :-)

Have fuuuuuuuuuuuun !!!

Nathann

------------------------------------------
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to