tmewett / BrogueCE

Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game
https://sites.google.com/site/broguegame/
GNU Affero General Public License v3.0
1.03k stars 109 forks source link

[Question] What does `pdsMap` mean? #671

Closed blueloveTH closed 3 months ago

blueloveTH commented 8 months ago

Hello, I am doing research about BrougeCE's source code dijkstra.c.

I want to know what does pds and pdsMap mean in English. Are they abbreviations of something? I need this information to learn this algorithm.

typedef struct pdsLink {
    short distance;
    short cost;
    struct pdsLink *left;
    struct pdsLink *right;
} pdsLink;

typedef struct pdsMap {
    pdsLink front;
    pdsLink links[DCOLS * DROWS];
} pdsMap;

static void pdsUpdate(pdsMap *map, boolean useDiagonals) {
    short dirs = useDiagonals ? 8 : 4;

    pdsLink *head = map->front.right;

...
joshuaday commented 4 months ago

Progressive Dijkstra Scan. It can take initial values and work from there, so it's kind of a many-to-many search.

blueloveTH commented 3 months ago

Thanks!