Skip to content

Commit

Permalink
Move from legacy clue/graph to successor graphp/graph
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Feb 19, 2020
1 parent 507fb67 commit 0833f8f
Show file tree
Hide file tree
Showing 80 changed files with 189 additions and 191 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=5.3",
"clue/graph": "~0.9.0|~0.8.0"
"graphp/graph": "dev-master#9b4ff23 as 1.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
Expand Down
6 changes: 3 additions & 3 deletions src/BaseDual.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\DualAggregate;
use Fhaculty\Graph\Walk;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\DualAggregate;
use Graphp\Graph\Walk;

/**
* Abstract base class for algorithms that operate on a given Set instance
Expand Down
2 changes: 1 addition & 1 deletion src/BaseGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Graph;
use Graphp\Graph\Graph;

/**
* Abstract base class for algorithms that operate on a given Graph instance
Expand Down
2 changes: 1 addition & 1 deletion src/BaseVertex.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Vertex;
use Graphp\Graph\Vertex;

/**
* Abstract base class for algorithms that operate on a given Vertex instance
Expand Down
4 changes: 2 additions & 2 deletions src/Bipartit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;

class Bipartit extends BaseGraph
{
Expand Down
8 changes: 4 additions & 4 deletions src/ConnectedComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Exception\InvalidArgumentException;
use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\Search\BreadthFirst as SearchBreadthFirst;
use Graphp\Graph\Exception\InvalidArgumentException;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Graph;
use Graphp\Graph\Vertex;

/**
* Algorithm for working with connected components
Expand Down
6 changes: 3 additions & 3 deletions src/Degree.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Vertex;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Vertex;

/**
* Basic algorithms for working with the degrees of Graphs.
Expand Down
8 changes: 4 additions & 4 deletions src/DetectNegativeCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Exception\NegativeCycleException;
use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Walk;
use Graphp\Algorithms\ShortestPath\MooreBellmanFord as SpMooreBellmanFord;
use Graphp\Graph\Exception\NegativeCycleException;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Graph;
use Graphp\Graph\Walk;

class DetectNegativeCycle extends BaseGraph
{
Expand Down
4 changes: 2 additions & 2 deletions src/Directed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Edge\Directed as EdgeDirected;
use Fhaculty\Graph\Edge\Undirected as EdgeUndirected;
use Graphp\Graph\Edge\Directed as EdgeDirected;
use Graphp\Graph\Edge\Undirected as EdgeUndirected;

/**
* Basic algorithms for working with the undirected or directed Graphs (digraphs) / Walks.
Expand Down
6 changes: 3 additions & 3 deletions src/Flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Edge\Directed as EdgeDirected;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Vertex;
use Graphp\Graph\Edge\Directed as EdgeDirected;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Vertex;

/**
* Basic algorithms for working with flow graphs
Expand Down
4 changes: 2 additions & 2 deletions src/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Set\Vertices;
use Fhaculty\Graph\Vertex;
use Graphp\Graph\Set\Vertices;
use Graphp\Graph\Vertex;

class Groups extends BaseGraph
{
Expand Down
2 changes: 1 addition & 1 deletion src/Loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Vertex;
use Graphp\Graph\Vertex;

/**
* Basic algorithms for working with loop edges
Expand Down
16 changes: 8 additions & 8 deletions src/MaxFlow/EdmondsKarp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

namespace Graphp\Algorithms\MaxFlow;

use Fhaculty\Graph\Edge\Directed as EdgeDirected;
use Fhaculty\Graph\Exception\InvalidArgumentException;
use Fhaculty\Graph\Exception\OutOfBoundsException;
use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\Base;
use Graphp\Algorithms\ResidualGraph;
use Graphp\Algorithms\ShortestPath\BreadthFirst;
use Graphp\Graph\Edge\Directed as EdgeDirected;
use Graphp\Graph\Exception\InvalidArgumentException;
use Graphp\Graph\Exception\OutOfBoundsException;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;
use Graphp\Graph\Vertex;

class EdmondsKarp extends Base
{
Expand Down
6 changes: 3 additions & 3 deletions src/MaximumMatching/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms\MaximumMatching;

use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Graphp\Algorithms\BaseGraph;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;

abstract class Base extends BaseGraph
{
Expand Down
6 changes: 3 additions & 3 deletions src/MaximumMatching/Flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Graphp\Algorithms\MaximumMatching;

use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Set\Edges;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\Directed;
use Graphp\Algorithms\Groups;
use Graphp\Algorithms\MaxFlow\EdmondsKarp as MaxFlowEdmondsKarp;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Set\Edges;
use Graphp\Graph\Vertex;

class Flow extends Base
{
Expand Down
8 changes: 4 additions & 4 deletions src/MinimumCostFlow/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use Graphp\Algorithms\BaseGraph;
use Graphp\Algorithms\Weight as AlgorithmWeight;
use Graphp\Algorithms\Flow as AlgorithmFlow;
use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;

abstract class Base extends BaseGraph
{
Expand Down
6 changes: 3 additions & 3 deletions src/MinimumCostFlow/CycleCanceling.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Graphp\Algorithms\MinimumCostFlow;

use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Set\Edges;
use Graphp\Algorithms\DetectNegativeCycle;
use Graphp\Algorithms\MaxFlow\EdmondsKarp as MaxFlowEdmondsKarp;
use Graphp\Algorithms\ResidualGraph;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Set\Edges;

class CycleCanceling extends Base
{
Expand Down
12 changes: 6 additions & 6 deletions src/MinimumCostFlow/SuccessiveShortestPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Graphp\Algorithms\MinimumCostFlow;

use Fhaculty\Graph\Edge\Directed as EdgeDirected;
use Fhaculty\Graph\Exception\UnderflowException;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\ResidualGraph;
use Graphp\Algorithms\ShortestPath\MooreBellmanFord as SpMooreBellmanFord;
use Graphp\Algorithms\Search\BreadthFirst as SearchBreadthFirst;
use Graphp\Graph\Edge\Directed as EdgeDirected;
use Graphp\Graph\Exception\UnderflowException;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;
use Graphp\Graph\Vertex;

class SuccessiveShortestPath extends Base
{
Expand Down
6 changes: 3 additions & 3 deletions src/MinimumSpanningTree/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms\MinimumSpanningTree;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Graphp\Algorithms\Base as AlgorithmBase;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;
use SplPriorityQueue;

/**
Expand Down
8 changes: 4 additions & 4 deletions src/MinimumSpanningTree/Kruskal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms\MinimumSpanningTree;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;
use SplPriorityQueue;

class Kruskal extends Base
Expand Down
8 changes: 4 additions & 4 deletions src/MinimumSpanningTree/Prim.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms\MinimumSpanningTree;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Set\Edges;
use Fhaculty\Graph\Vertex;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Set\Edges;
use Graphp\Graph\Vertex;
use SplPriorityQueue;

class Prim extends Base
Expand Down
8 changes: 3 additions & 5 deletions src/Parallel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Edge\Directed as DirectedEdge;
use Fhaculty\Graph\Set\Edges;
use LogicException;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Edge\Directed as DirectedEdge;
use Graphp\Graph\Set\Edges;

/**
* Basic algorithms for working with parallel edges
Expand Down Expand Up @@ -52,7 +51,6 @@ public function hasEdgeParallelEdge(Edge $edge)
*
* @param Edge $edge
* @return Edges
* @throws LogicException
*/
public function getEdgesParallelEdge(Edge $edge)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Property/WalkProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Graphp\Algorithms\Property;

