#12834: Modify subs so that it can accept multiple equations just like subs_expr
-------------------------------------+-------------------------------------
Reporter: JoalHeagney | Owner: AlexGhitza
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: subs algebra | Merged in:
solving | Reviewers: Vincent Delecroix,
Authors: Michael Orlitzky, | Michael Orlitzky
Vincent Delecroix | Work issues:
Report Upstream: N/A | Commit:
Branch: | 33fd4491e0014487e18bdc1007d21751d74f8619
u/mjo/ticket/12834 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:33 mjo]:
> Replying to [comment:28 vdelecroix]:
> > >
> > > The first `any(k in d1 for k in d2)` is probably O(m*n), since it
(potentially) has to look through all of both dictionaries to see if there
are any duplicates. Then,
> >
> > You are wrong. A dictionary is a hash table not a list. Assuming that
there is no collision this is a O(m) where m=size(d2).
>
> Right, but doesn't this
>
> {{{
> k in d1 for k in d2
> }}}
>
> do the `d1[k]` lookup (which is O(n)) m times, once for each key in
`d2`?
The lookup is O(1). And once for each key in d2 gives O(m). There is no
for loop on d1, isn't it?
--
Ticket URL: <http://trac.sagemath.org/ticket/12834#comment:35>
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.