acer

32333 Reputation

29 Badges

19 years, 323 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

From where did you get these RootOf expressions? Please provide full details.

 

In my answer to your previous question I showed how you can add a point-plot.

@Mac Dude A .mla file is not a package! It is a container that can store Maple things, such as expressions, tables, procedures, and... modules. The letters stand for Maple Library Archive.

A module may have `option package`, in which case its exports can be rebound using the with command. But that is not really relevant to what you're trying to do with Records.

A Record is implemented as a special kind of module. An object is implemented as another special kind of module.

A module cannot generally be stored within just a single .m file, as that "dot m" format doesn't provide for storing more than just the shell of the module.

That is why module based packages (eg. LinearAlgebra, Statistics, etc) are stored in .mla Library archives. (The .mla contains many things, each respectively in its own .m representation. The module shell in one, and its exports and locals in others individually.)

So, I was thinking that (possibly if all the entries have been referenced as some point in the session) a Record might be stored in full within a .mla file. There may be difficulties (related to those with deep copying), if the Record contains other Records.

If something is stored within a .mla (using LibraryTools:-Save) then it can be accessed simply by referencing its name, given that the .mla is in libname.

A single .mla file can be used to store multiple things. You can utilize it to store many different procedures, modules, expressions, etc.

But since its stored contents are accessible by name as soon as the .mla is in libname then the burden of managing the global name-space rests on you. If you have many such Records then you may wish to keep them within some parent named data-structure, since storing them each by name can clutter your name-space.

Have you tried using LibraryTools to store it in a .mla Library archive?

Please post your followup example(s) on this topic as a comment here (or on one of your other question threads on this topic), rather than start a new thread.

@Carl Love Access to documents (when online) is not what I meant. That is highly desirable.

But consider:

  • having a full Maple computational kernel, locally
  • having full Maple interface features (manual rotation and full interoperability with plots, popup menus, etc)
  • animations computed, stored, and displayed from structures held locally -- no delays while a mere image format is squeezed down an internet connection
  • the ability to work when offline

and so on. That's what I want on my smartphone, tablet, and chromebook.

A browser based interface is not intrinsically poor. But for dynamic computation and visualization it can be so much better if it has the means/functionality/choice to switch seamlessly to a full local computational kernel.

@ecterrab I am sure you are misunderstanding my points entirely.

I am talking about the number of all the ARM chromebooks and ARM smartphones in this world, and you are talking about the number of all the Raspberry Pis.

I did not state that Maple on the R.Pi was of little interest, or anything like that. But it's value could easily be dwarfed by the impact of full ARM port on other devices with that chipset.

@Regnar Andersen No, it's not enough to support the operating system. The executables also need to be compiled with the ARM CPU as target. That might well involve considerable effort.

Anyway... I'd be far more interested in Maple's kernel on ARM chromebooks and phones than I would be about it on the Pi.

(I'm also waiting for the world's infatuation with thin clients and the cloud to end.)

@David Sycamore He means that if you made the retro-edit for the ++ syntax, and if you also actually include and execute the code for procedure PP, then his P and PPrime procedures produce that output in Maple 2017.

If you forget to include and execute the code for PP then PPrime will not return false as desired, and all you'll get from P(50) are the primes from to 2 to 47.

restart;

kernelopts(version);

`Maple 2017.2, X86 64 LINUX, Jul 19 2017, Build ID 1247392`

PP:=proc(n::posint, kmin::posint, L::list(prime), nSolMax::posint)
# Prime partitions with elements >= kmin, starting with L
local Sol:=table(), nSol:=0, E;

E:=proc(L)
local p,sL:=add(L);
if L<>[] then p:=L[-1] else p:=nextprime(kmin-1) fi;
while p+sL<=n and nSol<=nSolMax do
  if p+sL=n and nSol<nSolMax then nSol:=nSol+1; Sol[nSol]:=[L[],p] fi;
  if nSol>=nSolMax then return fi;  
  E([L[],p]);
  p:=nextprime(p);
od;
end:

if L<>[] and add(L)=n then nSol:=nSol+1; Sol[nSol]:=L fi;   
E(L);
entries(Sol,nolist);
end:

SingPrime:=proc(p::prime,n::posint)  
# there exist only 1 PP starting with p
evalb(nops([PP(n,p,[p],2)])=1)
end:

Q := proc(n)    # list of SingPrime's
local p, P:=select(isprime, [seq(1..n)]);
select(SingPrime, P, n)
end:

PPrime:=proc(p::prime,n::posint)  
evalb(nops([PP(n,p,[p],1)])=1)
end:

P := proc(n)
local p, P:=select(isprime, [seq(1..n)]);
select(PPrime, P, n)
end:

P(50);

[2, 3, 5, 7, 11, 13, 19]

 

Download vv_PP.mw

 

Show the solutions to the equations, which you obtained.

You can use the green up-arrow in the Mapleprimes editor to upload and attach a .mw worksheet.

With which part of that question are you having difficulty?

Could you simply not be bothered to type it in?

You only need to type 7 characters into Maple, and it takes less than a millisecond to compute.

(16 characters are adequate if you want something that scales efficiently with the size of the problem).

@bnpndxtrwp The procedure ContoursWithLabels expects an expression, for which you may pass an unevaluated call to your procedure11.

Note the use of unevalution quotes, ie, single right-quotes.

contour_plot_issue_BP_Mapleprimes_ac.mw

@shahri Why, oh why, would you wait until your fourth message in this thread (Question, and then third Reply) to include an extra equation which must be satisfied by a solution to the system?

@shahri Your statement that (dependent name) "k is neither variable not parameter" strikes me as being nonsense.

@Lali_miani You have not addressed all the queries and points which I mentioned and which I consider to be central in order to be able to make a proper start on your problem.

First 189 190 191 192 193 194 195 Last Page 191 of 591