SGJanssens

Mr. Sebastiaan Janssens

125 Reputation

9 Badges

17 years, 298 days
Utrecht University
Netherlands

MaplePrimes Activity


These are questions asked by SGJanssens

Hello all,

The following minimal worksheet leads to a "Kernel Connection Lost" message. At seemingly random times, I get a `System error, `, "bad id" message in the worksheet output instead.

Temporarily disabling ESET Internet Security did not help. Before I contact technical support, I would like to ask if there is anything obvious that I am overlooking that could cause this problem.

Thank you very much.

kernelopts(version);

`Maple 2021.1, X86 64 WINDOWS, May 19 2021, Build ID 1539851`

(1)

with(Iterator):

P := CartesianProduct([1,2,3,4],[1,2,3,4]):

add(p,p in P);


Download Minimal.mw

As an example, the two-dimensional Array created by

A := Array(triangular[upper], 1..100, 1..100);

has both indexing function and storage "triangular[upper]", which is fine. However, the attempt

B := Array(triangular[upper], 1..100, 1..100, 1..100);

to make a three-dimensional analogue did not work: It returns "Error, triangular[upper] indexing is only valid with 2 dimensions". A similar error message is returned when I replace "triangular[upper]" by "symmetric".

(For definiteness, by a higher-dimensional symmetric Array I would like to understand an Array with entries that are invariant under every permutation of their indices. Similarly, I would call the Array upper-triangular if only its entries with non-decreasing indices can be non-zero.)

For a first solution attempt, I mimic a higher dimensional upper-triangular Array by instead creating a multiply nested one-dimensional Array, where the one-dimensional subarrays become shorter and shorter. I did some preliminary testing with CodeTools[Usage] and the memory and timing results seem to compare favorably to naively using standard rectangular Arrays.

It seems more natural to write my own indexing function. However, I am not sure how to write a suitable corresponding storage function, as the documentation on that latter subject mentions only Vectors and Matrices. Is it possible and advisable to write my own storage function, or is there yet another more natural and memory-efficient way to store higher-dimensional structured Arrays (with symbolic data) in Maple? 

Thank you very much for any insights, particularly documentation pointers.

Sebastiaan Janssens.

 

Page 1 of 1