igwn-segments

pypi-version license python-versions

Representations of semi-open intervals.

This package provides the segment and segmentlist objects, as well as the infinity object used to define semi-infinite and infinite segments.

This is a fork of ligo-segments

This project is a fork of ligo-segments, authored by Kipp Cannon and distributed under the GPLv3 license.

Installation

conda install -c conda-forge igwn-segments
apt-get install python3-igwn-segments

See the IGWN Computing Guide software repositories entry for Debian for instructions on how to configure the required IGWN repositories.

python -m pip install igwn-segments
dnf install python3-igwn-segments

See the IGWN Computing Guide software repositories entries for Rocky Linux 8 and other distributions for instructions on how to configure the required IGWN repositories.

Documentation

Classes

infinity

The infinity object possess the algebraic properties necessary for use as a bound on semi-infinite and infinite segments.

PosInfinity

The infinity object possess the algebraic properties necessary for use as a bound on semi-infinite and infinite segments.

NegInfinity

The infinity object possess the algebraic properties necessary for use as a bound on semi-infinite and infinite segments.

segment([iterable])

The segment class defines objects that represent a range of values.

segmentlist([iterable])

The segmentlist class defines a list of segments, and is an extension of the built-in list class.

segmentlistdict(*args)

A dictionary associating a unique label and numeric offset with each of a set of segmentlist objects.

Modules

igwn_segments.utils

This module provides additional utilities for use with igwn_segments.