A wrapper library for exposing the C++ neighborhood graph library (NGL) for computing empty region graphs to python


Keywords
geometry, neighborhood, empty, region, graph, library, beta, skeleton, relative, neighbor, Gabriel
License
BSD-3-Clause
Install
pip install nglpy==1.1.7

Documentation

nglpy

Latest Version on PyPI PyPI downloads Code Quality Test Results Test Suite Results CodeFactor Coveralls ReadTheDocs Pyup This code is formatted in black This code has its imports sorted with isort BSD 3-Clause License

nglpy

A Python wrapped version of the [Neighborhood Graph Library (NGL) developed by Carlos Correa and Peter Lindstrom.

Given a set of arbitrarily arranged points in any dimension, this library is able to construct several different types of neighborhood graphs mainly focusing on empty region graph algorithms such as the beta skeleton family of graphs.

Installation

pip install nglpy

Usage

Then you can use the library from python such as the example below:

import nglpy
import numpy as np

point_set = np.random.rand(100,2)
max_neighbors = 9
beta = 1

aGraph = nglpy.EmptyRegionGraph(max_neighbors=max_neighbors, relaxed=False, beta=beta)
aGraph.build(point_set)

aGraph.neighbors()