File: edgecut.m

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (31 lines) | stat: -rw-r--r-- 1,325 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function partition = edgecut(G, O, A)   %#ok
%EDGECUT find an edge separator in a graph.
%   partition = edgecut(G) uses a multilevel hybrid combinatoric and quadratic
%   programming algorithm to compute a partitioning of the graph G. With no
%   option struct specified, the target is for each part to contain 50% of the
%   graph's vertices, and the coarsening is done using a combination of
%   heavy-edge matching and other more aggressive techniques to avoid stalling.
%
%   partition = EDGECUT(G) assumes default options and no vertex weights (i.e.
%   all vertex weights are 1). The partition is returned as a binary array.
%
%   partition = EDGECUT(G, O) uses the options struct to define how the edge
%   cut algorithms are run.
%
%   partition = EDGECUT(G, O, A) initializes the graph with vertex weights
%   provided in the array A such that A(i) is the vertex weight of vertex i.
%
%   Example:
%       Prob = ssget('HB/494_bus'); A = Prob.A;
%       A = sanitize(A);
%       part = edgecut(A);
%       perm = [find(part) find(1-part)];
%       A_perm = A(perm, perm); % Permute the matrix
%       spy(A_perm);
%
%   See also EDGECUT_OPTIONS, SAFE_EDGECUT.

%   Copyright (c) 2018, N. Yeralan, S. Kolodziej, T. Davis, W. Hager
%   SPDX-License-Identifier: GPL-3.0-only

error ('edgecut mexFunction not found') ;