Skip to main content

Official Utilities for the CG:SHOP 2022 Challenge

This package provides some utilities for handling instances and solutions for the CG:SHOP 2022 Challenge on Minimum Partition into Plane Subgraphs. These are the tools that are used by us, the (technical) organizers, to handle our instances and your solutions.

  • Reading and writing instances.
  • Reading and writing solutions.
  • Verifying solutions for correctness.

The source code can be found here.

Installation

The installation is simple:

pip install cgshop2022utils

If pip does not install the dependencies for you you may also need

pip install networkx

The verification component (currently under development) will be implemented in C++ and require a more complicated installation. We will probably provide a precompiled version for Linux, but other systems may need to compile the package by hand. We will provide instructions for this in due time.

Reading instances

from cgshop2022utils.io import read_instance

instance = read_instance("path or file object to instance")

The instance is a dict of the following format:

{
        "type": "Instance_CGSHOP2022",
        "id": "unique name of instance",
        "meta": dict, # with information on the instance (e.g., the polygon for visibility instances)
        "graph": networkx.Graph, # The instance graph with typing.Tuple[int, int] as vertices.
}

Check out the documentation of networkx on how to deal with the graphs. It is fairly straight forward. For example:

print("Points:")
for v in graph.nodes:
    print(v)
print("Edges:")
for v,w in graph.edges:
    print(v, "<->", w)

Metadata

Release files for cgshop2022utils 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cgshop2022utils 0.1.0
File Interpreter ABI Platform
cgshop2022utils-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / cgshop2022utils-0.1.0-py3-none-any.whl

Download URL cgshop2022utils-0.1.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56cae1123dd9fd2d83395553412a05b0958bbcf82e15407830735775fd042297
BLAKE2b-256 checksum
How to use checksums
aa7d55493021de8d9cceb60abfa263fcefe7daa57c8fea75fdc45d41d346ea3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10

Security for cgshop2022utils 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page