Carl Love

Carl Love

25319 Reputation

25 Badges

10 years, 237 days
Natick, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are replies submitted by Carl Love

@ianmccr The correct quotation marks are `$`, not '$'.

To approximately handle the situation "as x tends to infinity", set ub to a finite value such as 5. Then redo with ub=10 (for example). If the values of a1a2a3 do not change significantly, then you'll know that you're converging on the limit as x -> infinity.

After the values are extracted from the list, where would you like them to be put?

@nm You wrote:

  • So having "export" on ModuleCopy in the child was the problem.

Yes, and it's mostly just a syntactic problem: Anything that's local or export in the parent is considered to be already declared in the child, including keyword procedure names like ModuleCopy.

  • Then the child constructor (since it overwrote the base class constuctor method) has now to duplicate all this work. right?

Amazingly, no, it's not overwritten. On help page ?object,create, the 3rd paragraph of the subsection "Inheritance" is this extremely cryptic paragraph:

  • Static members will be shared with the base class, or not, depending on the value they have in the base class. Static members whose value is a procedure or module with a ModuleApply function (methods) will be reinstantiated in the derived class. All other static members (i.e. data members) will be shared with the base class.

This is saying that when a procedure (or appliable module) is declared static in the parent and reassigned in the child, it is not overwritten; rather, the child gets its own static procedure distinct from the parent.

  • It would be better if Maple OOP allowed child class constructor to call base class constructor directly as in Java and C++ and all other OOP languages.

The child is allowed to invoke the parent's copy of any redefined procedure by using the module-prefix (:-) syntax. According to the 7th paragraph from the same subsection:

  • A method in a derived class that replaces an inherited method can invoke the base class' method by calling it explicitly. For example, a method M inherited by class T from class T0 but then reassigned in T, can call the original method using T0:-M().

I believe these 8 paragraphs are the only documentation of inheritance. It's shocking that the Examples section of this help page doesn't have any example of inheritance.

@vs140580 Your code looks fine, very close to what I would've done. I don't know enough to address your other questions regarding scaling at the moment. Don't "massage the data" too much trying to raise R^2.

@lcz I don't see how splitting the file into multiple files could possibly help.

What's the byte count of the large file? Even if it's 100 Mb, it'd easily fit in Maple's memory as, say, an array of strings, one string for each line.

@sursumCorda Christian's concluding Answer, essentially evala(Algfield(bSol))[3]is exact and symbolic. For this reason, I've promoted his Reply to an Answer and given it a vote up.

@vs140580 Are you literally asking how to apply the function x-> (x - xmin)/(xmax - xmin) (linear projection onto the unit interval) to each column of a matrix? I insist that you try this on your own and post the results here. If you can't do this, you haven't been learning from the many, many Answers I've written for you over the years. I'm not saying that you should be able to write the best possible code to do this task, but you should be able to come up with something.

@sand15 The issue is not caused by eval but rather by signum, for which there's a quite-elaborate and user-definable mechanism for evaluating signum(0). See ?signum.

You cannot hold the int command accountable for errors caused by symbolic substitutuons that you make after the int command is finished.

The definite integral of over any space whatsoever for which integration can be defined is 0. Were it not so, integration wouldn't be a linear operator. If it's not a linear operator, the whole theory of integration falls apart.

Maple commonly expresses things in a sum-over-the-roots-of-some-polynomial form. I think this much more clearly shows the underlying structure of an expression than an array of explicit roots would. For those cases where the roots can be exactly specified, it's easy to convert to that form.

@Pi If M is a matrix (such as I defined above), then the values that you want can be accessed as M[i,j].

Yes, I'd say that it's a bug. Your graph G__0 is acyclic (confirmed both by GraphTheory:-IsAcyclic and visually), so the edges of its transistive reduction should be a subset of the edges of G__0. Here's G__0:


The ability to express these things (referring to this and your previous Posts using implicitplot3d) as implicit equations is mathematically "interesting", but I don't think that it's particularly useful for plotting. Much better 3d plots can usually be obtained from parametric representations.

@lcz If G is a directed acyclic graph (DAG), then its transistive reduction

  1. is unique,
  2. is a subgraph of G,
  3. can be computed in polynomial time.

But if G has a directed cycle, then none of those 3 things are necessarily true.

@acer Nesting elementwise operators by folding index (which is a kinder, gentler variation of `?[]`) is a great idea. Here's what I came up with:

`&~`:= (f, n::nonnegint)-> foldr(index, f, `~`$n):

Usage example:

(convert &~ 2)(fasteners, unit_free)

3 4 5 6 7 8 9 Last Page 5 of 657