use Fhaculty\Graph\Walk;
use Graphp\Algorithms\Base as BaseAlgorithm;
use Graphp\Algorithms\Loop as AlgorithmLoop;
use Graphp\Graph\Walk;

/**
* Simple algorithms for working with Walk properties
Expand Down
8 changes: 4 additions & 4 deletions src/ResidualGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Edge\Directed as EdgeDirected;
use Fhaculty\Graph\Exception\UnexpectedValueException;
use Fhaculty\Graph\Graph;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Edge\Directed as EdgeDirected;
use Graphp\Graph\Exception\UnexpectedValueException;
use Graphp\Graph\Graph;

class ResidualGraph extends BaseGraph
{
Expand Down
6 changes: 3 additions & 3 deletions src/Search/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Graphp\Algorithms\Search;

use Fhaculty\Graph\Exception\InvalidArgumentException;
use Fhaculty\Graph\Set\Vertices;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\BaseVertex;
use Graphp\Graph\Exception\InvalidArgumentException;
use Graphp\Graph\Set\Vertices;
use Graphp\Graph\Vertex;

abstract class Base extends BaseVertex
{
Expand Down
2 changes: 1 addition & 1 deletion src/Search/BreadthFirst.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Graphp\Algorithms\Search;

use Fhaculty\Graph\Set\Vertices;
use Graphp\Graph\Set\Vertices;

class BreadthFirst extends Base
{
Expand Down
2 changes: 1 addition & 1 deletion src/Search/DepthFirst.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Graphp\Algorithms\Search;

use Fhaculty\Graph\Set\Vertices;
use Graphp\Graph\Set\Vertices;

class DepthFirst extends Base
{
Expand Down
16 changes: 8 additions & 8 deletions src/ShortestPath/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Graphp\Algorithms\ShortestPath;

use Fhaculty\Graph\Edge\Base as Edge;
use Fhaculty\Graph\Exception\InvalidArgumentException;
use Fhaculty\Graph\Exception\OutOfBoundsException;
use Fhaculty\Graph\Graph;
use Fhaculty\Graph\Set\Edges;
use Fhaculty\Graph\Set\Vertices;
use Fhaculty\Graph\Vertex;
use Fhaculty\Graph\Walk;
use Graphp\Algorithms\BaseVertex;
use Graphp\Graph\Edge\Base as Edge;
use Graphp\Graph\Exception\InvalidArgumentException;
use Graphp\Graph\Exception\OutOfBoundsException;
use Graphp\Graph\Graph;
use Graphp\Graph\Set\Edges;
use Graphp\Graph\Set\Vertices;
use Graphp\Graph\Vertex;
use Graphp\Graph\Walk;

/**
* Abstract base class for shortest path algorithms
Expand Down
Loading

0 comments on commit 0833f8f

Please sign in to comment.