PHPackages                             sensasi-delight/eigenvector-centrality-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sensasi-delight/eigenvector-centrality-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sensasi-delight/eigenvector-centrality-php
==========================================

A PHP library that help you calculates the Eigenvector Centrality value of an undirected graph. Eigenvector Centrality is one of the Social Network Analysis algorithms.

v1.2.0(3y ago)112[2 issues](https://github.com/sensasi-delight/eigenvector-centrality-php/issues)MITPHPPHP 5.4 - 8

Since Jun 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sensasi-delight/eigenvector-centrality-php)[ Packagist](https://packagist.org/packages/sensasi-delight/eigenvector-centrality-php)[ RSS](/packages/sensasi-delight-eigenvector-centrality-php/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Eigenvector Centrality on PHP
=============================

[](#eigenvector-centrality-on-php)

A PHP library that help you calculates the Eigenvector Centrality value of an undirected graph. Eigenvector Centrality is one of the Social Network Analysis algorithms.

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

[](#installation)

Install using composer:

```
composer require sensasi-delight/eigenvector-centrality-php
```

Usage
-----

[](#usage)

> The usage examples of this library are also available on [examples folder](https://github.com/sensasi-delight/eigenvector-centrality-php/tree/main/examples).

1. Make a Graph object

    ```
    use SensasiDelight\Graph;

    $g = new Graph;
    ```
2. Define the nodes (optional)

    ```
    $g->add_node('v1');
    $g->add_node('v2');
    $g->add_node('v3');
    $g->add_node('v4');
    $g->add_node('v5');
    ```

    or

    ```
    $g->add_nodes_from([
        'v1',
        'v2',
        'v3',
        'v4',
        'v5',
    ]);
    ```
3. Define the edges

    ```
    $g->add_edge('v1', 'v2');
    $g->add_edge('v1', 'v4');
    $g->add_edge('v2', 'v3');
    $g->add_edge('v2', 'v4');
    $g->add_edge('v2', 'v5');
    $g->add_edge('v3', 'v4');
    ```

    or

    ```
    $g->add_edges_from([
        ['v1', 'v2'],
        ['v1', 'v4'],
        ['v2', 'v3'],
        ['v2', 'v4'],
        ['v2', 'v5'],
        ['v3', 'v4']
    ]);
    ```
4. Get and print the Eigenvector Centrality value

    ```
    $result = $g->get_eigenvector_centrality();
    print_r($result);
    ```

    it's should be returning output:

    ```
    Array
    (
        [v1] => 0.4119172769405
        [v2] => 0.58253899962505
        [v3] => 0.4119172769405
        [v4] => 0.52368294422478
        [v5] => 0.21691657788138
    )
    ```

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project.
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`).
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`).
4. Push to the Branch (`git push origin feature/AmazingFeature`).
5. Open a Pull Request.

License
-------

[](#license)

The code is released under the MIT license.

Contact
-------

[](#contact)

- ✉ Email - [zainadam.id@gmail.com](mailto:zainadam.id@gmail.com?subject=%5BGitHub%5D%20EigenvectorCentralityPHP)
- 🐤 Twitter - [@sensasi\_DELIGHT](https://twitter.com/sensasi_DELIGHT)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Total

4

Last Release

1184d ago

PHP version history (2 changes)v1.0.0-betaPHP ^7.3

v1.1.0PHP 5.4 - 8

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e258c66ee803422a0d47f100d873089eb11ee822969e62c8d9b4a27f8f2dce?d=identicon)[sensasi-delight](/maintainers/sensasi-delight)

---

Top Contributors

[![dominosaurs](https://avatars.githubusercontent.com/u/19289785?v=4)](https://github.com/dominosaurs "dominosaurs (14 commits)")

---

Tags

centrality-measureseigenvector-centralitygraphAlgorithmgrapheigenvector centralitysocial network analysis

### Embed Badge

![Health badge](/badges/sensasi-delight-eigenvector-centrality-php/health.svg)

```
[![Health](https://phpackages.com/badges/sensasi-delight-eigenvector-centrality-php/health.svg)](https://phpackages.com/packages/sensasi-delight-eigenvector-centrality-php)
```

###  Alternatives

[novus/nvd3

A reusable charting library written in d3.js

7.2k207.7k2](/packages/novus-nvd3)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[graphp/graph

GraPHP is the mathematical graph/network library written in PHP.

711292.6k3](/packages/graphp-graph)[donatello-za/rake-php-plus

Yet another PHP implementation of the Rapid Automatic Keyword Extraction algorithm (RAKE).

271865.1k10](/packages/donatello-za-rake-php-plus)[amenadiel/jpgraph

Composer Friendly, full refactor of JpGraph, library to make graphs and charts

1492.2M7](/packages/amenadiel-jpgraph)[jbzoo/composer-graph

Render composer.json + composer.lock dependencies graph

66741.6k2](/packages/jbzoo-composer-graph)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
