need help for an algorithm...
From: Andreas Leitgeb (avl_at_gamma.logic.tuwien.ac.at)
Date: 10/27/04
- Next message: Helmut Giese: "Re: fast search and compare"
- Previous message: Mitch: "fast search and compare"
- Next in thread: Robert Seeger: "Re: need help for an algorithm..."
- Reply: Robert Seeger: "Re: need help for an algorithm..."
- Reply: Googie: "Re: need help for an algorithm..."
- Reply: Michael Schlenker: "Re: need help for an algorithm..."
- Reply: Bruce Hartweg: "Re: need help for an algorithm..."
- Reply: Erik Leunissen: "Re: need help for an algorithm..."
- Reply: Ulrich Schöbel: "Re: need help for an algorithm..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Oct 2004 13:24:51 GMT
I've got a hexagonal grid (each cell has 6 neighbours), where some
cells are filled and some are empty. I'd need an algorithm to check,
if the set of filled cells is contiguous.
e.g. (x is filled, o is empty)
o o o x x o x x
o x o o x o x o
o x x x x x o o
is contiguous, but
o o o x x o x x
o x o o o o x o
o x x x x x o o
is not (first row, fourth & fifth item are separated from rest)
To simplify it (hopefully), I can rely on contiguousness at
start, and only need to recheck, if one "fill" of some cell
moves to another (previously empty) one.
PS: the grid itself is of course finite and always contiguous.
- Next message: Helmut Giese: "Re: fast search and compare"
- Previous message: Mitch: "fast search and compare"
- Next in thread: Robert Seeger: "Re: need help for an algorithm..."
- Reply: Robert Seeger: "Re: need help for an algorithm..."
- Reply: Googie: "Re: need help for an algorithm..."
- Reply: Michael Schlenker: "Re: need help for an algorithm..."
- Reply: Bruce Hartweg: "Re: need help for an algorithm..."
- Reply: Erik Leunissen: "Re: need help for an algorithm..."
- Reply: Ulrich Schöbel: "Re: need help for an algorithm..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|