What is the best implementation for graph networks (edges+nodes+weights) ??

T

Tobias Merler

Ok, I could image hundreds of different implementations of a graph network.

According to computer science graph theory a network consists of a variable number
of nodes and edges from one node to some (but not necessaryily all) other nodes with a given
weight. Before I re-invent the wheel:

Does someone know a good implementation for java?

It should be as small as possible but allow adding/subtracting nodes.
Should doubled linked lists be used or should one allocate an array of nodes?
Should one use lists or implement a matrix representation?
Should one put the edges weights into the starting nodes or into separate
objects?

What is most efficient and convenient?

Don't point me to an existing library cause I have to extend the code heavily for
advanced purposes.

Thank you
Tobias
 
J

J

Ok, I could image hundreds of different implementations of a graph network.

According to computer science graph theory a network consists of a
variable number
of nodes and edges from one node to some (but not necessaryily all)
other nodes with a given
weight. Before I re-invent the wheel:

Does someone know a good implementation for java?

It should be as small as possible but allow adding/subtracting nodes.
Should doubled linked lists be used or should one allocate an array of nodes?
Should one use lists or implement a matrix representation?
Should one put the edges weights into the starting nodes or into separate
objects?

What is most efficient and convenient?

Don't point me to an existing library cause I have to extend the code
heavily for
advanced purposes.

Thank you
Tobias

I wrote a graph library in C#. I had a single object that contains the
objects/nodes and edges. The the edges where stored as objects. I
could send you c# source, and porting it should be easy. Just email me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top