#16395: adjacency_matrix raises error for large multigraphs
-------------------------------------+-------------------------------------
Reporter: lipshitz | Owner:
Type: defect | Status: needs_info
Priority: minor | Milestone: sage-6.3
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/lipshitz/ticket/16395 | ec8ebced3d73d124c10fabfd648b5033693f4382
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by lipshitz):
Hi Nathann,
Fair enough! On the other hand, the relevant notion here seems to be the
density of the honest graph obtained by replacing each multiple edge with
a single edge. I could change the code to compute that, and decide whether
to return a dense or sparse matrix based on that computation. Or just have
multi graphs always return a dense matrix, like the code does now. Do you
have a preference?
Robert
Replying to [comment:7 ncohen]:
> Hello !
>
> > Sure -- if you think that's better. My reason for doing it this way:
if someone later improves density() to work for multigraphs,
adjacency_matrix will then automatically use the improved code. (I imagine
someone might improve density() but not think to look at
adjacency_matrix.) And trying density() probably doesn't take much time.
>
> It is not a problem of improving `.density()` : how do you define the
density of a multigraph ?
>
> Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16395#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.