#13503: Enhancement of `is_triangle_free' addition of `triangles_count' and a
minor
change in `spanning_trees_count'
----------------------------------------------------------+-----------------
Reporter: azi | Owner:
jason, ncohen, rlm
Type: enhancement | Status:
needs_work
Priority: minor | Milestone:
sage-5.4
Component: graph theory | Resolution:
Keywords: triangles, graphs, number of triangles | Work issues:
Report Upstream: N/A | Reviewers:
David Coudert
Authors: Jernej Azarija | Merged in:
Dependencies: | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by rbeezer):
Replying to [comment:11 dcoudert]:
> Since the adjacency matrix is a matrix of integers (in fact booleans or
bits), I expect matrix multiplication to be significantly faster than in
any other rings.
I'd guess that managing (potentially) large integers has more overhead
than managing doubles:
{{{
sage: G = graphs.CompleteBipartiteGraph(100, 100)
sage: M = G.am()
sage: timeit("M*M*M")
25 loops, best of 3: 31 ms per loop
sage: MR = M.change_ring(RDF)
sage: timeit("MR*MR*MR")
125 loops, best of 3: 2.4 ms per loop
sage: (MR*MR*MR).trace()
0.0
}}}
I can't recall seeing a Sage class for integers of a bounded size.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13503#comment:15>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.