Martin Baker wrote:
>
> I am experimenting with second order graphs (by this I mean graphs
> whose vertices are themselves graphs).
>
> This works to a limited extent as you can see here:
> http://www.euclideanspace.com/maths/standards/program/mycode/discrete/graph/design/multilevel/
>
> The problem is that that it only works for a specific domain:
> DirectedGraph(DirectedGraph(String)
> I would like it to work for a more general category:
> FiniteGraph(FiniteGraph(SetCategory)
> where:
> DirectedGraph(S) is a domain that extends category FiniteGraph(S)
>
> One problem that I have, in trying to make it more general, is that
> the 'has' keyword seems to match on a category for the outer type but
> not the inner type.
Yes, this is current limitation. Normally in FriCAS library
this problem is "solved" by passing all parameters even if
some at first look redundant.
In you case it would be:
Foo(A, B, C) ...
if B has FiniteGraph(A) and C has FiniteGraph(B) then
....
And use it like Foo(String, DirectedGraph(String),
DirectedGraph(DirectedGraph(String))).
Yes, it is clumsy and there are some proposals to allow more
compact notation, but the issues here are at core of FriCAS
type system, so do not expect rapind change.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.