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


Groups > comp.soft-sys.math.mathematica > #6745 > unrolled thread

sublist clearing

Started byborges2003xx <borges2003xx@gmail.com>
First post2011-11-25 09:54 +0000
Last post2011-11-25 09:54 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  sublist clearing borges2003xx <borges2003xx@gmail.com> - 2011-11-25 09:54 +0000

#6745 — sublist clearing

Fromborges2003xx <borges2003xx@gmail.com>
Date2011-11-25 09:54 +0000
Subjectsublist clearing
Message-ID<janok2$app$1@smc.vnet.net>
I need to clear a list in which there are two sublist ,not overlapping
with a property
i.e., in this case,equals and with length >= 2)
mm[{___, b1__, ___, b1__, ___}] := {} /; Length[{b1}] >= 2

or for example 2 sublists, with a similarity function equal 0 and
Legth = 4
mm[{___, b1__, ___, b2__, ___}] := {} /;
  NeedlemanWunschSimilarity[{b1}, {b2}] == 0 && Length[{b1}] == 4 &&
   Length[{b2}] == 4
and so on.....

For mathematica, guru who know internal algorithm is there a faster
way, perhaps using PatternTest (?).

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web