neighbours

Generating 'neighbours' for users based on rating

I'm looking for techniques to generate 'neighbours' (people with similar taste) for users on a site I am working on; something similar to the way last.fm works. Currently, I have a compatibilty function for users which could come into play. It ranks users on having 1) rated similar items 2) rated the item similarly. The function weighs ...

Spatial Data Structures for moving objects?

I was wondering what is the best data structure to deal with a lot of moving objects(spheres, triangles, boxes, points, etc)? I'm trying to answer two questions, Nearest Neighbor and Collsion detection. I do realize that traditionally, data structures like R trees are used for nearest neighbor queries and Oct/Kd/BSP are used for collis...

Neighbour cells (ID & Rx level) & Apple developer program

Hello! I'm a student in telecommuncations and I have to developp a program for a mobile phone (the platform is still to decide) that gathers informations about the active cell and the neighbour cells. I've been searching for a while now and I haven't found any public solution fitting my needs. I was wondering if the apple developer pr...

Any references on how to implement quadtrees with periodic limits?

Hi all, I have spatial data - (x, y) points on a plane - which I'm partitioning using quadtrees. The idea is to find which points are neighbors to a given (a, b) point. The points are neighbors if there some (say L) distance between the two. The problem is that the space is periodic, that is if a point is very close to the edge (< L) th...

Select surrounding rows php/mysql

I want to select a group of rows around a row matched on conditions, ie select a row and then return 5 records before and after it. More info as requested (sorry bout that!) Ok, so the table records lap times from a race. Laps are related to Users (users have many laps). I want to find the best lap time for a User then x number of best...

CakePHP: find neighbors, order on 'name' or 'order'

Hi, I have a list of ordered items, ordered according to the int field order. I'm creating a gallery in CakePHP 1.2 that has a prev and next button and those should link to the previous and next item according to their ordering, not according to their id. In order to get this result I've included the 'order' parameter to the find funct...

How many combinations of k neighboring pixels are there in an image?

I suck at math, so I can't figure this out: how many combinations of k neighboring pixels are there in an image? Combinations of k pixels out of n * n total pixels in the image, but with the restriction that they must be neighbors, for each k from 2 to n * n. I need the sum for all values of k for a program that must take into account th...

CakePHP find('neighbors') use [next] and [prev] from array

I am trying to get the neighbors Ids of the current Id. What I have below works, but I cannot separate the [prev] from the [next] link. The function in the controller looks as follows: function prevNext() { return $this->System->find('neighbors', array('fields' => 'name', 'value' => 3)); } Which will output something like this: ...