jarvis patrick clustering

I guess it shouldn't be too difficult to do, but no point in re-inventing the wheel so has anyone got an implementation of this in Pipeline Pilot that they'd be willing to share?