MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Element test

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61217] Re: Element test
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 13 Oct 2005 01:39:28 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dii8pd$9cq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

what may MemberQ[] do ??
Element[] is for infinite/uncountable quantities.

Regards
  Jens

"leigh pascoe" <leigh at cephb.fr> schrieb im 
Newsbeitrag news:dii8pd$9cq$1 at smc.vnet.net...
| Dear Group,
|
| I have a defined a graph that is a function of 
n, gr1[n], with n^2 +4
| vertices and 2n(n+1) edges.
|
| I would like to remove some edges from this 
graph, corresponding to all
| edges leading to the vertices in the set 
list[n]. Since Ma doesn't seem
| to have a PERL like Foreach construct, I tried 
something like the following:
|
| In[42]:=
| Do[If[Element[i,list[6]],
|    ShowGraph[test=DeleteEdges[gr1[6],{{{i,j}} 
,{ j,1,40}}],
|      VertexNumber\[Rule]True]],{i,1,40}]
|
| Unfortunately this doesn't work. The problem 
(apart from possible syntax
| errors) seems to lie in the fact that
|
| Element[i, list[6]] never evaluates to True. For 
a specific example
| using the list {4,2,9,39,40},
|
| In[33]:=
| Element[39,list[6]]
| Out[33]=
| 39\[Element]{4,2,9,39,40}
|
| whereas the similar statement
|
| In[27]:=
| 149\[Element]Primes
| Out[27]=
| True
|
| How can I delete the edges to the vertices in 
list[n] from my graph?
|
| Thanks
|
| LP
| 



  • Prev by Date: Re: fourier transform
  • Next by Date: Re: "Leibnitz" from for partial differentiation?
  • Previous by thread: Re: Element test
  • Next by thread: Re: Re: Element test