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 8232461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:50:31+00:00 2026-06-07T17:50:31+00:00

I am working with JUNG Graph. The problem I am working on can be

  • 0

I am working with JUNG Graph. The problem I am working on can be defined as follows:

Given a JUNG Graph G={V,E} and an edge E1, find the nodes/vertices
that E1 connects and delete the vertex if it is a leaf node.

So, there are two parts:

  1. Finding the vertices that are connected by a given edge E1.
  2. Find if a given vertex is a leaf node?

Are these two operations directly possible in JUNG. If not, can someone suggest an alternate way to achieve the same.

  • 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-07T17:50:32+00:00Added an answer on June 7, 2026 at 5:50 pm

    (1) Graph.getIncidentVertices(E e1)

    (2) You don’t define what you mean by “leaf node”, but assuming that you’re referring to a directed graph and a vertex that has one incoming edge and no outgoing edges, that’s easy:
    Graph.getIncomingEdges().size() == 1

    Graph.getOutgoingEdges().isEmpty())

    If the graph is not a multigraph, you can also do this:
    Graph.getPredecessorCount() == 1

    Graph.getSuccessorCount() == 0

    The Javadoc for JUNG is pretty good; you should consider browsing it before asking questions of this kind: http://jung.sourceforge.net/doc/api/index.html

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

Sidebar

Related Questions

Working with an undisclosed API, I found a function that can set the number
Working with an API that can handle multiple connections (i.e. sessions), each of these
Working on THIS Page: newsite.702wedding.com/live/ Can't find where to remove the arrows at the
I am trying to get a sample program working with JUNG , a graphing
Working in an app where a page_title method was defined in application_helper.rb as such:
Working on an extension that use the new experimental devtools apis. How do you
Working with a Lucene index, I have a standard document format that looks something
Working with Json, how can I NSlog only the title in this code: NSDictionary
working on using a formula ive been using for a while to find distances
working on xcode I realized that if I create a non-void method, I call

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.