Skip to content
This repository was archived by the owner on Oct 3, 2026. It is now read-only.
This repository was archived by the owner on Oct 3, 2026. It is now read-only.

Question: Edges of different types #245

Description

Hi,

I have managed to compile and get the friends example working, so I think I have more or less understood how to represent 1 to many relationship in TSL. However its not entirely clear for me how to represent the edges where I have a single node type which can have 5 different edge types connecting the nodes. Both the nodes and the edges hold data.

So e.g. I can have

cell struct myNode
{
    string name;
    string owner;
    list<long> edges;
}

cell struct myEdge
{
    long StartNode;
    long EndNode;
    int8 EdgeType;
    float weight;
    string sourcePath;
}

which lets me find the start and end myNodes given any myEdge and lets me get the list of myEdges for a given myNode. However its less friendly to then get from a given myNode only those myEdges which have a certain edgeType.

Is there a better way to structure this to make this kind of query more direct? Not every myNode has every edge type and there may be multiple myEdges of a given type connected between two myNodes

Thanks in advance for any help you can offer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions