Arrays of Boolean variables

15 views
Skip to first unread message

Santanu Sarkar

unread,
Feb 26, 2013, 8:50:59 PM2/26/13
to sage-s...@googlegroups.com
Dear all,
   I need two arrays of Boolean variables. So I have written

R=BooleanPolynomialRing(20000,['x%d'%(i+1) for i in range (10000)]+,['y%d'%(i+1) for i in range (10000)] )
R.inject_variables()

Now in one array A, I want to store x1,..,x10000 and in another array B want to store
y1,..y10000.  Hence  A=[x1,.., x10000] & B=[y1,..,y10000]. How this can be possible?

Also function R.inject_variables() explicitly shows the variables, which I do not want.
Is there any way to tackle this? 

 

Santanu Sarkar

unread,
Feb 27, 2013, 1:33:32 AM2/27/13
to sage-s...@googlegroups.com
Dear all, 
  Using R.variable(), I can solve the first problem. 

Martin Albrecht

unread,
Feb 27, 2013, 5:09:26 AM2/27/13
to sage-s...@googlegroups.com
A = R.gens()[:10000]
B = R.gens()[10000:]
Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de
Reply all
Reply to author
Forward
0 new messages