Re: Unshuffle algorithm



"John D'Errico" <woodchips@xxxxxxxxxxxxxxxx> wrote in
message <f91sg2$3gh$1@xxxxxxxxxxxxxxxxxx>...
"Sven " <sven.holcombe@xxxxxxxxxxxxxxxxxxxx> wrote in message
<f91dom$3hv$1@xxxxxxxxxxxxxxxxxx>...
Hi there,
I have an array of numbers made up of two sequences that
have been sorted. I am trying to find an algorithm that can
extract separate arrays made up of these sequences.

For example:
arr1 = sort([1:5 7:0.5:10]);

If I might ask, what is the source of this problem?
Its exactly the second time I've seen it come up,
the last being roughly 1.5 years ago.

This is, as I see it, a variant of clustering problem.
I can supply a code that does it, using my
consolidator tool as part of the engine. I'd not
seen a reason to post it on the file exchange the
first time it was asked.

Its a bit long to paste in here though. Send me an
e-mail if you want it.

John


Hi John, thanks for the input.
Actually it was for a way to unshuffle a set of dicom images
that had been converted to flat images without metadata. The
filenames were ordered correctly spatially, but this meant
that two separate series had been intertwined because they
overlapped. I'm using past tense here because the original
dicom files have now been tracked down, and I'm sure that I
can now use the metadata to sort things out correctly.
So it's no longer an issue to work out an unshuffling
algorithm, but thanks very much for your interest.

Cheers,
Sven.
.



Relevant Pages

  • "Algorithmic Randomness, Quantum Physics, and Incompleteness"
    ... all finite sequences are to be found infinitely often and ... different members of the infinite set of random numbers. ... Just using random numbers with initial digits 1 thru 9, ... it generated by a shorter input algorithm than the length ...
    (sci.logic)
  • Re: compression - insights into infinite
    ... output sequences, your technology isn't reversible, plain and simple. ... For that, it needs an algorithm. ... Not very convenient for a compressor, ... he notice but he also remembers his promises, and I assure you, you ...
    (comp.compression)
  • Re: regex question - trying to find ".mp3" in a SELECT box
    ... But `Array' is a Function object reference. ... Establish a new execution context using F's FormalParameterList, ... Since is not a primitive value, the exception should be thrown. ... | 5.2 Algorithm Conventions ...
    (comp.lang.javascript)
  • Re: Mergesort Vs Quicksort
    ... I might not have correctly remembered my algorithm of months ago ... for sorting records in an array using one auxilary of the ... on how things turn out from lower levels of recursion, ... whether the number of records in the array segment to be sorted is ...
    (comp.programming)
  • Re: Reference to derived type element by index?
    ... as a set of distinctively-named scalars. ... In another scope, the same common block ... would be a single array. ... algorithm and a specific application of the algorithm, ...
    (comp.lang.fortran)

Loading