GEOS 3.15.0dev
SpanningTree.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2026 Paul Ramsey
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14
15#pragma once
16
17#include <geos/export.h>
18#include <vector>
19
20// Forward declarations
21namespace geos {
22namespace geom {
23class Curve;
24}
25}
26
27namespace geos {
28namespace operation { // geos::operation
29namespace spanning { // geos::operation::spanning
30
41class GEOS_DLL SpanningTree {
42
43public:
44
53 static void mst(const std::vector<const geom::Curve*>& curves, std::vector<std::size_t>& result);
54
55};
56
57} // namespace geos::operation::spanning
58} // namespace geos::operation
59} // namespace geos
Constructs a Minimum Spanning Tree (MST) from a set of Curves.
Definition SpanningTree.h:41
static void mst(const std::vector< const geom::Curve * > &curves, std::vector< std::size_t > &result)
Computes the Minimum Spanning Tree of the given Curves.
Basic namespace for all GEOS functionalities.
Definition geos.h:38