Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sinks method return [null] #82

Open
idellien opened this issue Apr 11, 2018 · 2 comments
Open

Sinks method return [null] #82

idellien opened this issue Apr 11, 2018 · 2 comments

Comments

@idellien
Copy link

Hi, thanks for your great work!
I have an issue with sinks method. Here is my graph in JSON view

{
  "options": {
    "directed": true,
    "multigraph": false,
    "compound": false
  },
  "nodes": [
    {
      "v": "20269"
    },
    {
      "v": "42556"
    },
    {
      "v": "43435"
    },
    {
      "v": "56487"
    },
    {
      "v": "87863"
    },
    {
      "v": "90135"
    },
    {
      "v": "94830"
    },
    {
      "v": "95646"
    },
    {
      "v": "null"
    }
  ],
  "edges": [
    {
      "v": "95646",
      "w": "null"
    },
    {
      "v": "43435",
      "w": "87863"
    },
    {
      "v": "94830",
      "w": "56487"
    },
    {
      "v": "56487",
      "w": "20269"
    },
    {
      "v": "20269",
      "w": "42556"
    },
    {
      "v": "42556",
      "w": "null"
    },
    {
      "v": "87863",
      "w": "90135"
    },
    {
      "v": "87863",
      "w": "94830"
    },
    {
      "v": "90135",
      "w": "20269"
    },
    {
      "v": "90135",
      "w": "56487"
    }
  ]
}

I have pushed 8 nodes, but graph create a new one with id null, do you know why this can happen?
And the main issue
graph.sinks() ---> [null]
but from graph you can find that there should be 2 nodes [95646, 42556]

@dionyziz
Copy link

Your example is incorrect. The output of graph.sinks() is correct. The only sink is the node with the label null. The node 95646 is not a sink because it has an outgoing edge to the node labelled null. The node 42556 is not a sink because it also has an outgoing edge to the node labelled null.

Are you treating null nodes somehow specially? Can you provide the code you are running instead of the JSON?

@idellien
Copy link
Author

@dionyziz Thanks for answer, by this time hardly to remember problem details. Code was already changed. I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants