Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:48:21+00:00 2026-06-15T18:48:21+00:00

Is there a very short expression in iGraph 0.6 for python 2.7 to see

  • 0

Is there a very short expression in iGraph 0.6 for python 2.7 to see if two vertices specified by index are connected by an edge or not?

I found somewhere:

are_connected(v1, v2)  

but in python I would get an error message: “NameError: global name ‘are_connected’ is not defined”

The above expression could be for R or just totally wrong. I don’t know. R is not enough for what I’m trying to do with my project.

My graph is undirected and has many sequences of vertices and edges (vs and es) described in this tutorial: http://hal.elte.hu/~nepusz/development/igraph/tutorial/tutorial.html

Update:
I’ve found http://packages.python.org/python-igraph/igraph.GraphBase-class.html#is_multiple
is_multiple and is_mutual and I think each of them could do the trick, yet I still get the error: “NameError: global name ‘are_mutual’ is not defined”.

On the internet I couldn’t find an example of how to implement it correctly. I’m still looking.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:48:21+00:00Added an answer on June 15, 2026 at 6:48 pm

    GraphBase class has function get_eid(v1, v2, directed=True, error=True) that returns arbitrary edge between vertices specified by their indices. In you call it like this:

    g.get_eid(v1, v2, directed=False, error=False)
    

    it will return -1 if the vertices are disconnected, and some edge otherwise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are two very useful functions in SLIME: slime-copy-or-inspect-presentation-at-mouse and slime-presentation-menu . But they
There is a very particular edge case in cross-domain policies regarding the window.top.Location object...
Very short question: Is there a more elegant way to do this: Object tmp;
Is there any elegant way of splitting a list/dict into two lists/dicts in python,
I have built an index of about 50M documents (these documents are very short).
Is there an ExecutorService that is suitable for a huge amount of very short-lived
I remember a few months ago finding a very short (three methods, IIRC) but
There is very important shortcut for "Basic Code Completion" in IntelliJ IDE which assumed
There is very poor documentation on Extendscript for InDesign online, and I otherwise cannot
There is very little code out there that is in VB, and i'm getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.