Hello everybody !!! I'm still thinking along the lines of a previous thread : http://groups.google.com/group/sage-devel/browse_thread/thread/8cb1773babe0c39f/c7be5668b9a5f18a?show_docid=c7be5668b9a5f18aand often about the Graph class which is my main concern, but not the only one I aim at : Do you think it would be a good idea to add to each one of our "main classes" ( describing general enough objects ) a function "statistics", or "info", which would perform a lot of tests on a object and output a nice complete result of it ?
An example : I am trying to do some research, and it involves trying a lot of different things based on details you notice. I would very much like a Graph.info() method telling me for each graph : Is the graph Acyclic ? Is it a tree ? What is its chromatic number ? What is the size of the maximal matching ? What is its connectivity ? What is its maximal clique ? Is it planar ? Is it perfect ? .... and many others. Actually, there are a lot of .is_* functions in many of our classes, and I think it would be pretty useful to have some general function meant to perform plenty of tests on an object. Then, when I think I have found a good counter-example I was looking for, I can see in a few seconds a LOT of statistics about this Graph, that could ( I hope ) surprise me and ( I hope ) help me think about good questions to ask myself. There could be in such a function a switch On/Off to enable NP-Complete tests, as we do not want this function to run for ages if we try it on a big instance... Do you think it would be useful in the fields you're dealing with ? I have another question, linked to this one : Suppose the user has some graph, and starts the function is_perfect ( which I have yet to write, if possible, but this is just an example ). If the graph is perfect, could we store it in the graph and remember it ? Because if some seconds later, the user wants to compute its chromatic number, the answer is polynomial !!!! But for the moment, we would have to include in any function a test of whether this graph is perfect, or has this small property which could make the algorithms run faster... Well, simply said : If the user computes some importants parameters on an object ( this parameter could require LONG computations), and if this answer can help to solve another problem the user tries to solve later, how can we "remember" the answer to the last computation and use it in the current algorithm ? This could require a lot of clever tricks to implement if we want it not to be to hard to maintain, but.... Well, I wanted to ask you the question too :-) Thanks !!! 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 -~----------~----~----~----~------~----~------~--~---