Home Manual Reference Source

Function

Static Public Summary
public

adj(edges: Iterable): Map

Constructs the adjacency list for an undirected unweighted connected loopless multigraph G given as a list of edges.

public

maxback(edges: Iterable): Iterable

Convenience wrapper around Nagamochi-Ibaraki poly-time algorithm.

public

mb(G: Map): Array

Nagamochi-Ibaraki poly-time algorithm.

public

* outgoingedges(G: Map, U: Set): Iterable

Yields all edges of an undirected unweighted connected loopless multigraph G that have one endpoint inside some vertex subset U and that have the other endpoint inside of V = V(G) \ U.

Static Private Summary
private

_contract(G: Map, ordering: Array): Map

Given G and some ordering, computes the graph H obtained from G by contracting all edges between the last two vertices of the ordering.

private

* _order(G: Map): Iterable

Lists the vertices of an undirected unweighted connected loopless multigraph G in max-back order.

private

* _smallcuts(G: Map): Iterable

Yields the small cuts of undirected unweighted connected loopless multigraph G.

Static Public

public adj(edges: Iterable): Map source

Constructs the adjacency list for an undirected unweighted connected loopless multigraph G given as a list of edges.

Params:

NameTypeAttributeDescription
edges Iterable

The edges of G.

Return:

Map

The adjacency list G.

public maxback(edges: Iterable): Iterable source

Convenience wrapper around Nagamochi-Ibaraki poly-time algorithm.

Params:

NameTypeAttributeDescription
edges Iterable

List of edges of an undirected unweighted connected loopless multigraph G.

Return:

Iterable

An iterable over the edges of a minimum cut of G.

public mb(G: Map): Array source

Nagamochi-Ibaraki poly-time algorithm.

Params:

NameTypeAttributeDescription
G Map

The adjacency list of an undirected unweighted connected loopless multigraph G.

Return:

Array

A pair [U,cutsize] reprensenting a minimum cut of G.

public * outgoingedges(G: Map, U: Set): Iterable source

Yields all edges of an undirected unweighted connected loopless multigraph G that have one endpoint inside some vertex subset U and that have the other endpoint inside of V = V(G) \ U.

Params:

NameTypeAttributeDescription
G Map

The input undirected unweighted connected loopless multigraph.

U Set

The subset of edges.

Return:

Iterable

The edges of G going from U to V(G) \ U.

Static Private

private _contract(G: Map, ordering: Array): Map source

Given G and some ordering, computes the graph H obtained from G by contracting all edges between the last two vertices of the ordering.

Params:

NameTypeAttributeDescription
G Map
ordering Array

Return:

Map

private * _order(G: Map): Iterable source

Lists the vertices of an undirected unweighted connected loopless multigraph G in max-back order.

Params:

NameTypeAttributeDescription
G Map

The adjacency list of G.

Return:

Iterable

The vertices of G in max-back order.

private * _smallcuts(G: Map): Iterable source

Yields the small cuts of undirected unweighted connected loopless multigraph G. At least one of them must be a minimum cut.

Params:

NameTypeAttributeDescription
G Map

The adjacency list of G.

Return:

Iterable

The small cuts of G.