<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>There is probably more here you are unaware of. I strongly urge you to read more.<div><br></div><div><br></div><div>Here are some important points:</div><div><br></div><div><br></div><div>1) The complexity of basically everything in STL is documented, part of the interface.</div><div>The cost of adding to a vector. To a list. To a set.</div><div>And btw, they specify which container modifications invalidate iterators.</div><div><br></div><div><br></div><div>2) The fact that quicksort requires a random access iterator is documented and checked at runtime.</div><div><br></div><div><br></div><div>If I try something like:</div><div>std::list<int> a;</div><div>std::sort(a.begin(), a.end());</div><div><br></div><div><br></div><div>I believe I get a compilation error.</div><div>Historically maybe not a good one, but it is a popular area to complain about and compiler/library writers have made progress.</div><div><br></div><div><br></div><div>There are some holes in the library.</div><div>For example, binary_search returns a boolean, not the item found. That bothers me.</div><div>But you are supposed to use lower_bound instead.</div><div><br></div><div>It isn't as obvious imho as it should be how to bulk add to containers, and how to bulk add sorted items to a container.</div><div><br></div><div><br></div><div>OO certainly shouldn't require heap.</div><div>This is a failing of Modula-3.</div><div>The OBJECT/METHOD sytax is decent.</div><div>Optional garbage collection is good.</div><div>But I should be able to separate them.</div><div>Without resorting to putting function pointers in records..which isn't so bad, but the nice thing about "METHOD" (and virtual function pointers) is the implied/automatic/cheap/safe downcast of the "this" pointer. With function pointers in structs/records, you have some chance of not needing a cast, but it is very very common in both C++ and Modula-3 for their to be, again, that implied/automatic/cheap/safe downcast.</div><div><br></div><div><br></div><div>I should spend some time applying the STL design to Modula-3 and see if the language supports it. But I'm too busy right now. :(</div><div><br></div><div><br></div><div> - Jay<br><br><br><div><div id="SkyDrivePlaceholder"></div>> To: jay.krell@cornell.edu<br>> Date: Sat, 29 Sep 2012 13:10:33 -0700<br>> From: mika@async.caltech.edu<br>> CC: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] STL algorithms? sort/unique?<br>> <br>> <br>> Yeah, OK, you could do this with GENERICs as well, by introducing<br>> a convention.  (In fact there is already one, t.iterate.)<br>> <br>> I still say it's a bit of a bug.  If you have very generic methods that<br>> can take different orders of time, then applying quicksort to a data structure<br>> with high time complexity for those methods won't be very quick at all (except<br>> to type).  It can be very misleading unless you really know how everything <br>> hangs together under the covers.  I think that's the C/C++ mentality in general...<br>> <br>> (BTW I think C++ is a truly impressive programming language.  The way you can do OO <br>> programming without using the heap is really impressive.  I just don't trust<br>> myself, or anyone I know, to use it right.  When even Stroustrup writes in his book,<br>> about certain features, "ask an expert if you want to do this" you have to wonder.)<br>> <br>> Jay K writes:<br>> >--_13e6ee6a-034c-469d-aa83-18379d050866_<br>> >Content-Type: text/plain; charset="iso-8859-1"<br>> >Content-Transfer-Encoding: quoted-printable<br>> ><br>> > > The separation of algorithms from containers sounds a bit like a bug.<br>> >It isn't. It is a leap that allows for far greater code reuse. Efficiently.=<br>> >(You could do it inefficiently with lots of function pointers -- templates =<br>> >allowfor inlinability. C++ beats C for performance here.)<br>> ><br>> >Imagine I have written quicksort.In C++ we have at least the following wort=<br>> >hwhile "array-like" data structures:<br>> ><br>> >  The builtin arrays. Like Modula-3 fixed arrays.<br>> ><br>> >  Arrays you get with new[]. Like Modula-3 open arrays=2C but they don't ex=<br>> >pose their size.<br>> ><br>> >  std::vector<>. Like Modula-3 "sequence" -- a simple growable array. Grows=<br>> > by a constant factor greater than 1 (typically 2)=2C so that long runs of =<br>> >"appends" are amortized cheap.<br>> ><br>> >  std::deque<>. More like Modula-3 sequence=2C in that you can amortized ch=<br>> >eap at/remove from the front or the back. I believe this can be implemented=<br>> > as simply an "offset array". Element 0 starts in the middle=2C and wheneve=<br>> >r you grow it=2C you "center" it -- equal gaps at front and back.<br>> ><br>> >Now=2C with the iterator/algorithm separation=2C one quicksort implementati=<br>> >on can be applied to all these types. The input to "quicksort" is "random a=<br>> >ccess iterators"=2C which is very much like a "pointer"=2C but isn't necess=<br>> >arily a pointer. It can be incremented=2C decremented=2C added to an intege=<br>> >r=2C subtracted from another iterator=2C have an integer subtracted from it=<br>> >=2C dereferenced=2C and assigned and compared with other iterators of the s=<br>> >ame type -- all constant time fast operations.<br>> ><br>> >There are "input iterators" which can=2C roughly speaking=2C only be increm=<br>> >ented and dereferenced. They are all some containers can expose and all som=<br>> >e algorithms require -- for example=2C a singly linked list and linear sear=<br>> >ch.<br>> ><br>> >There are "bidirectional iterators" which can=2C roughly speaking=2C only b=<br>> >e incremented and decremented and dereferenced. Doubly linked lists expose =<br>> >these.<br>> ><br>> >There are "output iterators".They are similar to "input".<br>> ><br>> >input streams (cin=2C like stdin) exposes an input iterator.You can copy fr=<br>> >om it.Copy is another simple reusable algorithm.<br>> ><br>> >output streams (cout=2C like stdout) exposes an output iterator.You can cop=<br>> >y to it.<br>> ><br>> >There are many more examples.Of course=2C besides quick sort=2C there is a =<br>> >stable sort.There is finding sequences.There is binary_search.There is uppe=<br>> >r_bound/lower_bound/equal_range which are like binary_search.There is uniqu=<br>> >e.There is partition.Many many more=2C "built in" to the library.That work =<br>> >with multiple "built in" containers=2C and can work with custom containers =<br>> >as well.<br>> ><br>> >I strongly recommend you read up on this stuff.It is really quite illimunin=<br>> >ating. Good stuff.Teaches us how to better factor our code.And to strive fo=<br>> >r better factoring=2C when we find people have invented/discovered such thi=<br>> >ngs.<br>> ><br>> >"Iterators" already do occur in Modula-3 libraries.<br>> ><br>> >All I want is a sorted vector that "closely knows" when it is being written=<br>> > vs. read=2C and when there are a series of writes with no intervening read=<br>> >s=2C it can amortize down the cost of maintaining the ordering.<br>> ><br>> >I hand coded something.It took me a while to get it to work due to stupid s=<br>> >mall details.The result is significantly worse than I would have gotten in =<br>> >C++.Bigger code. Slower code. More copies. More heap allocations.I can elim=<br>> >inate one of the allocations by merging the next step.But in C++ I naturall=<br>> >y wouldn't have had it anyway.Not great.<br>> ><br>> > - Jay<br>> ><br>> ><br>> >> To: jay.krell@cornell.edu<br>> >> CC: mika@async.caltech.edu=3B m3devel@elegosoft.com<br>> >> Subject: Re: [M3devel] STL algorithms? sort/unique?<br>> >> Date: Sat=2C 29 Sep 2012 11:29:48 -0700<br>> >> From: mika@async.caltech.edu<br>> >>=20<br>> >>=20<br>> >> Well that depends on how you maintain the vector=2C no?<br>> >>=20<br>> >> SortedTable uses "treaps" which are supposed to be good data structures.<br>> >> Too new to have made it into Knuth=2C last I checked.  The amortized cost<br>> >> of your operations shouldn't be much worse than with your method=2C with<br>> >> the additional benefit that the sorted order is maintained dynamically.<br>> >>=20<br>> >> The separation of algorithms from containers sounds a bit like a bug.<br>> >> You have to be careful so you don't shoot yourself in the foot there!<br>> >> (Sorting a list using an algorithm that randomly accesses elements=2C<br>> >> say...)<br>> >>=20<br>> >> The Modula-3 approach is that you figure out what you want to do=2C pick<br>> >> the ADT you want that provides the minimal set of operations=2C import<br>> >> that interface=2C then instantiate a more carefully chosen implementation<br>> >> of the ADT.  The language itself obviously can be coaxed into supporting =<br>> >the<br>> >> algorithm/data structure separation but no one uses it that way as<br>> >> far as I know.  (Modula-3 generics are not that well explored=2C actually=<br>> >.<br>> >> I suspect there are many things you can do with them that no one has<br>> >> tried.)<br>> >>=20<br>> >>      Mika<br>> >>=20<br>> >> Jay K writes:<br>> >> >--_7877d7e8-cb4a-4989-bdcd-d406e5b1f51f_<br>> >> >Content-Type: text/plain=3B charset=3D"iso-8859-1"<br>> >> >Content-Transfer-Encoding: quoted-printable<br>> >> ><br>> >> >The following is very efficient:<br>> >> ><br>> >> >run through a bunch of records=3D2C picking out one number from some of =<br>> >thema=3D<br>> >> >ppend those numbers to a growing vectorsort the vectorunique the vector<br>> >> ><br>> >> >sequence allows for random access..but only via a function...or maybe an=<br>> > it=3D<br>> >> >erator<br>> >> ><br>> >> >STL has this wonderful separation of algorithms from containers=3D2C via=<br>> > iter=3D<br>> >> >ators.I suspect very few other libraries do.And it could be that most la=<br>> >ngu=3D<br>> >> >ages don't support it.It doesn't appear I can easily sort a sequence=3D2=<br>> >C unl=3D<br>> >> >ess I copy the data out into an array -- gross inefficiency.<br>> >> ><br>> >> >I've hacked something very manual together..and it is taking forever to =<br>> >get=3D<br>> >> > it to work.  It turns out I can reasonably well bound the size of the d=<br>> >ata=3D<br>> >> >=3D2C so I'm using an open array...and I have to keep track of my positi=<br>> >on in=3D<br>> >> >stead of using addhi/push_back.Not happy.At some point I might give up a=<br>> >nd =3D<br>> >> >write the backend in C++..at which point I might as well write a C++ fro=<br>> >nte=3D<br>> >> >nd anywa.<br>> >> ><br>> >> ><br>> >> >I absolutely do not want a sorted table and unique upon insert.That is m=<br>> >uch=3D<br>> >> > less efficient.What I'm describing uses temporarily larger working set =<br>> >but=3D<br>> >> > vastly less CPU.An array that gets sorted/uniqued occasionally=3D2C lik=<br>> >e jus=3D<br>> >> >t once.And not ongoing maintainence for every single add.<br>> >> ><br>> >> ><br>> >> > - Jay<br>> >> ><br>> >> ><br>> >> >> To: jay.krell@cornell.edu<br>> >> >> CC: m3devel@elegosoft.com<br>> >> >> Subject: Re: [M3devel] STL algorithms? sort/unique?<br>> >> >> Date: Fri=3D2C 28 Sep 2012 01:04:48 -0700<br>> >> >> From: mika@async.caltech.edu<br>> >> >>=3D20<br>> >> >>=3D20<br>> >> >> BTW I had the same experience when I first started using Modula-3.<br>> >> >> It was painful to jump through all its hoops=3D2C coming from C=3D2C w=<br>> >here yo=3D<br>> >> >u<br>> >> >> can do whatever you want to whatever bits happen to be sloshing around<br>> >> >> your machine.  C++ from what I have seen mainly lets you do that to<br>> >> >> more bits in fewer lines of code.<br>> >> >>=3D20<br>> >> >> But after a while I really came to appreciate the value of things like=<br>> > th=3D<br>> >> >e<br>> >> >> language's telling me I'm using the wrong data structure instead of<br>> >> >> just letting me use the same "nice=3D2C terse=3D2C efficient" syntax t=<br>> >o write<br>> >> >> a crappy program :-)<br>> >> >>=3D20<br>> >> >> mika writes:<br>> >> >> >You're using the wrong (abstract) data structure if you want sort and=<br>> > un=3D<br>> >> >ique.<br>> >> >> ><br>> >> >> >A "sequence" is meant to be accessed sequentially...<br>> >> >> ><br>> >> >> >Not knowing precisely what you're doing it sounds like you might want=<br>> > a<br>> >> >> >SortedTable... you can get unique on insert and access it in increasi=<br>> >ng<br>> >> >> >or decreasing order.<br>> >> >> ><br>> >> >> >    Mika<br>> >> >> ><br>> >> >> >Jay K writes:<br>> >> >> >>--_d2a02ece-d492-410e-88fb-fb53737d7219_<br>> >> >> >>Content-Type: text/plain=3D3B charset=3D3D"iso-8859-1"<br>> >> >> >>Content-Transfer-Encoding: quoted-printable<br>> >> >> >><br>> >> >> >>    I have an IntSeq.T with a bunch of integers.   =3D3D20<br>> >> >> >>    What is a good terse efficient idiom for sort and unique?   =3D3=<br>> >D20<br>> >> >> >><br>> >> >> >>    In C++ I would say:        vector<int> a=3D3D3B        a.push_ba=<br>> >ck(..=3D<br>> >> >.)=3D3D3B =3D3D<br>> >> >> >>       a.push_back(...)=3D3D3B        std::sort(a.begin()=3D3D2C a.e=<br>> >nd())=3D<br>> >> >=3D3D3B       =3D3D<br>> >> >> >> a.resize(std::unique(a.begin()=3D3D2C a.end()) - a.begin())=3D3D3B =<br>> >       =3D<br>> >> >for (aut=3D3D<br>> >> >> >>o i =3D3D3D a.begin()=3D3D3B i !=3D3D3D a.end()=3D3D3B ++i)    {<br>> >> >> >>      do stuff with *i    }=3D3D20<br>> >> >> >>    Nice=3D3D2C terse=3D3D2C efficient.        In Modula-3?   =3D3D2=<br>> >0<br>> >> >> >><br>> >> >> >>I know that unique is one of the easiest algorithms to manually writ=<br>> >e i=3D<br>> >> >nlin=3D3D<br>> >> >> >>e=3D3D2Cbut I shouldn't have to.<br>> >> >> >><br>> >> >> >>(I'm really trying to stay in Modula-3 here=3D3D2C but it is definit=<br>> >ely a=3D<br>> >> > strug=3D3D<br>> >> >> >>gle. :( )<br>> >> >> >><br>> >> >> >>Thank you=3D3D2C - Jay<br>> >> >> >><br>> >> >> >>                                    =3D3D<br>> >> >> >><br>> >> >> >>--_d2a02ece-d492-410e-88fb-fb53737d7219_<br>> >> >> >>Content-Type: text/html=3D3B charset=3D3D"iso-8859-1"<br>> >> >> >>Content-Transfer-Encoding: quoted-printable<br>> >> >> >><br>> >> >> >><html><br>> >> >> >><head><br>> >> >> >><style><!--<br>> >> >> >>.hmmessage P<br>> >> >> >>{<br>> >> >> >>margin:0px=3D3D3B<br>> >> >> >>padding:0px<br>> >> >> >>}<br>> >> >> >>body.hmmessage<br>> >> >> >>{<br>> >> >> >>font-size: 12pt=3D3D3B<br>> >> >> >>font-family:Calibri<br>> >> >> >>}<br>> >> >> >>--></style></head><br>> >> >> >><body class=3D3D3D'hmmessage'><div dir=3D3D3D'ltr'>&nbsp=3D3D3B &nbs=<br>> >p=3D3D3B&nb=3D<br>> >> >sp=3D3D3BI have =3D3D<br>> >> >> >>an IntSeq.T with a bunch of integers.&nbsp=3D3D3B &nbsp=3D3D3B&nbsp=<br>> >=3D3D3B<br=3D<br>> >> >><div><spa=3D3D<br>> >> >> >>n style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</s=<br>> >pan><span s=3D<br>> >> >tyle=3D3D3D"font=3D3D<br>> >> >> >>-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span>What is a good terse efficie=<br>> >nt idio=3D<br>> >> >m for so=3D3D<br>> >> >> >>rt and unique?<span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D=<br>> >3B &nbsp=3D<br>> >> >=3D3D3B</span><=3D3D<br>> >> >> >>span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span></div>=<br>> ><div><br>=3D<br>> >> ></div><div=3D3D<br>> >> >> >>><br></div><div>&nbsp=3D3D3B &nbsp=3D3D3B In C++ I would say:<span s=<br>> >tyle=3D3D=3D<br>> >> >3D"font-si=3D3D<br>> >> >> >>ze: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D=<br>> >"font-size:=3D<br>> >> > 12pt=3D3D3B ">&=3D3D<br>> >> >> >>nbsp=3D3D3B</span></div><div><span style=3D3D3D"font-size: 12pt=3D3D=<br>> >3B ">&nbs=3D<br>> >> >p=3D3D3B &nbsp=3D3D<br>> >> >> >>=3D3D3B</span><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D=<br>> >3B</span>ve=3D<br>> >> >ctor&lt=3D3D3Bin=3D3D<br>> >> >> >>t&gt=3D3D3B a=3D3D3B<span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbs=<br>> >p=3D3D3B &nbs=3D<br>> >> >p=3D3D3B</span><sp=3D3D<br>> >> >> >>an style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span></div><d=<br>> >iv><span =3D<br>> >> >style=3D3D3D"f=3D3D<br>> >> >> >>ont-size: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=<br>> >=3D3D3D"font=3D<br>> >> >-size: 12pt=3D3D<br>> >> >> >>=3D3D3B ">&nbsp=3D3D3B</span>a.push_back(...)=3D3D3B<span style=3D3D=<br>> >3D"font-siz=3D<br>> >> >e: 12pt=3D3D3B "=3D3D<br>> >> >> >>>&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B ">&n=3D<br>> >> >bsp=3D3D3B</span=3D3D<br>> >> >> >>></div><div><div><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=<br>> >=3D3D3B &nb=3D<br>> >> >sp=3D3D3B</spa=3D3D<br>> >> >> >>n><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span>a.p=<br>> >ush_back(=3D<br>> >> >...)=3D3D3B<sp=3D3D<br>> >> >> >>an style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</=<br>> >span><span =3D<br>> >> >style=3D3D3D"fon=3D3D<br>> >> >> >>t-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span></div><div><span style=3D3D=<br>> >3D"font-s=3D<br>> >> >ize: 12pt=3D3D<br>> >> >> >>=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D"font-si=<br>> >ze: 12pt=3D3D=3D<br>> >> >3B ">&nbsp=3D3D3B<=3D3D<br>> >> >> >>/span>std::sort(a.begin()=3D3D2C a.end())=3D3D3B<span style=3D3D3D"f=<br>> >ont-size:=3D<br>> >> > 12pt=3D3D3B "=3D3D<br>> >> >> >>>&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B ">&n=3D<br>> >> >bsp=3D3D3B</span=3D3D<br>> >> >> >>></div><div><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B=<br>> > &nbsp=3D3D=3D<br>> >> >3B</span><sp=3D3D<br>> >> >> >>an style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span>a.resize=<br>> >(std::uni=3D<br>> >> >que(a.begi=3D3D<br>> >> >> >>n()=3D3D2C a.end()) - a.begin())=3D3D3B<span style=3D3D3D"font-size:=<br>> > 12pt=3D3D3=3D<br>> >> >B ">&nbsp=3D3D3B=3D3D<br>> >> >> >> &nbsp=3D3D3B</span><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbs=<br>> >p=3D3D3B</s=3D<br>> >> >pan></div><d=3D3D<br>> >> >> >>iv><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D=<br>> >3D3B for (a=3D<br>> >> >uto i =3D3D3D a.=3D3D<br>> >> >> >>begin()=3D3D3B i !=3D3D3D a.end()=3D3D3B ++i)</span></div><div><span=<br>> > style=3D3D=3D<br>> >> >3D"font-size=3D3D<br>> >> >> >>: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B {<br>&nbsp=3D3D3B &nbsp=3D=<br>> >3D3B &nbsp=3D3D=3D<br>> >> >3B do stuff with=3D3D<br>> >> >> >> *i</span></div><div><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nb=<br>> >sp=3D3D3B=3D<br>> >> > &nbsp=3D3D3B =3D3D<br>> >> >> >>}</span></div><div>&nbsp=3D3D3B</div><div><br></div><div><span style=<br>> >=3D3D3D=3D<br>> >> >"font-si=3D3D<br>> >> >> >>ze: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D=<br>> >"font-size:=3D<br>> >> > 12pt=3D3D3B ">&=3D3D<br>> >> >> >>nbsp=3D3D3B</span>Nice=3D3D2C terse=3D3D2C efficient.<span style=3D3=<br>> >D3D"font-si=3D<br>> >> >ze: 12pt=3D3D3B =3D3D<br>> >> >> >>">&nbsp=3D3D3B &nbsp=3D3D3B</span><span style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B ">&=3D<br>> >> >nbsp=3D3D3B</spa=3D3D<br>> >> >> >>n></div><div><span style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3=<br>> >B &nbsp=3D<br>> >> >=3D3D3B</span><s=3D3D<br>> >> >> >>pan style=3D3D3D"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B</span>In Modu=<br>> >la-3?<spa=3D<br>> >> >n style=3D3D3D=3D3D<br>> >> >> >>"font-size: 12pt=3D3D3B ">&nbsp=3D3D3B &nbsp=3D3D3B</span><span styl=<br>> >e=3D3D3D"fo=3D<br>> >> >nt-size: 12p=3D3D<br>> >> >> >>t=3D3D3B ">&nbsp=3D3D3B</span></div><div><br></div><div><br></div><d=<br>> >iv>I kn=3D<br>> >> >ow that =3D3D<br>> >> >> >>unique is one of the easiest algorithms to manually write inline=3D3=<br>> >D2C</=3D<br>> >> >div><d=3D3D<br>> >> >> >>iv>but I shouldn't have to.</div><div><br></div><div><br></div><div>=<br>> >(I'=3D<br>> >> >m re=3D3D<br>> >> >> >>ally trying to stay in Modula-3 here=3D3D2C but it is definitely a s=<br>> >trugg=3D<br>> >> >le. :(=3D3D<br>> >> >> >> )</div><div><br></div><div><br></div><div>Thank you=3D3D2C</div><di=<br>> >v>&nb=3D<br>> >> >sp=3D3D3B-=3D3D<br>> >> >> >> Jay</div><br><br></div>                                       </div></body><br>> >> >> >></html>=3D3D<br>> >> >> >><br>> >> >> >>--_d2a02ece-d492-410e-88fb-fb53737d7219_--<br>> >> >                                    =3D<br>> >> ><br>> >> >--_7877d7e8-cb4a-4989-bdcd-d406e5b1f51f_<br>> >> >Content-Type: text/html=3B charset=3D"iso-8859-1"<br>> >> >Content-Transfer-Encoding: quoted-printable<br>> >> ><br>> >> ><html><br>> >> ><head><br>> >> ><style><!--<br>> >> >.hmmessage P<br>> >> >{<br>> >> >margin:0px=3D3B<br>> >> >padding:0px<br>> >> >}<br>> >> >body.hmmessage<br>> >> >{<br>> >> >font-size: 12pt=3D3B<br>> >> >font-family:Calibri<br>> >> >}<br>> >> >--></style></head><br>> >> ><body class=3D3D'hmmessage'><div dir=3D3D'ltr'><div><span style=3D3D"fon=<br>> >t-size: 1=3D<br>> >> >2pt=3D3B ">The following is very efficient:</span></div><div><br></div><=<br>> >div><=3D<br>> >> >br></div><div>run through a bunch of records=3D2C picking out one number=<br>> > from=3D<br>> >> > some of them</div><div>append those numbers to a growing vector</div><d=<br>> >iv>=3D<br>> >> >sort the vector</div><div>unique the vector</div><div><br></div><div><br=<br>> >></=3D<br>> >> >div><div>sequence allows for random access..but only via a function...</=<br>> >div=3D<br>> >> >><div>or maybe an iterator</div><div><br></div><div><br></div><div>STL h=<br>> >as =3D<br>> >> >this wonderful separation of algorithms from containers=3D2C via iterato=<br>> >rs.</=3D<br>> >> >div><div>I suspect very few other libraries do.</div><div>And it could b=<br>> >e t=3D<br>> >> >hat most languages don't support it.</div><div>It doesn't appear I can e=<br>> >asi=3D<br>> >> >ly sort a sequence=3D2C unless I copy the data out into an array -- gros=<br>> >s ine=3D<br>> >> >fficiency.</div><div><br></div><div><br></div><div>I've hacked something=<br>> > ve=3D<br>> >> >ry manual together..and it is taking forever to get it to work.</div><di=<br>> >v>&=3D<br>> >> >nbsp=3D3B It turns out I can reasonably well bound the size of the data=<br>> >=3D2C so=3D<br>> >> > I'm using an open array...and I have to keep track of my position inste=<br>> >ad =3D<br>> >> >of using addhi/push_back.</div><div>Not happy.</div><div>At some point I=<br>> > mi=3D<br>> >> >ght give up and write the backend in C++..at which point I might as well=<br>> > wr=3D<br>> >> >ite a C++ frontend anywa.</div><div><br></div><div><br></div><div><br></=<br>> >div=3D<br>> >> >><div>I absolutely do not want a sorted table and unique upon insert.</d=<br>> >iv>=3D<br>> >> ><div>That is much less efficient.</div><div>What I'm describing uses tem=<br>> >por=3D<br>> >> >arily larger working set but vastly less CPU.</div><div>An array that ge=<br>> >ts =3D<br>> >> >sorted/uniqued occasionally=3D2C like just once.</div><div>And not ongoi=<br>> >ng ma=3D<br>> >> >intainence for every single add.</div><div><br></div><div><br></div><div=<br>> >><b=3D<br>> >> >r></div><div>&nbsp=3D3B- Jay</div><div><br><br><br><div><div id=3D3D"Sky=<br>> >DrivePl=3D<br>> >> >aceholder"></div>&gt=3D3B To: jay.krell@cornell.edu<br>&gt=3D3B CC: m3de=<br>> >vel@ele=3D<br>> >> >gosoft.com<br>&gt=3D3B Subject: Re: [M3devel] STL algorithms? sort/uniqu=<br>> >e?<br=3D<br>> >> >>&gt=3D3B Date: Fri=3D2C 28 Sep 2012 01:04:48 -0700<br>&gt=3D3B From: mi=<br>> >ka@async.=3D<br>> >> >caltech.edu<br>&gt=3D3B <br>&gt=3D3B <br>&gt=3D3B BTW I had the same exp=<br>> >erience w=3D<br>> >> >hen I first started using Modula-3.<br>&gt=3D3B It was painful to jump t=<br>> >hroug=3D<br>> >> >h all its hoops=3D2C coming from C=3D2C where you<br>&gt=3D3B can do wha=<br>> >tever you=3D<br>> >> > want to whatever bits happen to be sloshing around<br>&gt=3D3B your mac=<br>> >hine.=3D<br>> >> >  C++ from what I have seen mainly lets you do that to<br>&gt=3D3B more =<br>> >bits =3D<br>> >> >in fewer lines of code.<br>&gt=3D3B <br>&gt=3D3B But after a while I rea=<br>> >lly cam=3D<br>> >> >e to appreciate the value of things like the<br>&gt=3D3B language's tell=<br>> >ing m=3D<br>> >> >e I'm using the wrong data structure instead of<br>&gt=3D3B just letting=<br>> > me u=3D<br>> >> >se the same "nice=3D2C terse=3D2C efficient" syntax to write<br>&gt=3D3B=<br>> > a crappy=3D<br>> >> > program :-)<br>&gt=3D3B <br>&gt=3D3B mika writes:<br>&gt=3D3B &gt=3D3BY=<br>> >ou're using=3D<br>> >> > the wrong (abstract) data structure if you want sort and unique.<br>&gt=<br>> >=3D3B=3D<br>> >> > &gt=3D3B<br>&gt=3D3B &gt=3D3BA "sequence" is meant to be accessed seque=<br>> >ntially..=3D<br>> >> >.<br>&gt=3D3B &gt=3D3B<br>&gt=3D3B &gt=3D3BNot knowing precisely what yo=<br>> >u're doing =3D<br>> >> >it sounds like you might want a<br>&gt=3D3B &gt=3D3BSortedTable... you c=<br>> >an get =3D<br>> >> >unique on insert and access it in increasing<br>&gt=3D3B &gt=3D3Bor decr=<br>> >easing =3D<br>> >> >order.<br>&gt=3D3B &gt=3D3B<br>&gt=3D3B &gt=3D3B    Mika<br>&gt=3D3B &gt=<br>> >=3D3B<br>&gt=3D3B=3D<br>> >> > &gt=3D3BJay K writes:<br>&gt=3D3B &gt=3D3B&gt=3D3B--_d2a02ece-d492-410e=<br>> >-88fb-fb537=3D<br>> >> >37d7219_<br>&gt=3D3B &gt=3D3B&gt=3D3BContent-Type: text/plain=3D3B chars=<br>> >et=3D3D"iso-8=3D<br>> >> >859-1"<br>&gt=3D3B &gt=3D3B&gt=3D3BContent-Transfer-Encoding: quoted-pri=<br>> >ntable<br=3D<br>> >> >>&gt=3D3B &gt=3D3B&gt=3D3B<br>&gt=3D3B &gt=3D3B&gt=3D3B    I have an Int=<br>> >Seq.T with a bu=3D<br>> >> >nch of integers.   =3D3D20<br>&gt=3D3B &gt=3D3B&gt=3D3B    What is a goo=<br>> >d terse eff=3D<br>> >> >icient idiom for sort and unique?   =3D3D20<br>&gt=3D3B &gt=3D3B&gt=3D3B=<br>> ><br>&gt=3D3B =3D<br>> >> >&gt=3D3B&gt=3D3B    In C++ I would say:        vector&lt=3D3Bint&gt=3D3B=<br>> > a=3D3D3B    =3D<br>> >> >    a.push_back(...)=3D3D3B =3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B       a.p=<br>> >ush_back(...)=3D<br>> >> >=3D3D3B        std::sort(a.begin()=3D3D2C a.end())=3D3D3B       =3D3D<br=<br>> >>&gt=3D3B &gt=3D<br>> >> >=3D3B&gt=3D3B a.resize(std::unique(a.begin()=3D3D2C a.end()) - a.begin()=<br>> >)=3D3D3B   =3D<br>> >> >     for (aut=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bo i =3D3D3D a.begin()=3D3=<br>> >D3B i !=3D3D3D a.=3D<br>> >> >end()=3D3D3B ++i)    {<br>&gt=3D3B &gt=3D3B&gt=3D3B      do stuff with *=<br>> >i    }=3D3D20=3D<br>> >> ><br>&gt=3D3B &gt=3D3B&gt=3D3B    Nice=3D3D2C terse=3D3D2C efficient.    =<br>> >    In Modula=3D<br>> >> >-3?   =3D3D20<br>&gt=3D3B &gt=3D3B&gt=3D3B<br>&gt=3D3B &gt=3D3B&gt=3D3BI=<br>> > know that unique=3D<br>> >> > is one of the easiest algorithms to manually write inlin=3D3D<br>&gt=3D=<br>> >3B &gt=3D<br>> >> >=3D3B&gt=3D3Be=3D3D2Cbut I shouldn't have to.<br>&gt=3D3B &gt=3D3B&gt=3D=<br>> >3B<br>&gt=3D3B &g=3D<br>> >> >t=3D3B&gt=3D3B(I'm really trying to stay in Modula-3 here=3D3D2C but it =<br>> >is defini=3D<br>> >> >tely a strug=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bgle. :( )<br>&gt=3D3B &gt=<br>> >=3D3B&gt=3D3B<br>&=3D<br>> >> >gt=3D3B &gt=3D3B&gt=3D3BThank you=3D3D2C - Jay<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3B<br>&gt=3D3B &gt=3D<br>> >> >=3D3B&gt=3D3B                                           =3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B<br>&gt=3D3B =<br>> >&gt=3D3B&gt=3D3B--_d2=3D<br>> >> >a02ece-d492-410e-88fb-fb53737d7219_<br>&gt=3D3B &gt=3D3B&gt=3D3BContent-=<br>> >Type: tex=3D<br>> >> >t/html=3D3B charset=3D3D"iso-8859-1"<br>&gt=3D3B &gt=3D3B&gt=3D3BContent=<br>> >-Transfer-Enc=3D<br>> >> >oding: quoted-printable<br>&gt=3D3B &gt=3D3B&gt=3D3B<br>&gt=3D3B &gt=3D3=<br>> >B&gt=3D3B&lt=3D3B=3D<br>> >> >html&gt=3D3B<br>&gt=3D3B &gt=3D3B&gt=3D3B&lt=3D3Bhead&gt=3D3B<br>&gt=3D3=<br>> >B &gt=3D3B&gt=3D3B&lt=3D<br>> >> >=3D3Bstyle&gt=3D3B&lt=3D3B!--<br>&gt=3D3B &gt=3D3B&gt=3D3B.hmmessage P<b=<br>> >r>&gt=3D3B &gt=3D3B=3D<br>> >> >&gt=3D3B{<br>&gt=3D3B &gt=3D3B&gt=3D3Bmargin:0px=3D3D3B<br>&gt=3D3B &gt=<br>> >=3D3B&gt=3D3Bpadding=3D<br>> >> >:0px<br>&gt=3D3B &gt=3D3B&gt=3D3B}<br>&gt=3D3B &gt=3D3B&gt=3D3Bbody.hmme=<br>> >ssage<br>&gt=3D3B=3D<br>> >> > &gt=3D3B&gt=3D3B{<br>&gt=3D3B &gt=3D3B&gt=3D3Bfont-size: 12pt=3D3D3B<br=<br>> >>&gt=3D3B &gt=3D3B&=3D<br>> >> >gt=3D3Bfont-family:Calibri<br>&gt=3D3B &gt=3D3B&gt=3D3B}<br>&gt=3D3B &gt=<br>> >=3D3B&gt=3D3B--&g=3D<br>> >> >t=3D3B&lt=3D3B/style&gt=3D3B&lt=3D3B/head&gt=3D3B<br>&gt=3D3B &gt=3D3B&g=<br>> >t=3D3B&lt=3D3Bbody cl=3D<br>> >> >ass=3D3D3D'hmmessage'&gt=3D3B&lt=3D3Bdiv dir=3D3D3D'ltr'&gt=3D3B&amp=3D3=<br>> >Bnbsp=3D3D3B &amp=3D<br>> >> >=3D3Bnbsp=3D3D3B&amp=3D3Bnbsp=3D3D3BI have =3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3Ban IntSeq.T wi=3D<br>> >> >th a bunch of integers.&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&amp=3D3=<br>> >Bnbsp=3D3D3B&lt=3D<br>> >> >=3D3Bbr&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspa=3D3D<br>&gt=3D3B &gt=3D3B&=<br>> >gt=3D3Bn style=3D3D3D"f=3D<br>> >> >ont-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B=<br>> >&lt=3D3B/span&gt=3D<br>> >> >=3D3B&lt=3D3Bspan style=3D3D3D"font=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B-si=<br>> >ze: 12pt=3D3D3B "&g=3D<br>> >> >t=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3BWhat is a good terse effi=<br>> >cient idiom f=3D<br>> >> >or so=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Brt and unique?&lt=3D3Bspan style=<br>> >=3D3D3D"font-siz=3D<br>> >> >e: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3=<br>> >B/span&gt=3D3B&lt=3D<br>> >> >=3D3B=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bspan style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B "&gt=3D3B&a=3D<br>> >> >mp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&g=<br>> >t=3D3B&lt=3D3Bbr&gt=3D<br>> >> >=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B&g=<br>> >t=3D3B&lt=3D3Bbr&gt=3D3B&=3D<br>> >> >lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=<br>> >=3D3D3B In C++ I wo=3D<br>> >> >uld say:&lt=3D3Bspan style=3D3D3D"font-si=3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3Bze: 12pt=3D3D3=3D<br>> >> >B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3=<br>> >B&lt=3D3Bspan style=3D<br>> >> >=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3B=3D3D<br>&gt=3D3B &gt=<br>> >=3D3B&gt=3D3Bnbsp=3D3D3=3D<br>> >> >B&lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspa=<br>> >n style=3D3D3D"font=3D<br>> >> >-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D<br>&=<br>> >gt=3D3B &gt=3D3B&gt=3D<br>> >> >=3D3B=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12=<br>> >pt=3D3D3B "&gt=3D3B=3D<br>> >> >&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3Bvector&amp=3D3Blt=3D3D3Bin=3D3D=<br>> ><br>&gt=3D3B &gt=3D3B=3D<br>> >> >&gt=3D3Bt&amp=3D3Bgt=3D3D3B a=3D3D3B&lt=3D3Bspan style=3D3D3D"font-size:=<br>> > 12pt=3D3D3B "&gt=3D<br>> >> >=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=<br>> >=3D3Bsp=3D3D<br>&gt=3D3B =3D<br>> >> >&gt=3D3B&gt=3D3Ban style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3=<br>> >Bnbsp=3D3D3B&lt=3D<br>> >> >=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspan st=<br>> >yle=3D3D3D"f=3D3D<br>=3D<br>> >> >&gt=3D3B &gt=3D3B&gt=3D3Bont-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D=<br>> >3D3B &amp=3D3Bnbsp=3D<br>> >> >=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D=<br>> >3D<br>&gt=3D3B &g=3D<br>> >> >t=3D3B&gt=3D3B=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B=<br>> >a.push_back(...)=3D3D=3D<br>> >> >3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "=3D3D<br>&gt=3D3B &g=<br>> >t=3D3B&gt=3D3B&gt=3D<br>> >> >=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=<br>> >=3D3Bspan style=3D3D3D"=3D<br>> >> >font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span=3D3D<b=<br>> >r>&gt=3D3B &gt=3D3B=3D<br>> >> >&gt=3D3B&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bdiv&gt=3D=<br>> >3B&lt=3D3Bspan style=3D<br>> >> >=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnb=<br>> >sp=3D3D3B&lt=3D3B/s=3D<br>> >> >pa=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bn&gt=3D3B&lt=3D3Bspan style=3D3D3D"f=<br>> >ont-size: 12pt=3D3D=3D<br>> >> >3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3Ba.push_back(...)=3D=<br>> >3D3B&lt=3D3Bsp=3D3D=3D<br>> >> ><br>&gt=3D3B &gt=3D3B&gt=3D3Ban style=3D3D3D"font-size: 12pt=3D3D3B "&gt=<br>> >=3D3B&amp=3D3Bnbs=3D<br>> >> >p=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bspan style=3D3=<br>> >D3D"fon=3D3D<br>&gt=3D<br>> >> >=3D3B &gt=3D3B&gt=3D3Bt-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&=<br>> >lt=3D3B/span&gt=3D3B&=3D<br>> >> >lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-siz=<br>> >e: 12pt=3D3D<br>&=3D<br>> >> >gt=3D3B &gt=3D3B&gt=3D3B=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bn=<br>> >bsp=3D3D3B&lt=3D3B/span=3D<br>> >> >&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=<br>> >=3D3Bnbsp=3D3D3B&lt=3D<br>> >> >=3D3B=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B/span&gt=3D3Bstd::sort(a.begin()=<br>> >=3D3D2C a.end())=3D<br>> >> >=3D3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "=3D3D<br>&gt=3D=<br>> >3B &gt=3D3B&gt=3D3B=3D<br>> >> >&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&l=<br>> >t=3D3Bspan style=3D3D=3D<br>> >> >3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D3B/span=3D3=<br>> >D<br>&gt=3D3B &gt=3D<br>> >> >=3D3B&gt=3D3B&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspan=<br>> > style=3D3D3D"font-si=3D<br>> >> >ze: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D=<br>> >3B/span&gt=3D3B&lt=3D<br>> >> >=3D3Bsp=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Ban style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B "&gt=3D3B&a=3D<br>> >> >mp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3Ba.resize(std::unique(a.begi=3D3D<=<br>> >br>&gt=3D3B &gt=3D<br>> >> >=3D3B&gt=3D3Bn()=3D3D2C a.end()) - a.begin())=3D3D3B&lt=3D3Bspan style=<br>> >=3D3D3D"font-size=3D<br>> >> >: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B=3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3B &amp=3D3Bnbsp=3D<br>> >> >=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D=<br>> >3D3B "&gt=3D3B&am=3D<br>> >> >p=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bd=3D3D=<br>> ><br>&gt=3D3B &gt=3D3B&g=3D<br>> >> >t=3D3Biv&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D=<br>> >3B&amp=3D3Bnbsp=3D<br>> >> >=3D3D3B &amp=3D3Bnbsp=3D3D3B for (auto i =3D3D3D a.=3D3D<br>&gt=3D3B &gt=<br>> >=3D3B&gt=3D3Bbegin(=3D<br>> >> >)=3D3D3B i !=3D3D3D a.end()=3D3D3B ++i)&lt=3D3B/span&gt=3D3B&lt=3D3B/div=<br>> >&gt=3D3B&lt=3D3Bdiv=3D<br>> >> >&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size=3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3B: 12pt=3D3D3B =3D<br>> >> >"&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B {&lt=3D3Bbr&gt=3D3B&a=<br>> >mp=3D3Bnbsp=3D3D3B &a=3D<br>> >> >mp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B do stuff with=3D3D<br>&gt=3D3B &=<br>> >gt=3D3B&gt=3D3B *i&=3D<br>> >> >lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bspan =<br>> >style=3D3D3D"font-s=3D<br>> >> >ize: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B =3D3=<br>> >D<br>&gt=3D3B &gt=3D<br>> >> >=3D3B&gt=3D3B}&lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D=<br>> >3B&amp=3D3Bnbsp=3D3D3B&=3D<br>> >> >lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bbr&gt=3D3B&lt=3D3B/div&gt=<br>> >=3D3B&lt=3D3Bdiv&gt=3D3B=3D<br>> >> >&lt=3D3Bspan style=3D3D3D"font-si=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bze: 1=<br>> >2pt=3D3D3B "&gt=3D<br>> >> >=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=<br>> >=3D3Bspan style=3D3D3D"=3D<br>> >> >font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3B=3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3Bnbsp=3D3D3B&lt=3D<br>> >> >=3D3B/span&gt=3D3BNice=3D3D2C terse=3D3D2C efficient.&lt=3D3Bspan style=<br>> >=3D3D3D"font-siz=3D<br>> >> >e: 12pt=3D3D3B =3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B"&gt=3D3B&amp=3D3Bnbsp=<br>> >=3D3D3B &amp=3D3Bnbsp=3D<br>> >> >=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D=<br>> >3D3B "&gt=3D3B&am=3D<br>> >> >p=3D3Bnbsp=3D3D3B&lt=3D3B/spa=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bn&gt=3D3B=<br>> >&lt=3D3B/div&gt=3D3B&lt=3D<br>> >> >=3D3Bdiv&gt=3D3B&lt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D=<br>> >3B&amp=3D3Bnbsp=3D<br>> >> >=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3Bs=3D3D<br>&gt=<br>> >=3D3B &gt=3D3B&gt=3D3Bpan=3D<br>> >> > style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B&lt=3D=<br>> >3B/span&gt=3D3BIn=3D<br>> >> > Modula-3?&lt=3D3Bspan style=3D3D3D=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B"fo=<br>> >nt-size: 12pt=3D<br>> >> >=3D3D3B "&gt=3D3B&amp=3D3Bnbsp=3D3D3B &amp=3D3Bnbsp=3D3D3B&lt=3D3B/span&=<br>> >gt=3D3B&lt=3D3Bspan s=3D<br>> >> >tyle=3D3D3D"font-size: 12p=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bt=3D3D3B "&g=<br>> >t=3D3B&amp=3D3Bnbsp=3D<br>> >> >=3D3D3B&lt=3D3B/span&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=<br>> >=3D3Bbr&gt=3D3B&lt=3D3B/d=3D<br>> >> >iv&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bbr&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=<br>> >=3D3Bdiv&gt=3D3BI know =3D<br>> >> >that =3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bunique is one of the easiest algo=<br>> >rithms to m=3D<br>> >> >anually write inline=3D3D2C&lt=3D3B/div&gt=3D3B&lt=3D3Bd=3D3D<br>&gt=3D3=<br>> >B &gt=3D3B&gt=3D3Bi=3D<br>> >> >v&gt=3D3Bbut I shouldn't have to.&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B=<br>> >&lt=3D3Bbr&gt=3D<br>> >> >=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bbr&gt=3D3B&lt=3D3B/d=<br>> >iv&gt=3D3B&lt=3D3Bdiv&g=3D<br>> >> >t=3D3B(I'm re=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3Bally trying to stay in Mo=<br>> >dula-3 here=3D<br>> >> >=3D3D2C but it is definitely a struggle. :(=3D3D<br>&gt=3D3B &gt=3D3B&gt=<br>> >=3D3B )&lt=3D3B=3D<br>> >> >/div&gt=3D3B&lt=3D3Bdiv&gt=3D3B&lt=3D3Bbr&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=<br>> >=3D3Bdiv&gt=3D3B&lt=3D<br>> >> >=3D3Bbr&gt=3D3B&lt=3D3B/div&gt=3D3B&lt=3D3Bdiv&gt=3D3BThank you=3D3D2C&l=<br>> >t=3D3B/div&gt=3D3B&lt=3D<br>> >> >=3D3Bdiv&gt=3D3B&amp=3D3Bnbsp=3D3D3B-=3D3D<br>&gt=3D3B &gt=3D3B&gt=3D3B =<br>> >Jay&lt=3D3B/div&gt=3D3B=3D<br>> >> >&lt=3D3Bbr&gt=3D3B&lt=3D3Bbr&gt=3D3B&lt=3D3B/div&gt=3D3B                                      &lt=<br>> >=3D3B/div&gt=3D3B&lt=3D<br>> >> >=3D3B/body&gt=3D3B<br>&gt=3D3B &gt=3D3B&gt=3D3B&lt=3D3B/html&gt=3D3B=3D3=<br>> >D<br>&gt=3D3B &gt=3D3B&=3D<br>> >> >gt=3D3B<br>&gt=3D3B &gt=3D3B&gt=3D3B--_d2a02ece-d492-410e-88fb-fb53737d7=<br>> >219_--<br><=3D<br>> >> >/div></div>                                           </div></body><br>> >> ></html>=3D<br>> >> ><br>> >> >--_7877d7e8-cb4a-4989-bdcd-d406e5b1f51f_--<br>> >                                      =<br>> ><br>> >--_13e6ee6a-034c-469d-aa83-18379d050866_<br>> >Content-Type: text/html; charset="iso-8859-1"<br>> >Content-Transfer-Encoding: quoted-printable<br>> ><br>> ><html><br>> ><head><br>> ><style><!--<br>> >.hmmessage P<br>> >{<br>> >margin:0px=3B<br>> >padding:0px<br>> >}<br>> >body.hmmessage<br>> >{<br>> >font-size: 12pt=3B<br>> >font-family:Calibri<br>> >}<br>> >--></style></head><br>> ><body class=3D'hmmessage'><div dir=3D'ltr'><pre style=3D"line-height: 21.81=<br>> >818199157715px=3B white-space: normal=3B font-size: 15.454545021057129px=3B=<br>> > background-color: rgb(255=2C 255=2C 255)=3B ">&nbsp=3B&gt=3B The separatio=<br>> >n of algorithms from containers sounds a bit like a bug.</pre><div><br></di=<br>> >v>It isn't. It is a leap that allows for far greater code reuse. Efficientl=<br>> >y.<div>(You could do it inefficiently with lots of function pointers -- tem=<br>> >plates allow</div><div>for inlinability. C++ beats C for performance here.)=<br>> ></div><div><div><br></div><div><br></div><div>Imagine I have written quicks=<br>> >ort.</div><div>In C++ we have at least the following worthwhile "array-like=<br>> >" data structures:</div><div><br></div><div><br></div><div>&nbsp=3B The bui=<br>> >ltin arrays. Like Modula-3 fixed arrays.</div><div><br></div><div><br></div=<br>> >><div>&nbsp=3B Arrays you get with new[]. Like Modula-3 open arrays=2C but =<br>> >they don't expose their size.</div><div><br></div><div><br></div><div>&nbsp=<br>> >=3B std::vector&lt=3B&gt=3B. Like Modula-3 "sequence" -- a simple growable =<br>> >array. Grows by a constant factor greater than 1 (typically 2)=2C so that l=<br>> >ong runs of "appends" are amortized cheap.</div><div><br></div><div><br></d=<br>> >iv><div>&nbsp=3B std::deque&lt=3B&gt=3B. More like Modula-3 sequence=2C in =<br>> >that you can amortized cheap at/remove from the front or the back. I believ=<br>> >e this can be implemented as simply an "offset array". Element 0 starts in =<br>> >the middle=2C and whenever you grow it=2C you "center" it -- equal gaps at =<br>> >front and back.</div><div><br></div><div><br></div><div>Now=2C with the ite=<br>> >rator/algorithm separation=2C one quicksort implementation can be applied t=<br>> >o all these types. The input to "quicksort" is "random access iterators"=2C=<br>> > which is very much like a "pointer"=2C but isn't necessarily a pointer. It=<br>> > can be incremented=2C decremented=2C added to an integer=2C subtracted fro=<br>> >m another iterator=2C have an integer subtracted from it=2C dereferenced=2C=<br>> > and assigned and compared with other iterators of the same type -- all con=<br>> >stant time fast operations.</div><div><br></div><div><br>There are "input i=<br>> >terators" which can=2C roughly speaking=2C only be incremented and derefere=<br>> >nced. They are all some containers can expose and all some algorithms requi=<br>> >re -- for example=2C a singly linked list and linear search.</div><div><br>=<br>> ></div><div><br></div><div>There are "bidirectional iterators" which can=2C =<br>> >roughly speaking=2C only be incremented and decremented and dereferenced. D=<br>> >oubly linked lists expose these.</div><div><br></div><div><br></div><div>Th=<br>> >ere are "output iterators".</div><div>They are similar to "input".</div><di=<br>> >v><br></div><div><br></div><div>input streams (cin=2C like stdin) exposes a=<br>> >n input iterator.</div><div>You can copy from it.</div><div>Copy is another=<br>> > simple reusable algorithm.</div><div><br></div><div><br></div><div>output =<br>> >streams (cout=2C like stdout) exposes an output iterator.</div><div>You can=<br>> > copy to it.</div><div><br></div><div><br></div><div>There are many more ex=<br>> >amples.</div><div>Of course=2C besides quick sort=2C there is a stable sort=<br>> >.</div><div>There is finding sequences.</div><div>There is binary_search.</=<br>> >div><div>There is upper_bound/lower_bound/equal_range which are like binary=<br>> >_search.</div><div>There is unique.</div><div>There is partition.</div><div=<br>> >>Many many more=2C "built in" to the library.</div><div>That work with mult=<br>> >iple "built in" containers=2C and can work with custom containers as well.<=<br>> >/div><div><br></div><div><br></div><div>I strongly recommend you read up on=<br>> > this stuff.</div><div>It is really quite illimuninating. Good stuff.</div>=<br>> ><div>Teaches us how to better factor our code.</div><div>And to strive for =<br>> >better factoring=2C when we find people have invented/discovered such thing=<br>> >s.</div><div><br></div><div><br></div><div>"Iterators" already do occur in =<br>> >Modula-3 libraries.</div><div><br></div><div><br></div><div>All I want is a=<br>> > sorted vector that "closely knows" when it is being written vs. read=2C an=<br>> >d when there are a series of writes with no intervening reads=2C it can amo=<br>> >rtize down the cost of maintaining the ordering.</div><div><br></div><div><=<br>> >br></div><div>I hand coded something.</div><div>It took me a while to get i=<br>> >t to work due to stupid small details.</div><div>The result is significantl=<br>> >y worse than I would have gotten in C++.</div><div>Bigger code. Slower code=<br>> >. More copies. More heap allocations.</div><div>I can eliminate one of the =<br>> >allocations by merging the next step.</div><div>But in C++ I naturally woul=<br>> >dn't have had it anyway.</div><div>Not great.</div><div><br></div><div><br>=<br>> ></div><div>&nbsp=3B- Jay<br><br><br><div><div id=3D"SkyDrivePlaceholder"></=<br>> >div>&gt=3B To: jay.krell@cornell.edu<br>&gt=3B CC: mika@async.caltech.edu=<br>> >=3B m3devel@elegosoft.com<br>&gt=3B Subject: Re: [M3devel] STL algorithms? =<br>> >sort/unique?<br>&gt=3B Date: Sat=2C 29 Sep 2012 11:29:48 -0700<br>&gt=3B Fr=<br>> >om: mika@async.caltech.edu<br>&gt=3B <br>&gt=3B <br>&gt=3B Well that depend=<br>> >s on how you maintain the vector=2C no?<br>&gt=3B <br>&gt=3B SortedTable us=<br>> >es "treaps" which are supposed to be good data structures.<br>&gt=3B Too ne=<br>> >w to have made it into Knuth=2C last I checked.  The amortized cost<br>&gt=<br>> >=3B of your operations shouldn't be much worse than with your method=2C wit=<br>> >h<br>&gt=3B the additional benefit that the sorted order is maintained dyna=<br>> >mically.<br>&gt=3B <br>&gt=3B The separation of algorithms from containers =<br>> >sounds a bit like a bug.<br>&gt=3B You have to be careful so you don't shoo=<br>> >t yourself in the foot there!<br>&gt=3B (Sorting a list using an algorithm =<br>> >that randomly accesses elements=2C<br>&gt=3B say...)<br>&gt=3B <br>&gt=3B T=<br>> >he Modula-3 approach is that you figure out what you want to do=2C pick<br>=<br>> >&gt=3B the ADT you want that provides the minimal set of operations=2C impo=<br>> >rt<br>&gt=3B that interface=2C then instantiate a more carefully chosen imp=<br>> >lementation<br>&gt=3B of the ADT.  The language itself obviously can be coa=<br>> >xed into supporting the<br>&gt=3B algorithm/data structure separation but n=<br>> >o one uses it that way as<br>&gt=3B far as I know.  (Modula-3 generics are =<br>> >not that well explored=2C actually.<br>&gt=3B I suspect there are many thin=<br>> >gs you can do with them that no one has<br>&gt=3B tried.)<br>&gt=3B <br>&gt=<br>> >=3B      Mika<br>&gt=3B <br>&gt=3B Jay K writes:<br>&gt=3B &gt=3B--_7877d7e=<br>> >8-cb4a-4989-bdcd-d406e5b1f51f_<br>&gt=3B &gt=3BContent-Type: text/plain=3B =<br>> >charset=3D"iso-8859-1"<br>&gt=3B &gt=3BContent-Transfer-Encoding: quoted-pr=<br>> >intable<br>&gt=3B &gt=3B<br>&gt=3B &gt=3BThe following is very efficient:<b=<br>> >r>&gt=3B &gt=3B<br>&gt=3B &gt=3Brun through a bunch of records=3D2C picking=<br>> > out one number from some of thema=3D<br>&gt=3B &gt=3Bppend those numbers t=<br>> >o a growing vectorsort the vectorunique the vector<br>&gt=3B &gt=3B<br>&gt=<br>> >=3B &gt=3Bsequence allows for random access..but only via a function...or m=<br>> >aybe an it=3D<br>&gt=3B &gt=3Berator<br>&gt=3B &gt=3B<br>&gt=3B &gt=3BSTL h=<br>> >as this wonderful separation of algorithms from containers=3D2C via iter=3D=<br>> ><br>&gt=3B &gt=3Bators.I suspect very few other libraries do.And it could b=<br>> >e that most langu=3D<br>&gt=3B &gt=3Bages don't support it.It doesn't appea=<br>> >r I can easily sort a sequence=3D2C unl=3D<br>&gt=3B &gt=3Bess I copy the d=<br>> >ata out into an array -- gross inefficiency.<br>&gt=3B &gt=3B<br>&gt=3B &gt=<br>> >=3BI've hacked something very manual together..and it is taking forever to =<br>> >get=3D<br>&gt=3B &gt=3B it to work.  It turns out I can reasonably well bou=<br>> >nd the size of the data=3D<br>&gt=3B &gt=3B=3D2C so I'm using an open array=<br>> >...and I have to keep track of my position in=3D<br>&gt=3B &gt=3Bstead of u=<br>> >sing addhi/push_back.Not happy.At some point I might give up and =3D<br>&gt=<br>> >=3B &gt=3Bwrite the backend in C++..at which point I might as well write a =<br>> >C++ fronte=3D<br>&gt=3B &gt=3Bnd anywa.<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B<b=<br>> >r>&gt=3B &gt=3BI absolutely do not want a sorted table and unique upon inse=<br>> >rt.That is much=3D<br>&gt=3B &gt=3B less efficient.What I'm describing uses=<br>> > temporarily larger working set but=3D<br>&gt=3B &gt=3B vastly less CPU.An =<br>> >array that gets sorted/uniqued occasionally=3D2C like jus=3D<br>&gt=3B &gt=<br>> >=3Bt once.And not ongoing maintainence for every single add.<br>&gt=3B &gt=<br>> >=3B<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B - Jay<br>&gt=3B &gt=3B<br>&gt=3B &gt=<br>> >=3B<br>&gt=3B &gt=3B&gt=3B To: jay.krell@cornell.edu<br>&gt=3B &gt=3B&gt=3B=<br>> > CC: m3devel@elegosoft.com<br>&gt=3B &gt=3B&gt=3B Subject: Re: [M3devel] ST=<br>> >L algorithms? sort/unique?<br>&gt=3B &gt=3B&gt=3B Date: Fri=3D2C 28 Sep 201=<br>> >2 01:04:48 -0700<br>&gt=3B &gt=3B&gt=3B From: mika@async.caltech.edu<br>&gt=<br>> >=3B &gt=3B&gt=3B=3D20<br>&gt=3B &gt=3B&gt=3B=3D20<br>&gt=3B &gt=3B&gt=3B BT=<br>> >W I had the same experience when I first started using Modula-3.<br>&gt=3B =<br>> >&gt=3B&gt=3B It was painful to jump through all its hoops=3D2C coming from =<br>> >C=3D2C where yo=3D<br>&gt=3B &gt=3Bu<br>&gt=3B &gt=3B&gt=3B can do whatever=<br>> > you want to whatever bits happen to be sloshing around<br>&gt=3B &gt=3B&gt=<br>> >=3B your machine.  C++ from what I have seen mainly lets you do that to<br>=<br>> >&gt=3B &gt=3B&gt=3B more bits in fewer lines of code.<br>&gt=3B &gt=3B&gt=<br>> >=3B=3D20<br>&gt=3B &gt=3B&gt=3B But after a while I really came to apprecia=<br>> >te the value of things like th=3D<br>&gt=3B &gt=3Be<br>&gt=3B &gt=3B&gt=3B =<br>> >language's telling me I'm using the wrong data structure instead of<br>&gt=<br>> >=3B &gt=3B&gt=3B just letting me use the same "nice=3D2C terse=3D2C efficie=<br>> >nt" syntax to write<br>&gt=3B &gt=3B&gt=3B a crappy program :-)<br>&gt=3B &=<br>> >gt=3B&gt=3B=3D20<br>&gt=3B &gt=3B&gt=3B mika writes:<br>&gt=3B &gt=3B&gt=3B=<br>> > &gt=3BYou're using the wrong (abstract) data structure if you want sort an=<br>> >d un=3D<br>&gt=3B &gt=3Bique.<br>&gt=3B &gt=3B&gt=3B &gt=3B<br>&gt=3B &gt=<br>> >=3B&gt=3B &gt=3BA "sequence" is meant to be accessed sequentially...<br>&gt=<br>> >=3B &gt=3B&gt=3B &gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3BNot knowing precisely =<br>> >what you're doing it sounds like you might want a<br>&gt=3B &gt=3B&gt=3B &g=<br>> >t=3BSortedTable... you can get unique on insert and access it in increasing=<br>> ><br>&gt=3B &gt=3B&gt=3B &gt=3Bor decreasing order.<br>&gt=3B &gt=3B&gt=3B &=<br>> >gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B    Mika<br>&gt=3B &gt=3B&gt=3B &gt=3B<b=<br>> >r>&gt=3B &gt=3B&gt=3B &gt=3BJay K writes:<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=<br>> >=3B--_d2a02ece-d492-410e-88fb-fb53737d7219_<br>&gt=3B &gt=3B&gt=3B &gt=3B&g=<br>> >t=3BContent-Type: text/plain=3D3B charset=3D3D"iso-8859-1"<br>&gt=3B &gt=3B=<br>> >&gt=3B &gt=3B&gt=3BContent-Transfer-Encoding: quoted-printable<br>&gt=3B &g=<br>> >t=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B    I have an In=<br>> >tSeq.T with a bunch of integers.   =3D3D20<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=<br>> >=3B    What is a good terse efficient idiom for sort and unique?   =3D3D20<=<br>> >br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B    =<br>> >In C++ I would say:        vector&lt=3Bint&gt=3B a=3D3D3B        a.push_bac=<br>> >k(..=3D<br>&gt=3B &gt=3B.)=3D3D3B =3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B=<br>> >       a.push_back(...)=3D3D3B        std::sort(a.begin()=3D3D2C a.end())=<br>> >=3D<br>&gt=3B &gt=3B=3D3D3B       =3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B=<br>> > a.resize(std::unique(a.begin()=3D3D2C a.end()) - a.begin())=3D3D3B        =<br>> >=3D<br>&gt=3B &gt=3Bfor (aut=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bo i =<br>> >=3D3D3D a.begin()=3D3D3B i !=3D3D3D a.end()=3D3D3B ++i)    {<br>&gt=3B &gt=<br>> >=3B&gt=3B &gt=3B&gt=3B      do stuff with *i    }=3D3D20<br>&gt=3B &gt=3B&g=<br>> >t=3B &gt=3B&gt=3B    Nice=3D3D2C terse=3D3D2C efficient.        In Modula-3=<br>> >?   =3D3D20<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=<br>> >=3B&gt=3BI know that unique is one of the easiest algorithms to manually wr=<br>> >ite i=3D<br>&gt=3B &gt=3Bnlin=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Be=3D3=<br>> >D2Cbut I shouldn't have to.<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &=<br>> >gt=3B&gt=3B &gt=3B&gt=3B(I'm really trying to stay in Modula-3 here=3D3D2C =<br>> >but it is definitely a=3D<br>&gt=3B &gt=3B strug=3D3D<br>&gt=3B &gt=3B&gt=<br>> >=3B &gt=3B&gt=3Bgle. :( )<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=<br>> >=3B&gt=3B &gt=3B&gt=3BThank you=3D3D2C - Jay<br>&gt=3B &gt=3B&gt=3B &gt=3B&=<br>> >gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B                                       =3D3D<br>&gt=3B &gt=3B=<br>> >&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B--_d2a02ece-d492-410=<br>> >e-88fb-fb53737d7219_<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3BContent-Type: text/=<br>> >html=3D3B charset=3D3D"iso-8859-1"<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3BConte=<br>> >nt-Transfer-Encoding: quoted-printable<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B<=<br>> >br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&lt=3Bhtml&gt=3B<br>&gt=3B &gt=3B&gt=3B =<br>> >&gt=3B&gt=3B&lt=3Bhead&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&lt=3Bstyle=<br>> >&gt=3B&lt=3B!--<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B.hmmessage P<br>&gt=3B &=<br>> >gt=3B&gt=3B &gt=3B&gt=3B{<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bmargin:0px=3D3=<br>> >D3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bpadding:0px<br>&gt=3B &gt=3B&gt=3B &=<br>> >gt=3B&gt=3B}<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bbody.hmmessage<br>&gt=3B &g=<br>> >t=3B&gt=3B &gt=3B&gt=3B{<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bfont-size: 12pt=<br>> >=3D3D3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bfont-family:Calibri<br>&gt=3B &g=<br>> >t=3B&gt=3B &gt=3B&gt=3B}<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B--&gt=3B&lt=3B/=<br>> >style&gt=3B&lt=3B/head&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&lt=3Bbody =<br>> >class=3D3D3D'hmmessage'&gt=3B&lt=3Bdiv dir=3D3D3D'ltr'&gt=3B&amp=3Bnbsp=3D3=<br>> >D3B &amp=3Bnbsp=3D3D3B&amp=3Bnb=3D<br>&gt=3B &gt=3Bsp=3D3D3BI have =3D3D<br=<br>> >>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Ban IntSeq.T with a bunch of integers.&amp=<br>> >=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&amp=3Bnbsp=3D3D3B&lt=3Bbr=3D<br>&gt=3B &g=<br>> >t=3B&gt=3B&lt=3Bdiv&gt=3B&lt=3Bspa=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B=<br>> >n style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=<br>> >=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan s=3D<br>&gt=3B &gt=3Btyle=3D3D3D"font=3D=<br>> >3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=<br>> >=3D3D3B&lt=3B/span&gt=3BWhat is a good terse efficient idio=3D<br>&gt=3B &g=<br>> >t=3Bm for so=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Brt and unique?&lt=3Bsp=<br>> >an style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbs=<br>> >p=3D<br>&gt=3B &gt=3B=3D3D3B&lt=3B/span&gt=3B&lt=3B=3D3D<br>&gt=3B &gt=3B&g=<br>> >t=3B &gt=3B&gt=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbs=<br>> >p=3D3D3B&lt=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B=3D<b=<br>> >r>&gt=3B &gt=3B&lt=3B/div&gt=3B&lt=3Bdiv=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B=<br>> >&gt=3B&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&amp=3Bnbsp=3D3D3B=<br>> > &amp=3Bnbsp=3D3D3B In C++ I would say:&lt=3Bspan style=3D3D=3D<br>&gt=3B &=<br>> >gt=3B3D"font-si=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bze: 12pt=3D3D3B "&g=<br>> >t=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan style=<br>> >=3D3D3D"font-size:=3D<br>&gt=3B &gt=3B 12pt=3D3D3B "&gt=3B&amp=3B=3D3D<br>&=<br>> >gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3B/div&gt=3B=<br>> >&lt=3Bdiv&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=<br>> >=3Bnbs=3D<br>&gt=3B &gt=3Bp=3D3D3B &amp=3Bnbsp=3D3D<br>&gt=3B &gt=3B&gt=3B =<br>> >&gt=3B&gt=3B=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3Bve=3D<br>&gt=3B &gt=3Bcto=<br>> >r&amp=3Blt=3D3D3Bin=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bt&amp=3Bgt=3D3D=<br>> >3B a=3D3D3B&lt=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbs=<br>> >p=3D3D3B &amp=3Bnbs=3D<br>&gt=3B &gt=3Bp=3D3D3B&lt=3B/span&gt=3B&lt=3Bsp=3D=<br>> >3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Ban style=3D3D3D"font-size: 12pt=3D3D3=<br>> >B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B=<br>> >&lt=3Bspan =3D<br>&gt=3B &gt=3Bstyle=3D3D3D"f=3D3D<br>&gt=3B &gt=3B&gt=3B &=<br>> >gt=3B&gt=3Bont-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D=<br>> >3B&lt=3B/span&gt=3B&lt=3Bspan style=3D3D3D"font=3D<br>&gt=3B &gt=3B-size: 1=<br>> >2pt=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D=<br>> >3B&lt=3B/span&gt=3Ba.push_back(...)=3D3D3B&lt=3Bspan style=3D3D3D"font-siz=<br>> >=3D<br>&gt=3B &gt=3Be: 12pt=3D3D3B "=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=<br>> >=3B&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan s=<br>> >tyle=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bn=3D<br>&gt=3B &gt=3Bbsp=<br>> >=3D3D3B&lt=3B/span=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&gt=3B&lt=3B/div=<br>> >&gt=3B&lt=3Bdiv&gt=3B&lt=3Bdiv&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnb=3D<br>&gt=3B &gt=3Bsp=3D3D3B&lt=<br>> >=3B/spa=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bn&gt=3B&lt=3Bspan style=3D3=<br>> >D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3Ba.push=<br>> >_back(=3D<br>&gt=3B &gt=3B...)=3D3D3B&lt=3Bsp=3D3D<br>&gt=3B &gt=3B&gt=3B &=<br>> >gt=3B&gt=3Ban style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B=<br>> > &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan =3D<br>&gt=3B &gt=3Bstyle=3D=<br>> >3D3D"fon=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bt-size: 12pt=3D3D3B "&gt=<br>> >=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3B=<br>> >span style=3D3D3D"font-s=3D<br>&gt=3B &gt=3Bize: 12pt=3D3D<br>&gt=3B &gt=3B=<br>> >&gt=3B &gt=3B&gt=3B=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=<br>> >=3B/span&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=3D3D=3D<br>&gt=3B &gt=<br>> >=3B3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=<br>> >=3B/span&gt=3Bstd::sort(a.begin()=3D3D2C a.end())=3D3D3B&lt=3Bspan style=3D=<br>> >3D3D"font-size:=3D<br>&gt=3B &gt=3B 12pt=3D3D3B "=3D3D<br>&gt=3B &gt=3B&gt=<br>> >=3B &gt=3B&gt=3B&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=<br>> >=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bn=3D<br>&gt=<br>> >=3B &gt=3Bbsp=3D3D3B&lt=3B/span=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&gt=<br>> >=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=<br>> >=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D=3D<br>&gt=3B &gt=3B3B&lt=<br>> >=3B/span&gt=3B&lt=3Bsp=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Ban style=3D3=<br>> >D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3Ba.resi=<br>> >ze(std::uni=3D<br>&gt=3B &gt=3Bque(a.begi=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=<br>> >=3B&gt=3Bn()=3D3D2C a.end()) - a.begin())=3D3D3B&lt=3Bspan style=3D3D3D"fon=<br>> >t-size: 12pt=3D3D3=3D<br>&gt=3B &gt=3BB "&gt=3B&amp=3Bnbsp=3D3D3B=3D3D<br>&=<br>> >gt=3B &gt=3B&gt=3B &gt=3B&gt=3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bsp=<br>> >an style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/s=3D=<br>> ><br>&gt=3B &gt=3Bpan&gt=3B&lt=3B/div&gt=3B&lt=3Bd=3D3D<br>&gt=3B &gt=3B&gt=<br>> >=3B &gt=3B&gt=3Biv&gt=3B&lt=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=<br>> >=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B for (a=3D<br>&gt=3B &gt=3Buto i =<br>> >=3D3D3D a.=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bbegin()=3D3D3B i !=3D3D3=<br>> >D a.end()=3D3D3B ++i)&lt=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3B=<br>> >span style=3D3D=3D<br>&gt=3B &gt=3B3D"font-size=3D3D<br>&gt=3B &gt=3B&gt=3B=<br>> > &gt=3B&gt=3B: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B {&l=<br>> >t=3Bbr&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D=3D<br>&g=<br>> >t=3B &gt=3B3B do stuff with=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B *i&lt=<br>> >=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bspan style=3D3D3D"font-s=<br>> >ize: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B=3D<br>&gt=3B &gt=3B &amp=3Bnbsp=<br>> >=3D3D3B =3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B}&lt=3B/span&gt=3B&lt=3B/d=<br>> >iv&gt=3B&lt=3Bdiv&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bspan style=3D3D3D=3D<br>&gt=<br>> >=3B &gt=3B"font-si=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bze: 12pt=3D3D3B =<br>> >"&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan sty=<br>> >le=3D3D3D"font-size:=3D<br>&gt=3B &gt=3B 12pt=3D3D3B "&gt=3B&amp=3B=3D3D<br=<br>> >>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bnbsp=3D3D3B&lt=3B/span&gt=3BNice=3D3D2C te=<br>> >rse=3D3D2C efficient.&lt=3Bspan style=3D3D3D"font-si=3D<br>&gt=3B &gt=3Bze:=<br>> > 12pt=3D3D3B =3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B"&gt=3B&amp=3Bnbsp=3D=<br>> >3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan style=3D3D3D"font-size: =<br>> >12pt=3D3D3B "&gt=3B&amp=3B=3D<br>&gt=3B &gt=3Bnbsp=3D3D3B&lt=3B/spa=3D3D<br=<br>> >>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bn&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B &amp=<br>> >=3Bnbsp=3D<br>&gt=3B &gt=3B=3D3D3B&lt=3B/span&gt=3B&lt=3Bs=3D3D<br>&gt=3B &=<br>> >gt=3B&gt=3B &gt=3B&gt=3Bpan style=3D3D3D"font-size: 12pt=3D3D3B "&gt=3B&amp=<br>> >=3Bnbsp=3D3D3B&lt=3B/span&gt=3BIn Modula-3?&lt=3Bspa=3D<br>&gt=3B &gt=3Bn s=<br>> >tyle=3D3D3D=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B"font-size: 12pt=3D3D3B=<br>> > "&gt=3B&amp=3Bnbsp=3D3D3B &amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3Bspan st=<br>> >yle=3D3D3D"fo=3D<br>&gt=3B &gt=3Bnt-size: 12p=3D3D<br>&gt=3B &gt=3B&gt=3B &=<br>> >gt=3B&gt=3Bt=3D3D3B "&gt=3B&amp=3Bnbsp=3D3D3B&lt=3B/span&gt=3B&lt=3B/div&gt=<br>> >=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=<br>> >=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BI kn=3D<br>&gt=3B &gt=3Bow that =3D3D<br>=<br>> >&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bunique is one of the easiest algorithms to =<br>> >manually write inline=3D3D2C&lt=3B/=3D<br>&gt=3B &gt=3Bdiv&gt=3B&lt=3Bd=3D3=<br>> >D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Biv&gt=3Bbut I shouldn't have to.&lt=3B=<br>> >/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B(I'=3D<br>&gt=3B &gt=3Bm re=3D3D<=<br>> >br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3Bally trying to stay in Modula-3 here=3D3=<br>> >D2C but it is definitely a strugg=3D<br>&gt=3B &gt=3Ble. :(=3D3D<br>&gt=3B =<br>> >&gt=3B&gt=3B &gt=3B&gt=3B )&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=<br>> >=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BTh=<br>> >ank you=3D3D2C&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&amp=3Bnb=3D<br>&gt=3B &gt=3Bs=<br>> >p=3D3D3B-=3D3D<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B Jay&lt=3B/div&gt=3B&lt=<br>> >=3Bbr&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B                                           &lt=3B/div&gt=3B&lt=3B=<br>> >/body&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B&lt=3B/html&gt=3B=3D3D<br>&g=<br>> >t=3B &gt=3B&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B &gt=3B&gt=3B--_d2a02e=<br>> >ce-d492-410e-88fb-fb53737d7219_--<br>&gt=3B &gt=3B                                          =3D<br>&gt=3B=<br>> > &gt=3B<br>&gt=3B &gt=3B--_7877d7e8-cb4a-4989-bdcd-d406e5b1f51f_<br>&gt=3B =<br>> >&gt=3BContent-Type: text/html=3B charset=3D"iso-8859-1"<br>&gt=3B &gt=3BCon=<br>> >tent-Transfer-Encoding: quoted-printable<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B&=<br>> >lt=3Bhtml&gt=3B<br>&gt=3B &gt=3B&lt=3Bhead&gt=3B<br>&gt=3B &gt=3B&lt=3Bstyl=<br>> >e&gt=3B&lt=3B!--<br>&gt=3B &gt=3B.hmmessage P<br>&gt=3B &gt=3B{<br>&gt=3B &=<br>> >gt=3Bmargin:0px=3D3B<br>&gt=3B &gt=3Bpadding:0px<br>&gt=3B &gt=3B}<br>&gt=<br>> >=3B &gt=3Bbody.hmmessage<br>&gt=3B &gt=3B{<br>&gt=3B &gt=3Bfont-size: 12pt=<br>> >=3D3B<br>&gt=3B &gt=3Bfont-family:Calibri<br>&gt=3B &gt=3B}<br>&gt=3B &gt=<br>> >=3B--&gt=3B&lt=3B/style&gt=3B&lt=3B/head&gt=3B<br>&gt=3B &gt=3B&lt=3Bbody c=<br>> >lass=3D3D'hmmessage'&gt=3B&lt=3Bdiv dir=3D3D'ltr'&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bspan style=3D3D"font-size: 1=3D<br>&gt=3B &gt=3B2pt=3D3B "&gt=3BThe foll=<br>> >owing is very efficient:&lt=3B/span&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3B=3D<br>&gt=3B &gt=3Bbr&gt=<br>> >=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3Brun through a bunch of records=3D2C picki=<br>> >ng out one number from=3D<br>&gt=3B &gt=3B some of them&lt=3B/div&gt=3B&lt=<br>> >=3Bdiv&gt=3Bappend those numbers to a growing vector&lt=3B/div&gt=3B&lt=3Bd=<br>> >iv&gt=3B=3D<br>&gt=3B &gt=3Bsort the vector&lt=3B/div&gt=3B&lt=3Bdiv&gt=3Bu=<br>> >nique the vector&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=<br>> >=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/=3D<br>&gt=3B &gt=3Bdiv&gt=3B&lt=3Bd=<br>> >iv&gt=3Bsequence allows for random access..but only via a function...&lt=3B=<br>> >/div=3D<br>&gt=3B &gt=3B&gt=3B&lt=3Bdiv&gt=3Bor maybe an iterator&lt=3B/div=<br>> >&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&=<br>> >gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BSTL has =3D<br>&gt=3B &gt=3Bthis wonder=<br>> >ful separation of algorithms from containers=3D2C via iterators.&lt=3B/=3D<=<br>> >br>&gt=3B &gt=3Bdiv&gt=3B&lt=3Bdiv&gt=3BI suspect very few other libraries =<br>> >do.&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BAnd it could be t=3D<br>&gt=3B &gt=3Bhat =<br>> >most languages don't support it.&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BIt doesn't a=<br>> >ppear I can easi=3D<br>&gt=3B &gt=3Bly sort a sequence=3D2C unless I copy t=<br>> >he data out into an array -- gross ine=3D<br>&gt=3B &gt=3Bfficiency.&lt=3B/=<br>> >div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3B=<br>> >br&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BI've hacked something ve=3D<br>&gt=<br>> >=3B &gt=3Bry manual together..and it is taking forever to get it to work.&l=<br>> >t=3B/div&gt=3B&lt=3Bdiv&gt=3B&amp=3B=3D<br>&gt=3B &gt=3Bnbsp=3D3B It turns =<br>> >out I can reasonably well bound the size of the data=3D2C so=3D<br>&gt=3B &=<br>> >gt=3B I'm using an open array...and I have to keep track of my position ins=<br>> >tead =3D<br>&gt=3B &gt=3Bof using addhi/push_back.&lt=3B/div&gt=3B&lt=3Bdiv=<br>> >&gt=3BNot happy.&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BAt some point I mi=3D<br>&gt=<br>> >=3B &gt=3Bght give up and write the backend in C++..at which point I might =<br>> >as well wr=3D<br>&gt=3B &gt=3Bite a C++ frontend anywa.&lt=3B/div&gt=3B&lt=<br>> >=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=<br>> >=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div=3D<br>&gt=3B &gt=3B&gt=<br>> >=3B&lt=3Bdiv&gt=3BI absolutely do not want a sorted table and unique upon i=<br>> >nsert.&lt=3B/div&gt=3B=3D<br>&gt=3B &gt=3B&lt=3Bdiv&gt=3BThat is much less =<br>> >efficient.&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BWhat I'm describing uses tempor=3D=<br>> ><br>&gt=3B &gt=3Barily larger working set but vastly less CPU.&lt=3B/div&gt=<br>> >=3B&lt=3Bdiv&gt=3BAn array that gets =3D<br>&gt=3B &gt=3Bsorted/uniqued occ=<br>> >asionally=3D2C like just once.&lt=3B/div&gt=3B&lt=3Bdiv&gt=3BAnd not ongoin=<br>> >g ma=3D<br>&gt=3B &gt=3Bintainence for every single add.&lt=3B/div&gt=3B&lt=<br>> >=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bbr&gt=3B&lt=<br>> >=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=3Bb=3D<br>&gt=3B &gt=3Br&gt=3B&lt=3B/div&gt=<br>> >=3B&lt=3Bdiv&gt=3B&amp=3Bnbsp=3D3B- Jay&lt=3B/div&gt=3B&lt=3Bdiv&gt=3B&lt=<br>> >=3Bbr&gt=3B&lt=3Bbr&gt=3B&lt=3Bbr&gt=3B&lt=3Bdiv&gt=3B&lt=3Bdiv id=3D3D"Sky=<br>> >DrivePl=3D<br>&gt=3B &gt=3Baceholder"&gt=3B&lt=3B/div&gt=3B&amp=3Bgt=3D3B T=<br>> >o: jay.krell@cornell.edu&lt=3Bbr&gt=3B&amp=3Bgt=3D3B CC: m3devel@ele=3D<br>=<br>> >&gt=3B &gt=3Bgosoft.com&lt=3Bbr&gt=3B&amp=3Bgt=3D3B Subject: Re: [M3devel] =<br>> >STL algorithms? sort/unique?&lt=3Bbr=3D<br>&gt=3B &gt=3B&gt=3B&amp=3Bgt=3D3=<br>> >B Date: Fri=3D2C 28 Sep 2012 01:04:48 -0700&lt=3Bbr&gt=3B&amp=3Bgt=3D3B Fro=<br>> >m: mika@async.=3D<br>&gt=3B &gt=3Bcaltech.edu&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &=<br>> >lt=3Bbr&gt=3B&amp=3Bgt=3D3B &lt=3Bbr&gt=3B&amp=3Bgt=3D3B BTW I had the same=<br>> > experience w=3D<br>&gt=3B &gt=3Bhen I first started using Modula-3.&lt=3Bb=<br>> >r&gt=3B&amp=3Bgt=3D3B It was painful to jump throug=3D<br>&gt=3B &gt=3Bh al=<br>> >l its hoops=3D2C coming from C=3D2C where you&lt=3Bbr&gt=3B&amp=3Bgt=3D3B c=<br>> >an do whatever you=3D<br>&gt=3B &gt=3B want to whatever bits happen to be s=<br>> >loshing around&lt=3Bbr&gt=3B&amp=3Bgt=3D3B your machine.=3D<br>&gt=3B &gt=<br>> >=3B  C++ from what I have seen mainly lets you do that to&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B more bits =3D<br>&gt=3B &gt=3Bin fewer lines of code.&lt=3Bbr&gt=<br>> >=3B&amp=3Bgt=3D3B &lt=3Bbr&gt=3B&amp=3Bgt=3D3B But after a while I really c=<br>> >am=3D<br>&gt=3B &gt=3Be to appreciate the value of things like the&lt=3Bbr&=<br>> >gt=3B&amp=3Bgt=3D3B language's telling m=3D<br>&gt=3B &gt=3Be I'm using the=<br>> > wrong data structure instead of&lt=3Bbr&gt=3B&amp=3Bgt=3D3B just letting m=<br>> >e u=3D<br>&gt=3B &gt=3Bse the same "nice=3D2C terse=3D2C efficient" syntax =<br>> >to write&lt=3Bbr&gt=3B&amp=3Bgt=3D3B a crappy=3D<br>&gt=3B &gt=3B program :=<br>> >-)&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &lt=3Bbr&gt=3B&amp=3Bgt=3D3B mika writes:&lt=<br>> >=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3BYou're using=3D<br>&gt=3B &gt=3B th=<br>> >e wrong (abstract) data structure if you want sort and unique.&lt=3Bbr&gt=<br>> >=3B&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B &amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D3BA "sequence" is meant to be accessed sequentially..=3D<=<br>> >br>&gt=3B &gt=3B.&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&lt=3Bbr&gt=3B&=<br>> >amp=3Bgt=3D3B &amp=3Bgt=3D3BNot knowing precisely what you're doing =3D<br>=<br>> >&gt=3B &gt=3Bit sounds like you might want a&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &a=<br>> >mp=3Bgt=3D3BSortedTable... you can get =3D<br>&gt=3B &gt=3Bunique on insert=<br>> > and access it in increasing&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3Bor d=<br>> >ecreasing =3D<br>&gt=3B &gt=3Border.&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=<br>> >=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B    Mika&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B &=<br>> >amp=3Bgt=3D3BJay K writes:&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=<br>> >=3Bgt=3D3B--_d2a02ece-d492-410e-88fb-fb537=3D<br>&gt=3B &gt=3B37d7219_&lt=<br>> >=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3BContent-Type: text/pl=<br>> >ain=3D3B charset=3D3D"iso-8=3D<br>&gt=3B &gt=3B859-1"&lt=3Bbr&gt=3B&amp=3Bg=<br>> >t=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3BContent-Transfer-Encoding: quoted-printa=<br>> >ble&lt=3Bbr=3D<br>&gt=3B &gt=3B&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=<br>> >=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B    I have an=<br>> > IntSeq.T with a bu=3D<br>&gt=3B &gt=3Bnch of integers.   =3D3D20&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B    What is a good terse eff=<br>> >=3D<br>&gt=3B &gt=3Bicient idiom for sort and unique?   =3D3D20&lt=3Bbr&gt=<br>> >=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B =<br>> >=3D<br>&gt=3B &gt=3B&amp=3Bgt=3D3B&amp=3Bgt=3D3B    In C++ I would say:    =<br>> >    vector&amp=3Blt=3D3Bint&amp=3Bgt=3D3B a=3D3D3B    =3D<br>&gt=3B &gt=3B =<br>> >   a.push_back(...)=3D3D3B =3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B=<br>> >&amp=3Bgt=3D3B       a.push_back(...)=3D<br>&gt=3B &gt=3B=3D3D3B        std=<br>> >::sort(a.begin()=3D3D2C a.end())=3D3D3B       =3D3D&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bgt=3D3B a.resize(std::unique=<br>> >(a.begin()=3D3D2C a.end()) - a.begin())=3D3D3B   =3D<br>&gt=3B &gt=3B     f=<br>> >or (aut=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bo i =<br>> >=3D3D3D a.begin()=3D3D3B i !=3D3D3D a.=3D<br>&gt=3B &gt=3Bend()=3D3D3B ++i)=<br>> >    {&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B      do stuf=<br>> >f with *i    }=3D3D20=3D<br>&gt=3B &gt=3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=<br>> >=3Bgt=3D3B&amp=3Bgt=3D3B    Nice=3D3D2C terse=3D3D2C efficient.        In M=<br>> >odula=3D<br>&gt=3B &gt=3B-3?   =3D3D20&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bg=<br>> >t=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D=<br>> >3BI know that unique=3D<br>&gt=3B &gt=3B is one of the easiest algorithms t=<br>> >o manually write inlin=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D<br>&gt=<br>> >=3B &gt=3B=3D3B&amp=3Bgt=3D3Be=3D3D2Cbut I shouldn't have to.&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &am=<br>> >p=3Bg=3D<br>&gt=3B &gt=3Bt=3D3B&amp=3Bgt=3D3B(I'm really trying to stay in =<br>> >Modula-3 here=3D3D2C but it is defini=3D<br>&gt=3B &gt=3Btely a strug=3D3D&=<br>> >lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bgle. :( )&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3B=3D<br>=<br>> >&gt=3B &gt=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3BThank you=3D3D2C - Jay&lt=<br>> >=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3B=<br>> >gt=3D3B &amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bgt=3D3B                                         =3D3D&l=<br>> >t=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B--_d2=3D<br>&gt=3B &gt=3Ba02ece-d492=<br>> >-410e-88fb-fb53737d7219_&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bg=<br>> >t=3D3BContent-Type: tex=3D<br>&gt=3B &gt=3Bt/html=3D3B charset=3D3D"iso-885=<br>> >9-1"&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3BContent-Transf=<br>> >er-Enc=3D<br>&gt=3B &gt=3Boding: quoted-printable&lt=3Bbr&gt=3B&amp=3Bgt=3D=<br>> >3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&=<br>> >amp=3Bgt=3D3B&amp=3Blt=3D3B=3D<br>&gt=3B &gt=3Bhtml&amp=3Bgt=3D3B&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&amp=3Blt=3D3Bhead&amp=3Bgt=<br>> >=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&amp=3Blt=3D<=<br>> >br>&gt=3B &gt=3B=3D3Bstyle&amp=3Bgt=3D3B&amp=3Blt=3D3B!--&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B.hmmessage P&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B&amp=3Bgt=3D3B{&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bmargin:0px=3D3D3B&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bpadding=3D<br>&gt=3B &gt=3B:0px&lt=<br>> >=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B}&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bbody.hmmessage&lt=3Bbr&gt=3B&amp=3Bg=<br>> >t=3D3B=3D<br>&gt=3B &gt=3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B{&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bfont-size: 12pt=3D3D3B&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3B=3D<br>&gt=3B &gt=3Bgt=3D3Bfont-family:=<br>> >Calibri&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B}&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B--&amp=3Bg=3D<br>&gt=3B &gt=<br>> >=3Bt=3D3B&amp=3Blt=3D3B/style&amp=3Bgt=3D3B&amp=3Blt=3D3B/head&amp=3Bgt=3D3=<br>> >B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B&amp=3Blt=3D3Bbod=<br>> >y cl=3D<br>&gt=3B &gt=3Bass=3D3D3D'hmmessage'&amp=3Bgt=3D3B&amp=3Blt=3D3Bdi=<br>> >v dir=3D3D3D'ltr'&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D<br>=<br>> >&gt=3B &gt=3B=3D3Bnbsp=3D3D3B&amp=3Bamp=3D3Bnbsp=3D3D3BI have =3D3D&lt=3Bbr=<br>> >&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Ban IntSeq.T wi=3D<br>&gt=<br>> >=3B &gt=3Bth a bunch of integers.&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3B=<br>> >nbsp=3D3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3Bbr&a=<br>> >mp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspa=3D3D&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bn style=3D3D3D"f=3D<br>&gt=<br>> >=3B &gt=3Bont-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &=<br>> >amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D<br>&gt=3B &gt=3B=<br>> >=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B =<br>> >&amp=3Bgt=3D3B&amp=3Bgt=3D3B-size: 12pt=3D3D3B "&amp=3Bg=3D<br>&gt=3B &gt=<br>> >=3Bt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3BWhat is=<br>> > a good terse efficient idiom f=3D<br>&gt=3B &gt=3Bor so=3D3D&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Brt and unique?&amp=3Blt=3D3Bspan=<br>> > style=3D3D3D"font-siz=3D<br>&gt=3B &gt=3Be: 12pt=3D3D3B "&amp=3Bgt=3D3B&am=<br>> >p=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=<br>> >=3Bgt=3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3B=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D=<br>> >3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&a=<br>> >mp=3Bgt=3D3B&amp=3Ba=3D<br>&gt=3B &gt=3Bmp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/sp=<br>> >an&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Blt=3D3B/div&a=<br>> >mp=3Bgt=3D3B&amp=3Blt=3D3Bdiv=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D=<br>> >3B&amp=3Bgt=3D3B&amp=3Bgt=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3B=3D<br>&=<br>> >gt=3B &gt=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3B=<br>> >amp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B In C++ I wo=3D<br>&gt=3B &gt=<br>> >=3Buld say:&amp=3Blt=3D3Bspan style=3D3D3D"font-si=3D3D&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bze: 12pt=3D3D3=3D<br>&gt=3B &gt=3BB =<br>> >"&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3B=<br>> >lt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D<br>&gt=3B &gt=3B=3D3D=<br>> >3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3B=3D3D&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bnbsp=3D3D3=3D<br>&gt=3B &gt=3BB&=<br>> >amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=<br>> >=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font=3D<br>&gt=3B &gt=<br>> >=3B-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=<br>> >=3D3Bnbsp=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D<br>&g=<br>> >t=3B &gt=3B=3D3B=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan =<br>> >style=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B&amp=<br>> >=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3Bvector&amp=3Bamp=3D3=<br>> >Blt=3D3D3Bin=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B=3D<br>&gt=3B &=<br>> >gt=3B&amp=3Bgt=3D3Bt&amp=3Bamp=3D3Bgt=3D3D3B a=3D3D3B&amp=3Blt=3D3Bspan sty=<br>> >le=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3B=<br>> >amp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bsp=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B =3D<br>&gt=3B &gt=3B=<br>> >&amp=3Bgt=3D3B&amp=3Bgt=3D3Ban style=3D3D3D"font-size: 12pt=3D3D3B "&amp=3B=<br>> >gt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3B/span&am=<br>> >p=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&=<br>> >amp=3Blt=3D3Bspan style=3D3D3D"f=3D3D&lt=3Bbr&gt=3B=3D<br>&gt=3B &gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bont-size: 12pt=3D3D3B "&amp=3Bgt=3D3=<br>> >B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D<br>&gt=3B &gt=3B=3D3D3B&=<br>> >amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font-size: =<br>> >12pt=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bg=3D<br>&gt=3B &gt=3Bt=3D3B&am=<br>> >p=3Bgt=3D3B=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/=<br>> >span&amp=3Bgt=3D3Ba.push_back(...)=3D3D=3D<br>&gt=3B &gt=3B3B&amp=3Blt=3D3B=<br>> >span style=3D3D3D"font-size: 12pt=3D3D3B "=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B=<br>> > &amp=3Bgt=3D3B&amp=3Bgt=3D3B&amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bamp=<br>> >=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3=<br>> >B&amp=3Blt=3D3Bspan style=3D3D3D"=3D<br>&gt=3B &gt=3Bfont-size: 12pt=3D3D3B=<br>> > "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span=3D3D&lt=3Bbr&=<br>> >gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B&amp=3Bgt=3D3B&amp=3B=<br>> >gt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=<br>> >=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D<br>&gt=3B &gt=3B=3D3=<br>> >D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=<br>> >=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/s=3D<br>&gt=3B &gt=3Bpa=3D3D&lt=3Bbr&g=<br>> >t=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bn&amp=3Bgt=3D3B&amp=3Blt=3D3=<br>> >Bspan style=3D3D3D"font-size: 12pt=3D3D=3D<br>&gt=3B &gt=3B3B "&amp=3Bgt=3D=<br>> >3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3Ba.push_back(..=<br>> >.)=3D3D3B&amp=3Blt=3D3Bsp=3D3D=3D<br>&gt=3B &gt=3B&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Ban style=3D3D3D"font-size: 12pt=3D3D3B "&=<br>> >amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbs=3D<br>&gt=3B &gt=3Bp=3D3D3B &amp=3Bamp=3D3B=<br>> >nbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D3D=<br>> >"fon=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B &amp=3Bgt=3D3B&am=<br>> >p=3Bgt=3D3Bt-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&am=<br>> >p=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3B=3D<br>&gt=3B &gt=3Blt=3D3B/div&amp=3B=<br>> >gt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font-=<br>> >size: 12pt=3D3D&lt=3Bbr&gt=3B&amp=3B=3D<br>&gt=3B &gt=3Bgt=3D3B &amp=3Bgt=<br>> >=3D3B&amp=3Bgt=3D3B=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=<br>> >=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span=3D<br>&gt=3B &gt=3B&amp=3Bgt=3D3B=<br>> >&amp=3Blt=3D3Bspan style=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=<br>> >=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3B=3D3D&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B/span&amp=3Bgt=3D3Bstd::sort(a.b=<br>> >egin()=3D3D2C a.end())=3D<br>&gt=3B &gt=3B=3D3D3B&amp=3Blt=3D3Bspan style=<br>> >=3D3D3D"font-size: 12pt=3D3D3B "=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=<br>> >=3D3B&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D=<br>> >3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=<br>> >=3D3Bspan style=3D3D=3D<br>&gt=3B &gt=3B3D"font-size: 12pt=3D3D3B "&amp=3Bg=<br>> >t=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span=3D3D&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bgt=3D3B&amp=3Bgt=3D3B&a=<br>> >mp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3B=<br>> >span style=3D3D3D"font-si=3D<br>&gt=3B &gt=3Bze: 12pt=3D3D3B "&amp=3Bgt=3D3=<br>> >B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&a=<br>> >mp=3Bgt=3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3Bsp=3D3D&lt=3Bbr&gt=3B&amp=3Bg=<br>> >t=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Ban style=3D3D3D"font-size: 12pt=3D3D3B "=<br>> >&amp=3Bgt=3D3B&amp=3Ba=3D<br>&gt=3B &gt=3Bmp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/=<br>> >span&amp=3Bgt=3D3Ba.resize(std::unique(a.begi=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bgt=3D3Bn()=3D3D2C a.end()) -=<br>> > a.begin())=3D3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font-size=3D<br>&gt=3B &g=<br>> >t=3B: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B=3D3D&lt=3Bbr&gt=<br>> >=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B &amp=3Bamp=3D3Bnbsp=3D<br>&g=<br>> >t=3B &gt=3B=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=<br>> >=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bam=3D<br>&gt=3B &gt=3B=<br>> >p=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3B=<br>> >gt=3D3B&amp=3Blt=3D3Bd=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=<br>> >=3Bg=3D<br>&gt=3B &gt=3Bt=3D3Biv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D=<br>> >3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D<br>&gt=3B &=<br>> >gt=3B=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B for (auto i =3D3D3D a.=3D3D&lt=3Bbr=<br>> >&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bbegin(=3D<br>&gt=3B &gt=3B=<br>> >)=3D3D3B i !=3D3D3D a.end()=3D3D3B ++i)&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&am=<br>> >p=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv=3D<br>&gt=3B &gt=3B&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font-size=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=<br>> >=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B: 12pt=3D3D3B =3D<br>&gt=3B &gt=3B"&amp=<br>> >=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B {&amp=3Blt=<br>> >=3D3Bbr&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Ba=3D<br>&gt=3B &gt=<br>> >=3Bmp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B do stuff with=3D3D&lt=3Bbr=<br>> >&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B *i&amp=3B=3D<br>&gt=3B &g=<br>> >t=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3=<br>> >Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=3D3D3D"font-s=3D<br>&gt=3B &gt=<br>> >=3Bize: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D=<br>> >3Bnbsp=3D3D3B =3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D<br>&gt=3B &gt=<br>> >=3B=3D3B&amp=3Bgt=3D3B}&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&=<br>> >amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=<br>> >=3B=3D<br>&gt=3B &gt=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Bl=<br>> >t=3D3Bdiv&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B&amp=3Blt=3D3Bspan style=3D3D3D"=<br>> >font-si=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bze: 12=<br>> >pt=3D3D3B "&amp=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &am=<br>> >p=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan =<br>> >style=3D3D3D"=3D<br>&gt=3B &gt=3Bfont-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=<br>> >=3Bamp=3D3B=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bnb=<br>> >sp=3D3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3B/span&amp=3Bgt=3D3BNice=3D3D2C t=<br>> >erse=3D3D2C efficient.&amp=3Blt=3D3Bspan style=3D3D3D"font-siz=3D<br>&gt=3B=<br>> > &gt=3Be: 12pt=3D3D3B =3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=<br>> >=3Bgt=3D3B"&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D<=<br>> >br>&gt=3B &gt=3B=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan =<br>> >style=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bam=3D<br>&gt=3B &=<br>> >gt=3Bp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/spa=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &=<br>> >amp=3Bgt=3D3B&amp=3Bgt=3D3Bn&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&=<br>> >amp=3Blt=3D<br>&gt=3B &gt=3B=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan style=<br>> >=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D<br>&gt=<br>> >=3B &gt=3B=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D=<br>> >3B&amp=3Blt=3D3Bs=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=<br>> >=3D3Bpan=3D<br>&gt=3B &gt=3B style=3D3D3D"font-size: 12pt=3D3D3B "&amp=3Bgt=<br>> >=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3BIn=3D<br>&g=<br>> >t=3B &gt=3B Modula-3?&amp=3Blt=3D3Bspan style=3D3D3D=3D3D&lt=3Bbr&gt=3B&amp=<br>> >=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B"font-size: 12pt=3D<br>&gt=3B &gt=3B=<br>> >=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B &amp=3Bamp=3D3Bnbsp=3D3D3=<br>> >B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3Bspan s=3D<br>&gt=3B &gt=3Bt=<br>> >yle=3D3D3D"font-size: 12p=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&a=<br>> >mp=3Bgt=3D3Bt=3D3D3B "&amp=3Bgt=3D3B&amp=3Bamp=3D3Bnbsp=3D<br>&gt=3B &gt=3B=<br>> >=3D3D3B&amp=3Blt=3D3B/span&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&am=<br>> >p=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/d=<br>> >=3D<br>&gt=3B &gt=3Biv&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Bl=<br>> >t=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=<br>> >=3Bgt=3D3BI know =3D<br>&gt=3B &gt=3Bthat =3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B=<br>> > &amp=3Bgt=3D3B&amp=3Bgt=3D3Bunique is one of the easiest algorithms to m=<br>> >=3D<br>&gt=3B &gt=3Banually write inline=3D3D2C&amp=3Blt=3D3B/div&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bd=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3B=<br>> >gt=3D3Bi=3D<br>&gt=3B &gt=3Bv&amp=3Bgt=3D3Bbut I shouldn't have to.&amp=3Bl=<br>> >t=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bbr&amp=<br>> >=3Bgt=3D<br>&gt=3B &gt=3B=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3=<br>> >Bdiv&amp=3Bgt=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=<br>> >=3D3B&amp=3Blt=3D3Bdiv&amp=3Bg=3D<br>&gt=3B &gt=3Bt=3D3B(I'm re=3D3D&lt=3Bb=<br>> >r&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3Bally trying to stay in Mo=<br>> >dula-3 here=3D<br>&gt=3B &gt=3B=3D3D2C but it is definitely a struggle. :(=<br>> >=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B )&amp=3Blt=<br>> >=3D3B=3D<br>&gt=3B &gt=3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3B&=<br>> >amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3B=<br>> >div&amp=3Bgt=3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3Bbr&amp=3Bgt=3D3B&amp=3Bl=<br>> >t=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D3Bdiv&amp=3Bgt=3D3BThank you=3D3D2C&amp=<br>> >=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D<br>&gt=3B &gt=3B=3D3Bdiv&amp=3Bgt=<br>> >=3D3B&amp=3Bamp=3D3Bnbsp=3D3D3B-=3D3D&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3Bgt=<br>> >=3D3B&amp=3Bgt=3D3B Jay&amp=3Blt=3D3B/div&amp=3Bgt=3D3B=3D<br>&gt=3B &gt=3B=<br>> >&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3Bbr&amp=3Bgt=3D3B&amp=3Blt=3D3B/=<br>> >div&amp=3Bgt=3D3B                                       &amp=3Blt=3D3B/div&amp=3Bgt=3D3B&amp=3Blt=3D<b=<br>> >r>&gt=3B &gt=3B=3D3B/body&amp=3Bgt=3D3B&lt=3Bbr&gt=3B&amp=3Bgt=3D3B &amp=3B=<br>> >gt=3D3B&amp=3Bgt=3D3B&amp=3Blt=3D3B/html&amp=3Bgt=3D3B=3D3D&lt=3Bbr&gt=3B&a=<br>> >mp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3B=3D<br>&gt=3B &gt=3Bgt=3D3B&lt=3Bbr&gt=3B=<br>> >&amp=3Bgt=3D3B &amp=3Bgt=3D3B&amp=3Bgt=3D3B--_d2a02ece-d492-410e-88fb-fb537=<br>> >37d7219_--&lt=3Bbr&gt=3B&lt=3B=3D<br>&gt=3B &gt=3B/div&gt=3B&lt=3B/div&gt=<br>> >=3B                                    &lt=3B/div&gt=3B&lt=3B/body&gt=3B<br>&gt=3B &gt=3B&lt=3B/htm=<br>> >l&gt=3B=3D<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B--_7877d7e8-cb4a-4989-bdcd-d406=<br>> >e5b1f51f_--<br></div></div></div>                                      </div></body><br>> ></html>=<br>> ><br>> >--_13e6ee6a-034c-469d-aa83-18379d050866_--<br></div></div>                                    </div></body>
</html>