Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

A SubListQ function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28546] A SubListQ function?
  • From: AGUIRRE ESTIBALEZ Julian <mtpagesj at lg.ehu.es>
  • Date: Wed, 25 Apr 2001 19:21:53 -0400 (EDT)
  • Organization: Universidad del Pais Vasco/Euskal Herriko Unibertsitatea
  • Sender: owner-wri-mathgroup at wolfram.com

Given two lists a and b, how can I find if a is contained in b? I have
tried

	Complement[a, b] == {}

	Intersection[a, b] == a

	And@@(MemberQ[#,b]&/@a)

They work, but are not very efficient. Is there a better way?

Thanks in advance,

Julian Aguirre
Universidad del Pais Vasco



  • Prev by Date: nxn matrix into point coordinate
  • Next by Date: Mathematica 3.0 and AxesLabel
  • Previous by thread: Re: nxn matrix into point coordinate
  • Next by thread: Re: A SubListQ function?