Ask Your Question

Revision history [back]

Error in datastructure in sagemath

I am new to creating a graph. I am trying to analyse a code by recreating it. My sample code is given below:

n=10 show(graphs.CompleteGraph(2n+2)) g=graphs.CompleteGraph(2n+2) time_window_interval = [0, 4*60] g = g.to_directed(time_window_interval) g.show

On running the code, I am getting "ValueError: data_structure must be equal to 'sparse', 'static_sparse' or 'dense'" on the line g = g.to_directed(time_window_interval).

click to hide/show revision 2
None

Error in datastructure in sagemath

I am new to creating a graph. I am trying to analyse a code by recreating it. My sample code is given below:

n=10
show(graphs.CompleteGraph(2n+2))
g=graphs.CompleteGraph(2n+2)
show(graphs.CompleteGraph(2*n+2))
g=graphs.CompleteGraph(2*n+2)
time_window_interval = [0, 4*60]
g = g.to_directed(time_window_interval)
g.show

g.show

On running the code, I am getting "ValueError: data_structure must be equal to 'sparse', 'static_sparse' or 'dense'" on the line g = g.to_directed(time_window_interval).