Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3044

coming up with data structure for the algorithm

$
0
0
Hello,

I have list of unique keys for the mobile cells, and i can get the info about the cells, from those keys.

Also these cells are grouped into sites, based on the parent id info available on the cell.

Now i have a algo, may be initially i will tell the simple alog, later on share the actual one.

In the attached pics(siteplan),

i want to group the cells, under each site. Now lets say site1 is the centre site as specified by the user. And from the list of cells in the region, i comeup that, site1 has C1, C2, and C3 cells.
And c2 has C22 as neighbour with distance d1
C1 has C31 as neighbour.
C3 has C52 as neighbour.

I got a req saying that, i need to give the same TAC for the site which has shortest neighbour to site1. Then assign the TAC for next lowest distance, until the TAC1 < maxTAC. Then for the next one assign TAC2,..etc

Alll i now have a set of keylists..Could you give me some hint on the data structure i can come up.

I am thinking of map of tuple, may be initially combile all cells that belong to same site.

map( site, < c1, neigh id, distance>
< >
)

is this ok ?
And a
Attached Images
  

Viewing all articles
Browse latest Browse all 3044

Trending Articles