Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

RE: Re: faster sublist checking

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48880] RE: [mg48874] Re: faster sublist checking
  • From: "David Park" <djmp at earthlink.net>
  • Date: Tue, 22 Jun 2004 05:31:15 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Al,

In 5.0.0 I obtain True for the last result. Try evaluating with a fresh
notebook.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: JMyers6761 [mailto:jmyers6761 at aol.com]
To: mathgroup at smc.vnet.net

Why is this?

A = {3, 5}; B = {1, 2, 3, 4, 5, 6, 7};

Intersection[B, A] == Sort[A]
True

but

SublistQ[B_List, A_List] := Intersection[B, A] == Sort[A];

SublistQ[B, A]
False

Al Myers




  • Prev by Date: Bug in FromDate
  • Next by Date: Re: faster sublist checking
  • Previous by thread: Re: Re: faster sublist checking
  • Next by thread: Re: faster sublist checking