Skip to content

Commit

Permalink
Refactor graph package.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrandelshofer committed Oct 13, 2024
1 parent bd49455 commit 884fccf
Show file tree
Hide file tree
Showing 28 changed files with 84 additions and 51 deletions.
37 changes: 20 additions & 17 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* @(#)package-info.java
* Copyright © 2024 The authors and contributors of JHotDraw. MIT License.
*/

/**
* Provides algorithms for graphs.
*/
package org.jhotdraw8.graph.algo;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* @(#)package-info.java
* Copyright © 2024 The authors and contributors of JHotDraw. MIT License.
*/

/**
* Provides classes for reading and writing graph data structures into files.
*/
package org.jhotdraw8.graph.io;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* @(#)package-info.java
* Copyright © 2024 The authors and contributors of JHotDraw. MIT License.
*/

/**
* Provides iterators over graphs.
*/
package org.jhotdraw8.graph.iterator;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

/**
* Provides data structures for graphs.
* <p>
* References:
* <dl>
* <dt>Wikipedia. Path (graph theory). Walk, trail, path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.graph.Arc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.icollection.immutable.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.icollection.immutable.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.collection.pair.SimpleOrderedPair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.collection.pair.SimpleOrderedPair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

/**
* Interface for finding all sequences between a set of source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

/**
* Interface for finding arc-, arrow- and vertex-sequences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @(#)PathBuilderException.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.graph.algo.AddToSet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.base.function.Function3;
import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.collection.spliterator.SpliteratorIterable;
import org.jhotdraw8.graph.Arc;
import org.jhotdraw8.graph.path.algo.AllWalksSpliterator;
import org.jhotdraw8.graph.path.backlink.ArcBackLinkWithCost;
import org.jhotdraw8.icollection.immutable.ImmutableList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.base.function.Function3;
import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.collection.pair.SimpleOrderedPair;
import org.jhotdraw8.graph.Arc;
import org.jhotdraw8.graph.algo.AddToSet;
import org.jhotdraw8.graph.path.algo.ArcPathSearchAlgo;
import org.jhotdraw8.graph.path.backlink.ArcBackLinkWithCost;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.jspecify.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.SimpleOrderedPair;
import org.jhotdraw8.graph.algo.AddToIntSet;
import org.jhotdraw8.graph.algo.AddToSet;
import org.jhotdraw8.graph.path.algo.IndexedVertexPathSearchAlgo;
import org.jhotdraw8.graph.path.backlink.IndexedVertexBackLinkWithCost;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.jspecify.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.base.function.Function3;
import org.jhotdraw8.graph.Arc;
import org.jhotdraw8.graph.algo.AddToSet;
import org.jhotdraw8.graph.path.algo.ArcReachabilityAlgo;

import java.util.Collections;
import java.util.function.BiFunction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.SimpleOrderedPair;
import org.jhotdraw8.graph.algo.AddToSet;
import org.jhotdraw8.graph.path.algo.VertexPathSearchAlgo;
import org.jhotdraw8.graph.path.backlink.VertexBackLinkWithCost;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.jspecify.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/

package org.jhotdraw8.graph.path;
package org.jhotdraw8.graph.path.algo;

import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.collection.pair.SimpleOrderedPair;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* @(#)package-info.java
* Copyright © 2024 The authors and contributors of JHotDraw. MIT License.
*/

/**
* Provides algorithms for finding paths in graphs.
*/
package org.jhotdraw8.graph.path.algo;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* @(#)package-info.java
* Copyright © 2024 The authors and contributors of JHotDraw. MIT License.
*/

/**
* Provides data structures that describe the result of path finding algorithms.
*/
package org.jhotdraw8.graph.path.backlink;
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import org.jhotdraw8.collection.pair.SimpleOrderedPair;
import org.jhotdraw8.graph.io.AdjacencyListWriter;
import org.jhotdraw8.graph.path.SimpleVertexSequenceFinder;
import org.jhotdraw8.graph.path.VertexSequenceFinder;
import org.jhotdraw8.graph.path.algo.SimpleVertexSequenceFinder;
import org.jhotdraw8.graph.path.algo.UniqueOrOneHopVertexPathSearchAlgo;
import org.jhotdraw8.graph.path.algo.VertexSequenceFinder;
import org.jhotdraw8.icollection.VectorList;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.junit.jupiter.api.DynamicTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import org.jhotdraw8.collection.pair.OrderedPair;
import org.jhotdraw8.graph.DirectedGraph;
import org.jhotdraw8.graph.SimpleMutableDirectedGraph;
import org.jhotdraw8.graph.path.CombinedAllSequencesFinder;
import org.jhotdraw8.graph.path.SimpleCombinedAllSequencesFinder;
import org.jhotdraw8.icollection.VectorList;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.junit.jupiter.api.DynamicTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
import org.jhotdraw8.graph.DirectedGraph;
import org.jhotdraw8.graph.SimpleMutableDirectedGraph;
import org.jhotdraw8.graph.io.AdjacencyListWriter;
import org.jhotdraw8.graph.path.CombinedAllSequencesFinder;
import org.jhotdraw8.graph.path.CombinedSequenceFinder;
import org.jhotdraw8.graph.path.SimpleCombinedAllSequencesFinder;
import org.jhotdraw8.graph.path.SimpleCombinedSequenceFinder;
import org.jhotdraw8.icollection.VectorList;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.jspecify.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.jhotdraw8.graph.DirectedGraph;
import org.jhotdraw8.graph.SimpleMutableDirectedGraph;
import org.jhotdraw8.graph.io.AdjacencyListWriter;
import org.jhotdraw8.graph.path.CombinedSequenceFinder;
import org.jhotdraw8.graph.path.SimpleCombinedSequenceFinder;
import org.jhotdraw8.icollection.VectorList;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.junit.jupiter.api.DynamicTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import org.jhotdraw8.graph.DirectedGraph;
import org.jhotdraw8.graph.SimpleMutableDirectedGraph;
import org.jhotdraw8.graph.io.AdjacencyListWriter;
import org.jhotdraw8.graph.path.SimpleVertexSequenceFinder;
import org.jhotdraw8.graph.path.VertexSequenceFinder;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.DynamicTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.jhotdraw8.graph.DirectedGraph;
import org.jhotdraw8.graph.SimpleMutableDirectedGraph;
import org.jhotdraw8.graph.io.AdjacencyListWriter;
import org.jhotdraw8.graph.path.CombinedSequenceFinder;
import org.jhotdraw8.graph.path.SimpleCombinedSequenceFinder;
import org.jhotdraw8.icollection.VectorList;
import org.jhotdraw8.icollection.immutable.ImmutableList;
import org.junit.jupiter.api.DynamicTest;
Expand Down

0 comments on commit 884fccf

Please sign in to comment.