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.2.post0.tar.gz (17.3 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.2.post0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file chromatic_matroids-0.0.2.post0.tar.gz.

File metadata

File hashes

Hashes for chromatic_matroids-0.0.2.post0.tar.gz
Algorithm Hash digest
SHA256 b7eeb4bdf9c998875eaa0e1251f0df38fb86828fa7178dd49067f443a731d925
MD5 c7dcf6ffde8b2e75d599443455772b72
BLAKE2b-256 a313f4f1917e2a11759e3c9f42b846803c348b67b703bc02f3f0393fe5bce89b

See more details on using hashes here.

File details

Details for the file chromatic_matroids-0.0.2.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for chromatic_matroids-0.0.2.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 eceeaa07316be59b5878f5b8981f93f5a22abd683d20280ce278646b0ba52430
MD5 e5e32ffd847e091a3aead54e7f28906e
BLAKE2b-256 127e41ea5b34bf0691292e15e7c1a34eb33c036fccb05012a0d3b132c2f653db

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