strongly-connected-components

WebJar for strongly-connected-components

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

strongly-connected-components
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

strongly-connected-components
WebJar for strongly-connected-components
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mikolalysenko/strongly-connected-components

Скачать strongly-connected-components

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/strongly-connected-components/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>strongly-connected-components</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/strongly-connected-components/
implementation 'org.webjars.npm:strongly-connected-components:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/strongly-connected-components/
implementation ("org.webjars.npm:strongly-connected-components:1.0.1")
'org.webjars.npm:strongly-connected-components:jar:1.0.1'
<dependency org="org.webjars.npm" name="strongly-connected-components" rev="1.0.1">
  <artifact name="strongly-connected-components" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='strongly-connected-components', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "strongly-connected-components" % "1.0.1"
[org.webjars.npm/strongly-connected-components "1.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

strongly-connected-components

Given a directed graph, splits it into strongly connected components.

Example

var scc = require("strongly-connected-components")

var adjacencyList = [
  [4], // 0
  [0,2], // 1
  [1,3], // 2
  [2], // 3
  [1], // 4
  [4,6], // 5
  [5,2], // 6
  [7,6,3], // 7
]

console.log(scc(adjacencyList))

Install

npm install strongly-connected-components

API

require("strongly-connected-components")(adjacencyList)

Computes the strongly connected components of a graph using Tarjan's algorithm.

  • adjacencyList is an array of lists representing the directed edges of the graph

Returns An object containing:

  • components: an array of arrays representing the partitioning of the vertices in the graph into connected components.
  • adjacencyList: an array lists representing the directed edges of the directed acyclic graph between the strongly connected components

Credits

(c) 2013 Mikola Lysenko. MIT License. Based on the implementation of Tarjan's algorithm on Wikipedia.

Версии библиотеки

Версия
1.0.1