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


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

sublist clearing

From borges2003xx <borges2003xx@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject sublist clearing
Date 2011-11-25 09:54 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <janok2$app$1@smc.vnet.net> (permalink)

Show all headers | View raw


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 (?).

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web