Skip to main content

A package that exposes some matroid operation and creations

Project description

Matroid Package

This is a simple matroid package that contains constructor functions for basic combinatorial structures like set compositions, complext structures like matroids and algebraic structure like word quasisymmetric functions. This builds up for the construction of chromatic invariants on matroids.

This abstracts away all the intricacies of matroid operations in order to compute the chromatic invariants.

Packages

Compositions

This package implements a construction of compositions:

print("Composition Construction")
comp1 = Composition([1, 2, 1])
comp2 = Composition([2, 1])
print(f"Example 5: Basic compositions: {comp1}, {comp2}")
print("\n")

print("Composition Operations")
print(f"Rest of {comp1}: {comp1.rest()}")
print(f"Prepending 3 to {comp2}: {comp2.prepend(3)}")
print("\n")

print("Generate All Compositions")
comps3 = Composition.generate_all_composition(3)
print(f"All compositions of 3: {comps3}\n")
print("\n")

Set compositions

This package implements a construction of set compositions. For a construction example, run the following:

print("Example 13: SetComposition Operations")
set_comp1 = SetComposition([[1, 2], [3, 4], [5]])
set_comp2 = SetComposition([[1], [2, 3]])
print(f"\nSet Compositions: {set_comp1}, {set_comp2}")

Quasi-symmetric functions

This package implements a construction of quasi-symmetric functions. For a construction example, run the following:

print("Construct QSymFunction from a dictionary of monomial bases")
qsym_from_dict = QSymFunction(monomial_basis={"(1,2,1)": 2, "(2,1)": -1})
print("QSymFunction from dictionary:")
print(f"coefficients: {qsym_from_dict.coefficients}")

Word quasi-symmetric functions

This package implements a construction of word quasi-symmetric functions. For a construction example, run the following:

print("Construct NCQSymFunctions from a dictionary of monomial bases")
nc_f = NCQSymFunction(monomial_basis=set_comp1)
nc_g = NCQSymFunction(monomial_basis=set_comp2)
nc_sum = nc_f + nc_g
print("Sum of NCQSymFunctions:")
print(f"nc_f: {nc_f.coefficients}")
print(f"nc_g: {nc_g.coefficients}")
print(f"nc_f + nc_g: {nc_sum.coefficients}")

Graphs

This package implements a construction of graphs from edge list.

Matroids

This package implements a construction of matroids from base list. It also implements construction of Schubert matroids, graphical matroids, uniform matroids, and *nested matroids.

Chromatic functions on matroids

This package implements a construction of chromatic invariants on matroids.

To do

Test cases

We are still building up our unit test library

Efficiency

We are improving the construction of some methods related to computing stability of some set compositions with memorization.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromatic_matroids-0.0.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromatic_matroids-0.0.1-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file chromatic_matroids-0.0.1.tar.gz.

File metadata

  • Download URL: chromatic_matroids-0.0.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for chromatic_matroids-0.0.1.tar.gz
Algorithm Hash digest
SHA256 733b6f20f2d4f61928be7a2f841b6e4acda42dea0942006866010e8036d854ea
MD5 ae0094c3cb73f189c899e4b87680c153
BLAKE2b-256 bc67252c0cfe0ec17dcd3462dead973eee90aaf4126479251ca98033178a0efe

See more details on using hashes here.

File details

Details for the file chromatic_matroids-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chromatic_matroids-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e16f0f161efb0c58735a3e3b54b07006ca02826f71353a76d7d68b7b4ac485a5
MD5 fe8034dcd84dc44d99627f11f142f566
BLAKE2b-256 3c7d18cd726692ca15ce4d49a4a07f15d8e4402868a11762c1302315c81cd565

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page