Trying to Express Constraints using a data structure

Hi all, I'm trying to express a constraint using a data structure. Let's say I'd want to express a "mapping" of a to b, c to b, d to b and e to f. A mapping can also be from a to a, b to b and so on. The constraint is that one cannot map a to b if b was already "mapped" to let's say c. I'd like to express this constraint in a data structure, but haven't figured out how, yet. Any suggestions? Günther

On 16:25 Mon 18 May , Gü?nther Schmidt wrote:
Hi all,
I'm trying to express a constraint using a data structure.
Let's say I'd want to express a "mapping" of a to b, c to b, d to b and e to f.
A mapping can also be from a to a, b to b and so on.
The constraint is that one cannot map a to b if b was already "mapped" to let's say c.
I'd like to express this constraint in a data structure, but haven't figured out how, yet.
Hum, there was that paper where they developed a DSL for GPU computations. I remember there was the problem that GPUs can't compute "maps of maps" and they solved it using a data structure: http://www.cse.unsw.edu.au/~chak/papers/LCGK09.html Hope that helps. Steffen
participants (2)
-
Günther Schmidt
-
Steffen Schuldenzucker