pagan

5147 Reputation

23 Badges

17 years, 121 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are replies submitted by pagan

jinx!

Maybe the output from anames() could provide the prefixes for a utility to do this. But it would have to walk over modules.

It looks like forget hasn't been updated to handle all module members as "subfunctions", so as to be able to clear them "recursively".

> restart:

> p := module()
> export f;
> local g;
> f := proc(x) g(x); end proc;
> g := proc(x) option remember; time(); end proc:
> end module:

> p:-f(3);
                                     0.017
 
> kernelopts(opaquemodules=false):
> op(4,eval(p:-g));
                              table([3 = 0.017])
 
> int(cos(sin(x)),x):
 
> time(),p:-f(3);
                                 0.197, 0.017
 
> forget(p);

> op(4,eval(p:-g));
                              table([3 = 0.017])
 
> time(),p:-f(3);
                                 0.199, 0.017

The help page for forget is interesting, because it refers to packages so old that they might predate the / naming convention for "subfunctions".

     - The function forget may not work with some procedure
       defined in packages, because it relies on a heuristic
       naming convention that is not adhered to in some,
       older packages.

Of course, now there are newer packages, implemented as modules, which also don't adhere to that convention.

Do you need to have the cost of Maple's garbage collection taken into account?

Do you have a particular domain in mind? (eg. integers only, or rational polynomials, or ratpoly(radnum), etc?)

Are you interested only what's implemented in Maple, or in the current theory? If theory, then for sparse or dense cases?

Do you want the case where neither left- not right-reducing Matrices are also computed? In that case a quite different routine is used, namely, LinearAlgebra:-LA_Main:-`SmithForm/one`. This may be nondeterministic (probabalistic) and differ from what is used when either reducing Matric is also requested.

You may also be interested in this: A. Storjohann and G. Labahn, A Fast Las Vegas Algorithm for Computing the Smith Normal Form of a Polynomial Matrix , Linear Algebra and its Applications. 253 (1997) 155-173. The references cited at the end of that paper could also be useful to you.

And so what are the practical consequences of that, and is it relevant here?

In the absence of an interprocess communication solution that is built right into the Standard GUI and the maple/xmaple start-up scripts, a Maple language client-server solution using Maple Sockets might be feasible.

After writing the above, I was wondering how to easily write the other end -- a script that could open a socket, handshake with the authored listener Thread running in the GUI, and send the filename down the socket. It is this script which could be associated with the .mw filename extension in a filemanager. But now I imagine that Maple itself might serve very nicely for coding the scripted end, too.

In the absence of an interprocess communication solution that is built right into the Standard GUI and the maple/xmaple start-up scripts, a Maple language client-server solution using Maple Sockets might be feasible.

After writing the above, I was wondering how to easily write the other end -- a script that could open a socket, handshake with the authored listener Thread running in the GUI, and send the filename down the socket. It is this script which could be associated with the .mw filename extension in a filemanager. But now I imagine that Maple itself might serve very nicely for coding the scripted end, too.

> convert((a+b*I)^(1/2),RootOf);
                    2                  2
           RootOf(_Z  - a - b RootOf(_Z  + 1, index = 1), index = 1)
 
> RootOf(_Z^2-a-b*RootOf(_Z^2+1,index = 1));
                         2                  2
                RootOf(_Z  - a - b RootOf(_Z  + 1, index = 1))
 
> allvalues(%);
                                   1/2            1/2
                          (a + b I)   , -(a + b I)

> solve(x^2=a+b*I,{x});
                                  1/2                  1/2
                    {x = (a + b I)   }, {x = -(a + b I)   }
> convert((a+b*I)^(1/2),RootOf);
                    2                  2
           RootOf(_Z  - a - b RootOf(_Z  + 1, index = 1), index = 1)
 
> RootOf(_Z^2-a-b*RootOf(_Z^2+1,index = 1));
                         2                  2
                RootOf(_Z  - a - b RootOf(_Z  + 1, index = 1))
 
> allvalues(%);
                                   1/2            1/2
                          (a + b I)   , -(a + b I)

> solve(x^2=a+b*I,{x});
                                  1/2                  1/2
                    {x = (a + b I)   }, {x = -(a + b I)   }

How do you wish to tell Maple to "regard" x-1 as a difference of cubes?

Substituting x=a^3, factoring, and then inverting that substitution on x, is one way. Here is one other way.

> factor(x-y^3,x^(1/3));
                      2      (1/3)    (2/3)         (1/3)
                    (y  + y x      + x     ) (-y + x     )
 
> eval(%,y=1);
                            (1/3)    (2/3)         (1/3)
                      (1 + x      + x     ) (-1 + x     )
 
> factor(x-y^5,x^(1/5));
          4    3  (1/5)    2  (2/5)      (3/5)    (4/5)         (1/5)
        (y  + y  x      + y  x      + y x      + x     ) (-y + x     )
 
> eval(%,y=1);
                   (1/5)    (2/5)    (3/5)    (4/5)         (1/5)
             (1 + x      + x      + x      + x     ) (-1 + x     )

Did you intend the assumption Tcr>o, or did you intend Tcr>0 instead?

Did you intend the assumption Tcr>o, or did you intend Tcr>0 instead?

Someone corrected the mistake "Fred Turing" in the text body (google has a cached copy). But the graph still has the error.

It must surely be a bug, that the table of contents is no longer (as of Maple 12) expanded automatically to match the page displayed (first page from the search results).

BTW, I find it unhelpful that searching for Int pulls up the help-page for MTM[Int] in Maple 12. What will the new user make of that?

It must surely be a bug, that the table of contents is no longer (as of Maple 12) expanded automatically to match the page displayed (first page from the search results).

BTW, I find it unhelpful that searching for Int pulls up the help-page for MTM[Int] in Maple 12. What will the new user make of that?

That reminded me a bit of Gandalf at the council of Elrond, when he ruled himself out as a candidate to take the One Ring to Mordor.

First 72 73 74 75 76 77 78 Page 74 of 81