graphs / design decision, eins, zwei oder drei



> Now, what is
> subst(2,1,g);
> supposed to do:
>
> 1. hypergraph([1,2,3],[[[1,2],2],[[1,3],2],[[2,3],2]],True)
> (only edge weights are affected)
>
> 2. hypergraph([1,2,3],[[[2,2],2],[[2,3],2],[[2,3],2]],True)
> (edge weights and the vertex names the edges consist of)
>
> 3. hypergraph([2,3],[[[2,2],2],[[2,3],2],[[2,3],2]],True)
> (vertex names and edge weights)???
>
> I final possibility would be to *require* that vertex names are always
> strings and implement 3.
>
> I think that 3 is most consistent with usual maxima behaviour, so it is
> probably the right thing to do...

I think (2) is unlogical, so it would be either (1),(3) or only the vertex
names and no edge weights (that would make sense because you could subst
one graph into an isomorphic one).

If you require vertex names to be strings, you would have the problem you
wanted to avoid as soon as you use strings as edge weights (yes, they
wouldn't be weights then, but edge labels.)

I guess it would be fine to use (3) and make sure the existing functions
that generate graphs use disjoint sets for edge weights and vertex names.

Regards,
Yannick