Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6745 > unrolled thread
| Started by | borges2003xx <borges2003xx@gmail.com> |
|---|---|
| First post | 2011-11-25 09:54 +0000 |
| Last post | 2011-11-25 09:54 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
sublist clearing borges2003xx <borges2003xx@gmail.com> - 2011-11-25 09:54 +0000
| From | borges2003xx <borges2003xx@gmail.com> |
|---|---|
| Date | 2011-11-25 09:54 +0000 |
| Subject | sublist 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 (?).
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web