Commit Graph
13 Commits
Author SHA1 Message Date
jvanzyl 22c091063c - fixing the lic
- applying patches submitted by David Dixon-Peugh:

I've moved some over.  (Its still in the org/apache/commons/graph
package.)

I added a package "algo" off of the graph package.  This is designed
to hold various graph algorithms.  Graphs have lots of neet things
you can do with them, unfortunately, they don't really fit neatly
into a nice OO design.  (At least I can't see a good connection.)

Changes:

Edge.java
WeightedEdge.java
(org/apache/commons/graph)

These two classes were changed to implement Comparable.  This allows
them to be sorted, and to be dropped into a PriorityQueue.

New Files:

DirectedGraph.java
UndirectedGraph.java
(org/apache/commons/graph)

There are some algorithms which demand either Directed or Undirected
graphs.  These classes allow us to have static type checking for those
algorithms.


Label.java
(org/apache/commons/graph)

There are many algorithms in graph theory which require a marking of
groups.  This label basically has some pointers which it snaps whenever
it is referenced.  It brings running times of some algorithms down close
to O(V + E) rather than O(VlgV + E).


MinimumSpanningForest.java
(org/apache/commons/graph/algo)

This file implements a MinimumSpanningForest algorithm over any graphs.
It uses a PriorityQueue from org/apache/commons/collection.


Sort.java
(org/apache/commons/graph/algo)

This file implements a Topological Sort on directed graphs.  It has some
problems if there is a back edge in the graph.  (Currently it ignores
back edges.  I hope to have it throw a BackEdgeException in the future.)


BackEdges.java
(org/apache/commons/graph/algo)

This file identifies back edges in a Directed Graph, when starting from
a particular vertex.


GraphException.java
BackEdgeException.java
(org/apache/commons/graph/exception)

These are basic exceptions that can be thrown from the graph package.


TestBackEdges.java
TestSort.java
TestMinimumSpanningTree.java

These are JUnit tests for the algorithms provided in this package.
No tests are provided for the Exceptions, Label, Directed and Undirected
classes  (Although Label really should have one.  If Label isn't
working, you get some really nasty bugs.)

--------------------------

Well, this should keep you busy for a while.

Let me know if there are any changes you would like me to make.

DDP

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144589 13f79535-47bb-0310-9956-ffa450edef68
2002-01-16 20:38:30 +00:00
jvanzyl 32e1c5f233 - adding string to match a full traversal of the graph not just stopping
when direct deps are found.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144588 13f79535-47bb-0310-9956-ffa450edef68
2001-12-02 19:25:44 +00:00
jvanzyl 49c20e5fb7 - the resolver now works but some additions have to be made to tell
the resolver to stop when all the neighbours of the starting
  vertex have been visited as opposed to going through the whole
  graph.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144587 13f79535-47bb-0310-9956-ffa450edef68
2001-12-02 19:23:40 +00:00
jvanzyl f3a7176baf . Removing the "implements Constants" as it is a bad pattern. Interfaces
should represent types. It also makes the UML diagrams very hard
  to follow. We're just going to use the fully qualified GraphConstants.{x}
  idiom.

. Added the Graphable interface to allow any arbitrary object to be
  manipulated like a vertex in a graph.

. Added a util package that has a dependency resolver that uses a depth first
  search to sort the dependencies for a set of objects that implement
  the Graphable interface. The resolver also works with Strings and
  lists and deps stated as lists of strings so I can resuse the test
  I wrote for the DependencyEngine in jjar.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144586 13f79535-47bb-0310-9956-ffa450edef68
2001-12-02 18:07:19 +00:00
jvanzyl 41f1622c83 - testing build for the graph package
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144585 13f79535-47bb-0310-9956-ffa450edef68
2001-12-02 18:06:59 +00:00
jvanzyl adb5d71087 - making comments javadocs, adding some braces.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144584 13f79535-47bb-0310-9956-ffa450edef68
2001-12-01 19:12:14 +00:00
jvanzyl 71a051a08e - definition for completeness.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144583 13f79535-47bb-0310-9956-ffa450edef68
2001-12-01 19:03:59 +00:00
jvanzyl c7962890a3 - adding definition for completeness.
PR:
Obtained from:
Submitted by:
Reviewed by:
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144582 13f79535-47bb-0310-9956-ffa450edef68
2001-12-01 19:02:07 +00:00
jvanzyl 970acd984f - start of a GraphML visualizer so that I can use royere to view
dependency graphs.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144581 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 21:12:40 +00:00
jvanzyl bf778b4dc0 - creating a visualize package for better organization before some
refactoring.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144580 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 14:24:23 +00:00
jvanzyl 2a14dba733 - creating a separate visitor package to organize the code a little
better.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144579 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 14:17:34 +00:00
jvanzyl bb5d76e618 Initial revision
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144575 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 16:05:16 +00:00
(no author) 4c37c8cf1d New repository initialized by cvs2svn.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144574 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 16:05:16 +00:00