NetLogo / NetLogo/NW-Extension

Allow saving to GraphML with mixed edge types

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
66
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Right now, the file is produced with <graph edgedefault="directed"> or <graph edgedefault="undirected">, but the directed attribute is not set for individual edges.

If we have a mixed graph, it is not recognized as such and <graph edgedefault="undirected">.

When Jung saves to GraphML, it queries the EdgeType getEdgeType(E edge); method declared in HyperGraph. The current implementation is inherited from AbstractTypedGraph, which returns the same edge type for the whole graph.

NetLogo graphs are currently instantiated as either directed or undirected graphs. We would need to create a new class (MixedGraph?) which would inherit from our graph trait and implement getEdgeType on a 'per edge' basis.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading HyperGraph.getEdgeType, the inherited implementation in AbstractTypedGraph, and the GraphML save path described in the issue. Determine how a mixed graph can provide an edge-specific type, then verify that saved GraphML marks individual edges correctly and is recognized as mixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.