PHPackages                             stratadox/graphp-finder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. stratadox/graphp-finder

ActiveLibrary

stratadox/graphp-finder
=======================

v0.1(7y ago)05MITPHP

Since Mar 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Stratadox/GraphpFinder)[ Packagist](https://packagist.org/packages/stratadox/graphp-finder)[ RSS](/packages/stratadox-graphp-finder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

GraphpFinder
============

[](#graphpfinder)

An adapter to make [Graphp](https://github.com/graphp/graph) compatible with [Pathfinder](https://github.com/Stratadox/Pathfinder).

[![Build Status](https://camo.githubusercontent.com/56e166d79bb1f7d19fb38013c4e150a33c8f878320c08684ed85fdeda7eab6e5/68747470733a2f2f7472617669732d63692e6f72672f537472617461646f782f47726170687046696e6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Stratadox/GraphpFinder)[![Coverage Status](https://camo.githubusercontent.com/ab83105eb42c3120c4ecfb97f9ab7b2183d353cda6b3c94d14efa116f4f90870/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f537472617461646f782f47726170687046696e6465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Stratadox/GraphpFinder?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2e1970aa3275fc1ebc472757907e5f702163396a31a59b2d94853b2185766fe1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f537472617461646f782f47726170687046696e6465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Stratadox/GraphpFinder/?branch=master)

Installation
------------

[](#installation)

Install with `composer require stratadox/graphp-finder`

Features
--------

[](#features)

This Graphp adapter aims to honour the [Graphp philosophy](https://github.com/graphp/graph#features)in terms of supporting both directed and undirected graphs, as well as both [single- and multi graphs](https://en.wikipedia.org/wiki/Multigraph).

The above features roughly correspond to what Pathfinder calls a [Network](https://github.com/Stratadox/Pathfinder/blob/master/Graphs.md#networks). In addition to networks, Pathfinder can operate on what it refers to as [Environments](https://github.com/Stratadox/Pathfinder/blob/master/Graphs.md#environments): graphs with Cartesian coordinates attached to their vertices.

An advantage of using an environment over a network is that search algorithms can be optimised through the use of [heuristics](https://en.wikipedia.org/wiki/Heuristic_(computer_science)), a technique used by Pathfinder's [A\* implementation](https://github.com/Stratadox/Pathfinder#a).

This adapter can be used to transform a Graphp graph into either an environment or a network. In order to achieve compatibility, the environment adapter makes use of Graphp's concept of `attributes`.

Attributes in Graphp are key-value pairs; the environment adapter requires at least the keys `x` and `y` to be present, also using `z` when available.

Examples
--------

[](#examples)

### Environment without GraphpFinder

[](#environment-without-graphpfinder)

The "normal" way to use the [Pathfinder](https://github.com/Stratadox/Pathfinder)module looks somewhat like this:

```
