GraphEngine icon indicating copy to clipboard operation
GraphEngine copied to clipboard

Generic fields backed by ITrinityStruct/IAccessor

Open yatli opened this issue 8 years ago • 1 comments

This could be very useful for implementing generic algorithms on different cell types. Take this example:

struct E
{
    [GraphEdge]
    cellid neighbor;
    [GraphEdgeWeight]
    double weight;
}

cell V
{
    [CompositeEdge]
    List<E> edges;
}

Currently ICell.GetField<T> only accepts non-generic types, so user-defined composite edge types are not possible. If we implement a generic field, we can then write ICell.EnumerateValues<IField>("CompositeEdge") without worrying about the type. Then, an algorithm can proceed and inspect [GraphEdge] and [GraphEdgeWeight] from the generic field respectedly.

yatli avatar Feb 25 '17 12:02 yatli

@yatli I just saw this and yeah this would be a most excellent addition and suits my needs well. Right now I have all of this type of generic typing and graph exploration in code I hand write against the GE generated code. What do we need to do to get started on this?

TaviTruman avatar Mar 19 '17 14:03 TaviTruman