Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #237

Supressing Set statements

From "I.N. Galidakis" <morpheus@olympus.mons>
Newsgroups comp.soft-sys.math.maple
Subject Supressing Set statements
Date 2011-09-16 23:27 +0300
Organization Chaos ->|<- http://ioannis.virtualcomposer2000.com/
Message-ID <1316204866.109484@athprx04> (permalink)

Show all headers | View raw


Hi everyone,

Does anyone know how to suppress set statements on the output?

I have the following declarations in Maple 9:

E:={}:#board encodings

and later on, in a procedure, I augment E by the current board encoding:

> move:=proc(p,q,n,c1,r1,c2,r2)
> global E;
> if p[c1,r1]<>[] then
>  if n<>0 then rotate(p,c1,r1,n);fi;
>  if fits(p,q,c1,r1,c2,r2) then
>   q[c2,r2]:=p[c1,r1];#set to puzzle
>   p[c1,r1]:=[];#remove from board
>   print("moving:",n,c1,r1,"->",c2,r2);
>   stack[push]([n,c1,r1,c2,r2], S);#push into stack of moves
>   E:=E union {enc(q)}:#add new state to set of states
>  else
>   print("Illegal move!");
>  fi;
> else
>  print("Source is empty!");
> fi;
> end:

In my loop, I call:

> while pef(q)<202 do
> gen(p,q);#creates G
>  while G=[] do
>   undo(p,q):
>   gen(p,q):
>  od;
>  bm:=pick(p,q):
>  while bm=0 do
>   undo(p,q):
>   gen(p,q):
>   bm:=pick(p,q):
>  od;
>  #print("Picking move in G:",bm,nops(NE));
>  #print("Generated:",G);print("New States:",NE);
>  move(p,q,G[bm][1],G[bm][2],G[bm][3],G[bm][4],G[bm][5]):
> od;

When I run the above loop, I get a repeated and growing set E on the output,
DESPITE having supressed all statements relating to E, which I don't want to see
(unless I am debugging) because it contains very big numbers, is very big in
size and slows Maple down a lot, because this is a puzzle search, so it can take
zillions of tries.

How can I suppress the output of the set E?

Maybe if I declare it as something else? A list?

Thanks,
--
I. 

Back to comp.soft-sys.math.maple | Previous | NextNext in thread | Find similar


Thread

Supressing Set statements "I.N. Galidakis" <morpheus@olympus.mons> - 2011-09-16 23:27 +0300
  Re: Supressing Set statements Joe Riel <joer@san.rr.com> - 2011-09-16 15:41 -0700
    Re: Supressing Set statements "I.N. Galidakis" <morpheus@olympus.mons> - 2011-09-17 02:13 +0300
  Re: Supressing Set statements Philo D <doozy@earthling.net.invalid> - 2011-09-17 07:54 -0600

csiph-web