You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following example:
Upon deleting a vertex from the Petersen graph, the string representation of the resulting graph still states that the new graph is the Petersen graph.
sage: P = graphs.PetersenGraph()
sage: P
Petersen graph: Graph on 10 vertices
sage: P.delete_vertex(0)
sage: P
Petersen graph: Graph on 9 vertices
Upon deleting an edge from a cycle graph, the string representation of the resulting graph still states that the new graph is a cycle graph:
sage: G = graphs.CycleGraph(4)
sage: G
Cycle graph: Graph on 4 vertices
sage: G.delete_edge(0, 1)
sage: G
Cycle graph: Graph on 4 vertices
An analogous result can be observed for each instance of a named (di)graph/ (di)graph of a particular family. An example for digraph goes as follows:
sage: D = digraphs.Circuit(5)
sage: D
Circuit: Digraph on 5 vertices
sage: D.delete_edge(0, 1)
sage: D
Circuit: Digraph on 5 vertices
Analogous behaviour may be observed in case of addition of a vertex/ an edge:
sage: G = graphs.CycleGraph(4)
sage: G
Cycle graph: Graph on 4 vertices
sage: G.add_vertex()
4
sage: G
Cycle graph: Graph on 5 vertices
Expected Behavior
A (possible) expected behaviour can be to remove the prefix substring pertaining to the family name/ name of the (di)graph on the addition/ deletion of a vertex/ an edge. The expected behaviour for the above mentioned examples are listed below:
sage: P = graphs.PetersenGraph()
sage: P
Petersen graph: Graph on 10 vertices
sage: P.delete_vertex(0)
sage: P
Graph on 9 vertices
sage: G = graphs.CycleGraph(4)
sage: G
Cycle graph: Graph on 4 vertices
sage: G.delete_edge(0, 1)
sage: G
Graph on 4 vertices
sage: D = digraphs.Circuit(5)
sage: D
Circuit: Digraph on 5 vertices
sage: D.delete_edge(0, 1)
sage: D
Digraph on 5 vertices
sage: G = graphs.CycleGraph(4)
sage: G
Cycle graph: Graph on 4 vertices
sage: G.add_vertex()
4
sage: G
Graph on 5 vertices
Actual Behavior
The name/ family name of the (di)graph is preserved on addition/ deletion of a vertex/ an edge. For examples see the section: Steps to reproduce
Additional Information
This problem may be solved by setting self.name() or the output of self.str() to '' on the addition/ deletion of a vertex/ an edge.
This issue shall also be corrected for the addition of cliques, cycles, paths and removable of multiedges.
Environment
OS: Ubuntu 20.04.6 LTS (Focal Fossa)
Sage Version: 10.5.beta6
Checklist
I have searched the existing issues for a bug report that matches the one I want to file, without success.
I have read the documentation and troubleshoot guide
The text was updated successfully, but these errors were encountered:
Steps To Reproduce
Consider the following example:
Upon deleting a vertex from the Petersen graph, the string representation of the resulting graph still states that the new graph is the Petersen graph.
Upon deleting an edge from a cycle graph, the string representation of the resulting graph still states that the new graph is a cycle graph:
An analogous result can be observed for each instance of a named (di)graph/ (di)graph of a particular family. An example for digraph goes as follows:
Analogous behaviour may be observed in case of addition of a vertex/ an edge:
Expected Behavior
A (possible) expected behaviour can be to remove the prefix substring pertaining to the family name/ name of the (di)graph on the addition/ deletion of a vertex/ an edge. The expected behaviour for the above mentioned examples are listed below:
Actual Behavior
The name/ family name of the (di)graph is preserved on addition/ deletion of a vertex/ an edge. For examples see the section: Steps to reproduce
Additional Information
This problem may be solved by setting self.name() or the output of self.str() to '' on the addition/ deletion of a vertex/ an edge.
This issue shall also be corrected for the addition of cliques, cycles, paths and removable of multiedges.
Environment
Checklist
The text was updated successfully, but these errors were encountered: