DOLFIN-X
DOLFIN-X C++ interface
dolfinx
graph
BoostGraphOrdering.h
1
// Copyright (C) 2012 Garth N. Wells
2
//
3
// This file is part of DOLFINX (https://www.fenicsproject.org)
4
//
5
// SPDX-License-Identifier: LGPL-3.0-or-later
6
7
#pragma once
8
9
#include <cstdint>
10
#include <set>
11
#include <utility>
12
#include <vector>
13
14
namespace
dolfinx::graph
15
{
16
17
template
<
typename
T>
18
class
AdjacencyList;
19
21
22
namespace
BoostGraphOrdering
23
{
24
27
std::vector<int>
compute_cuthill_mckee
(
const
AdjacencyList<std::int32_t>
& graph,
28
bool
reverse =
false
);
29
32
std::vector<int>
compute_cuthill_mckee
(
33
const
std::set<std::pair<std::size_t, std::size_t>>& edges,
34
std::size_t size,
bool
reverse =
false
);
35
36
}
// namespace BoostGraphOrdering
37
}
// namespace dolfinx::graph
dolfinx::graph
Graph data structures and algorithms.
Definition:
AdjacencyList.h:18
dolfinx::graph::AdjacencyList
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition:
AdjacencyList.h:28
dolfinx::graph::BoostGraphOrdering::compute_cuthill_mckee
std::vector< int > compute_cuthill_mckee(const AdjacencyList< std::int32_t > &graph, bool reverse=false)
Compute re-ordering (map[old] -> new) using Cuthill-McKee algorithm.
Definition:
BoostGraphOrdering.cpp:49
Generated by
1.8.18