passagemath-graphs 10.5.47__cp313-cp313-macosx_14_0_arm64.whl → 10.6.1__cp313-cp313-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {passagemath_graphs-10.5.47.dist-info → passagemath_graphs-10.6.1.dist-info}/METADATA +27 -17
- passagemath_graphs-10.6.1.dist-info/METADATA.bak +304 -0
- passagemath_graphs-10.6.1.dist-info/RECORD +263 -0
- sage/all__sagemath_graphs.py +3 -2
- sage/combinat/abstract_tree.py +188 -17
- sage/combinat/cluster_algebra_quiver/interact.py +1 -2
- sage/combinat/cluster_algebra_quiver/mutation_type.py +518 -519
- sage/combinat/cluster_algebra_quiver/quiver.py +233 -205
- sage/combinat/designs/covering_design.py +2 -6
- sage/combinat/designs/database.py +11 -10
- sage/combinat/designs/designs_pyx.cpython-313-darwin.so +0 -0
- sage/combinat/designs/designs_pyx.pyx +2 -2
- sage/combinat/designs/evenly_distributed_sets.cpython-313-darwin.so +0 -0
- sage/combinat/designs/evenly_distributed_sets.pyx +4 -4
- sage/combinat/designs/gen_quadrangles_with_spread.cpython-313-darwin.so +0 -0
- sage/combinat/designs/incidence_structures.py +2 -2
- sage/combinat/designs/latin_squares.py +53 -20
- sage/combinat/designs/orthogonal_arrays.py +2 -1
- sage/combinat/designs/orthogonal_arrays_find_recursive.cpython-313-darwin.so +0 -0
- sage/combinat/designs/orthogonal_arrays_find_recursive.pyx +22 -21
- sage/combinat/designs/resolvable_bibd.py +191 -157
- sage/combinat/designs/subhypergraph_search.cpython-313-darwin.so +0 -0
- sage/combinat/designs/subhypergraph_search.pyx +4 -4
- sage/combinat/designs/twographs.py +2 -2
- sage/combinat/finite_state_machine.py +6 -6
- sage/combinat/nu_tamari_lattice.py +1 -1
- sage/combinat/posets/bubble_shuffle.py +247 -0
- sage/combinat/posets/d_complete.py +3 -3
- sage/combinat/posets/elements.py +3 -3
- sage/combinat/posets/hasse_cython.cpython-313-darwin.so +0 -0
- sage/combinat/posets/hasse_cython.pyx +1 -1
- sage/combinat/posets/hasse_diagram.py +16 -22
- sage/combinat/posets/hochschild_lattice.py +158 -0
- sage/combinat/posets/incidence_algebras.py +14 -16
- sage/combinat/posets/lattices.py +51 -53
- sage/combinat/posets/linear_extension_iterator.cpython-313-darwin.so +0 -0
- sage/combinat/posets/linear_extensions.py +12 -13
- sage/combinat/posets/moebius_algebra.py +4 -4
- sage/combinat/posets/poset_examples.py +73 -23
- sage/combinat/posets/posets.py +294 -103
- sage/databases/knotinfo_db.py +2 -1
- sage/graphs/asteroidal_triples.cpython-313-darwin.so +0 -0
- sage/graphs/asteroidal_triples.pyx +24 -3
- sage/graphs/base/boost_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/boost_graph.pxd +3 -3
- sage/graphs/base/c_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/c_graph.pyx +1 -1
- sage/graphs/base/dense_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/dense_graph.pxd +5 -3
- sage/graphs/base/dense_graph.pyx +44 -0
- sage/graphs/base/graph_backends.cpython-313-darwin.so +0 -0
- sage/graphs/base/sparse_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/static_dense_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/static_sparse_backend.cpython-313-darwin.so +0 -0
- sage/graphs/base/static_sparse_backend.pyx +8 -5
- sage/graphs/base/static_sparse_graph.cpython-313-darwin.so +0 -0
- sage/graphs/base/static_sparse_graph.pyx +86 -15
- sage/graphs/bipartite_graph.py +59 -36
- sage/graphs/centrality.cpython-313-darwin.so +0 -0
- sage/graphs/centrality.pyx +82 -9
- sage/graphs/cographs.py +1 -1
- sage/graphs/comparability.cpython-313-darwin.so +0 -0
- sage/graphs/comparability.pyx +64 -26
- sage/graphs/connectivity.cpython-313-darwin.so +0 -0
- sage/graphs/convexity_properties.cpython-313-darwin.so +0 -0
- sage/graphs/convexity_properties.pyx +52 -9
- sage/graphs/digraph.py +439 -95
- sage/graphs/digraph_generators.py +176 -104
- sage/graphs/distances_all_pairs.cpython-313-darwin.so +0 -0
- sage/graphs/dot2tex_utils.py +1 -1
- sage/graphs/edge_connectivity.cpython-313-darwin.so +0 -0
- sage/graphs/generators/basic.py +1 -1
- sage/graphs/generators/distance_regular.cpython-313-darwin.so +0 -0
- sage/graphs/generators/distance_regular.pyx +2 -2
- sage/graphs/generators/families.py +40 -30
- sage/graphs/generators/random.py +2 -2
- sage/graphs/generators/smallgraphs.py +3 -3
- sage/graphs/generic_graph.py +559 -86
- sage/graphs/generic_graph_pyx.cpython-313-darwin.so +0 -0
- sage/graphs/generic_graph_pyx.pyx +58 -11
- sage/graphs/genus.cpython-313-darwin.so +0 -0
- sage/graphs/genus.pyx +3 -4
- sage/graphs/graph.py +291 -8
- sage/graphs/graph_coloring.cpython-313-darwin.so +0 -0
- sage/graphs/graph_coloring.pyx +2 -2
- sage/graphs/graph_database.py +67 -12
- sage/graphs/graph_decompositions/bandwidth.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/clique_separators.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/clique_separators.pyx +24 -3
- sage/graphs/graph_decompositions/cutwidth.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/fast_digraph.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/fast_digraph.pyx +1 -1
- sage/graphs/graph_decompositions/graph_products.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/graph_products.pyx +67 -21
- sage/graphs/graph_decompositions/modular_decomposition.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/slice_decomposition.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/slice_decomposition.pyx +34 -8
- sage/graphs/graph_decompositions/tree_decomposition.cpython-313-darwin.so +0 -0
- sage/graphs/graph_decompositions/vertex_separation.cpython-313-darwin.so +0 -0
- sage/graphs/graph_generators.py +45 -32
- sage/graphs/graph_generators_pyx.cpython-313-darwin.so +0 -0
- sage/graphs/graph_generators_pyx.pyx +15 -15
- sage/graphs/graph_latex.py +1 -1
- sage/graphs/graph_list.py +52 -9
- sage/graphs/graph_plot.py +7 -0
- sage/graphs/hyperbolicity.cpython-313-darwin.so +0 -0
- sage/graphs/hyperbolicity.pyx +5 -3
- sage/graphs/independent_sets.cpython-313-darwin.so +0 -0
- sage/graphs/isoperimetric_inequalities.cpython-313-darwin.so +0 -0
- sage/graphs/isoperimetric_inequalities.pyx +42 -6
- sage/graphs/line_graph.cpython-313-darwin.so +0 -0
- sage/graphs/line_graph.pyx +153 -37
- sage/graphs/matching_covered_graph.py +87 -62
- sage/graphs/orientations.py +3 -18
- sage/graphs/path_enumeration.cpython-313-darwin.so +0 -0
- sage/graphs/path_enumeration.pyx +2 -2
- sage/graphs/spanning_tree.cpython-313-darwin.so +0 -0
- sage/graphs/strongly_regular_db.cpython-313-darwin.so +0 -0
- sage/graphs/strongly_regular_db.pyx +34 -34
- sage/graphs/traversals.cpython-313-darwin.so +0 -0
- sage/graphs/traversals.pyx +13 -12
- sage/graphs/trees.cpython-313-darwin.so +0 -0
- sage/graphs/tutte_polynomial.py +1 -1
- sage/graphs/views.cpython-313-darwin.so +0 -0
- sage/graphs/views.pyx +1 -1
- sage/graphs/weakly_chordal.cpython-313-darwin.so +0 -0
- sage/graphs/weakly_chordal.pyx +50 -8
- sage/groups/perm_gps/partn_ref/refinement_graphs.cpython-313-darwin.so +0 -0
- sage/knots/free_knotinfo_monoid.py +3 -3
- sage/knots/knotinfo.py +102 -82
- sage/knots/link.py +72 -39
- sage/topology/cubical_complex.py +4 -5
- sage/topology/delta_complex.py +4 -4
- sage/topology/simplicial_complex.py +0 -1
- sage/topology/simplicial_complex_catalog.py +6 -0
- sage/topology/simplicial_complex_examples.py +4 -16
- sage_wheels/share/graphs/brouwer_srg_database.json +1 -0
- sage_wheels/share/graphs/graphs.db +0 -0
- sage_wheels/share/graphs/isgci_sage.xml +11116 -0
- sage_wheels/share/graphs/smallgraphs.txt +565 -0
- passagemath_graphs-10.5.47.dist-info/RECORD +0 -256
- {passagemath_graphs-10.5.47.dist-info → passagemath_graphs-10.6.1.dist-info}/WHEEL +0 -0
- {passagemath_graphs-10.5.47.dist-info → passagemath_graphs-10.6.1.dist-info}/top_level.txt +0 -0
@@ -15,6 +15,7 @@ Moreover, the set of all posets of order `n` is represented by ``Posets(n)``::
|
|
15
15
|
|
16
16
|
The infinite set of all posets can be used to find minimal examples::
|
17
17
|
|
18
|
+
sage: # needs nauty
|
18
19
|
sage: for P in Posets():
|
19
20
|
....: if not P.is_series_parallel():
|
20
21
|
....: break
|
@@ -30,15 +31,17 @@ The infinite set of all posets can be used to find minimal examples::
|
|
30
31
|
|
31
32
|
:meth:`~Posets.AntichainPoset` | Return an antichain on `n` elements.
|
32
33
|
:meth:`~Posets.BooleanLattice` | Return the Boolean lattice on `2^n` elements.
|
34
|
+
:meth:`~Posets.BubblePoset` | Return the Bubble lattice for `(m,n)`.
|
33
35
|
:meth:`~Posets.ChainPoset` | Return a chain on `n` elements.
|
34
36
|
:meth:`~Posets.Crown` | Return the crown poset on `2n` elements.
|
35
37
|
:meth:`~Posets.DexterSemilattice` | Return the Dexter semilattice.
|
36
38
|
:meth:`~Posets.DiamondPoset` | Return the lattice of rank two on `n` elements.
|
37
39
|
:meth:`~Posets.DivisorLattice` | Return the divisor lattice of an integer.
|
38
40
|
:meth:`~Posets.DoubleTailedDiamond` | Return the double tailed diamond poset on `2n + 2` elements.
|
41
|
+
:meth:`~Posets.HochschildLattice` | Return the Hochschild lattice for `n`.
|
39
42
|
:meth:`~Posets.IntegerCompositions` | Return the poset of integer compositions of `n`.
|
40
43
|
:meth:`~Posets.IntegerPartitions` | Return the poset of integer partitions of ``n``.
|
41
|
-
:meth:`~Posets.IntegerPartitionsDominanceOrder` | Return the lattice of integer partitions
|
44
|
+
:meth:`~Posets.IntegerPartitionsDominanceOrder` | Return the lattice of integer partitions of the integer `n` ordered by dominance.
|
42
45
|
:meth:`~Posets.MobilePoset` | Return the mobile poset formed by the `ribbon` with `hangers` below and an `anchor` above.
|
43
46
|
:meth:`~Posets.NoncrossingPartitions` | Return the poset of noncrossing partitions of a finite Coxeter group ``W``.
|
44
47
|
:meth:`~Posets.PentagonPoset` | Return the Pentagon poset.
|
@@ -53,6 +56,7 @@ The infinite set of all posets can be used to find minimal examples::
|
|
53
56
|
:meth:`~Posets.RestrictedIntegerPartitions` | Return the poset of integer partitions of `n`, ordered by restricted refinement.
|
54
57
|
:meth:`~Posets.SetPartitions` | Return the poset of set partitions of the set `\{1,\dots,n\}`.
|
55
58
|
:meth:`~Posets.ShardPoset` | Return the shard intersection order.
|
59
|
+
:meth:`~Posets.ShufflePoset` | Return the Shuffle lattice for `(m,n)`.
|
56
60
|
:meth:`~Posets.SSTPoset` | Return the poset on semistandard tableaux of shape `s` and largest entry `f` that is ordered by componentwise comparison.
|
57
61
|
:meth:`~Posets.StandardExample` | Return the standard example of a poset with dimension `n`.
|
58
62
|
:meth:`~Posets.SymmetricGroupAbsoluteOrderPoset` | The poset of permutations with respect to absolute order.
|
@@ -100,6 +104,7 @@ from sage.misc.classcall_metaclass import ClasscallMetaclass
|
|
100
104
|
import sage.categories.posets
|
101
105
|
from sage.combinat.permutation import Permutations, Permutation, to_standard
|
102
106
|
from sage.combinat.posets.posets import Poset, FinitePoset, FinitePosets_n
|
107
|
+
from sage.combinat.posets import bubble_shuffle, hochschild_lattice
|
103
108
|
from sage.combinat.posets.d_complete import DCompletePoset
|
104
109
|
from sage.combinat.posets.mobile import MobilePoset as Mobile
|
105
110
|
from sage.combinat.posets.lattices import (LatticePoset, MeetSemilattice,
|
@@ -281,6 +286,12 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
281
286
|
category=FiniteLatticePosets(),
|
282
287
|
facade=facade)
|
283
288
|
|
289
|
+
BubblePoset = staticmethod(bubble_shuffle.BubblePoset)
|
290
|
+
|
291
|
+
ShufflePoset = staticmethod(bubble_shuffle.ShufflePoset)
|
292
|
+
|
293
|
+
HochschildLattice = staticmethod(hochschild_lattice.hochschild_lattice)
|
294
|
+
|
284
295
|
@staticmethod
|
285
296
|
def ChainPoset(n, facade=None):
|
286
297
|
r"""
|
@@ -465,11 +476,11 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
465
476
|
|
466
477
|
@staticmethod
|
467
478
|
def DivisorLattice(n, facade=None):
|
468
|
-
"""
|
479
|
+
r"""
|
469
480
|
Return the divisor lattice of an integer.
|
470
481
|
|
471
|
-
Elements of the lattice are divisors of `n
|
472
|
-
lattice if `x` divides `y`.
|
482
|
+
Elements of the lattice are divisors of `n`, and we have
|
483
|
+
`x \leq y` in the lattice if `x` divides `y`.
|
473
484
|
|
474
485
|
INPUT:
|
475
486
|
|
@@ -502,15 +513,52 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
502
513
|
category=FiniteLatticePosets())
|
503
514
|
|
504
515
|
@staticmethod
|
505
|
-
def
|
516
|
+
def HessenbergPoset(H):
|
517
|
+
r"""
|
518
|
+
Return the poset associated to a Hessenberg function ``H``.
|
519
|
+
|
520
|
+
A *Hessenberg function* (of length `n`) is a function `H: \{1,\ldots,n\}
|
521
|
+
\to \{1,\ldots,n\}` such that `\max(i, H(i-1)) \leq H(i) \leq n` for all
|
522
|
+
`i` (where `H(0) = 0` by convention). The corresponding poset is given
|
523
|
+
by `i < j` (in the poset) if and only if `H(i) < j` (as integers).
|
524
|
+
These posets correspond to the natural unit interval order posets.
|
525
|
+
|
526
|
+
INPUT:
|
527
|
+
|
528
|
+
- ``H`` -- list of the Hessenberg function values
|
529
|
+
(without `H(0)`)
|
530
|
+
|
531
|
+
EXAMPLES::
|
532
|
+
|
533
|
+
sage: P = posets.HessenbergPoset([2, 3, 5, 5, 5]); P
|
534
|
+
Finite poset containing 5 elements
|
535
|
+
sage: P.cover_relations()
|
536
|
+
[[2, 4], [2, 5], [1, 3], [1, 4], [1, 5]]
|
537
|
+
|
538
|
+
TESTS::
|
539
|
+
|
540
|
+
sage: P = posets.HessenbergPoset([2, 2, 6, 4, 5, 6])
|
541
|
+
Traceback (most recent call last):
|
542
|
+
...
|
543
|
+
ValueError: [2, 2, 6, 4, 5, 6] is not a Hessenberg function
|
544
|
+
sage: P = posets.HessenbergPoset([]); P
|
545
|
+
Finite poset containing 0 elements
|
506
546
|
"""
|
547
|
+
n = len(H)
|
548
|
+
if not all(max(i+1, H[i-1]) <= H[i] for i in range(1, n)) or 0 < n < H[-1]:
|
549
|
+
raise ValueError(f"{H} is not a Hessenberg function")
|
550
|
+
return Poset((tuple(range(1, n+1)), lambda i, j: H[i-1] < j))
|
551
|
+
|
552
|
+
@staticmethod
|
553
|
+
def IntegerCompositions(n):
|
554
|
+
r"""
|
507
555
|
Return the poset of integer compositions of the integer ``n``.
|
508
556
|
|
509
557
|
A composition of a positive integer `n` is a list of positive
|
510
558
|
integers that sum to `n`. The order is reverse refinement:
|
511
|
-
`[p_1,p_2,...,p_l]
|
512
|
-
of an integer composition of `p_1`, followed by an
|
513
|
-
composition of `p_2`, and so on.
|
559
|
+
`p = [p_1,p_2,...,p_l] \leq q = [q_1,q_2,...,q_m]` if `q`
|
560
|
+
consists of an integer composition of `p_1`, followed by an
|
561
|
+
integer composition of `p_2`, and so on.
|
514
562
|
|
515
563
|
EXAMPLES::
|
516
564
|
|
@@ -527,7 +575,7 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
527
575
|
@staticmethod
|
528
576
|
def IntegerPartitions(n):
|
529
577
|
"""
|
530
|
-
Return the poset of integer partitions
|
578
|
+
Return the poset of integer partitions of the integer ``n``.
|
531
579
|
|
532
580
|
A partition of a positive integer `n` is a non-increasing list
|
533
581
|
of positive integers that sum to `n`. If `p` and `q` are
|
@@ -566,7 +614,7 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
566
614
|
@staticmethod
|
567
615
|
def RestrictedIntegerPartitions(n):
|
568
616
|
"""
|
569
|
-
Return the poset of integer partitions
|
617
|
+
Return the poset of integer partitions of the integer `n`
|
570
618
|
ordered by restricted refinement.
|
571
619
|
|
572
620
|
That is, if `p` and `q` are integer partitions of `n`, then
|
@@ -605,12 +653,12 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
605
653
|
@staticmethod
|
606
654
|
def IntegerPartitionsDominanceOrder(n):
|
607
655
|
r"""
|
608
|
-
Return the lattice of integer partitions
|
656
|
+
Return the lattice of integer partitions of the integer `n`
|
609
657
|
ordered by dominance.
|
610
658
|
|
611
659
|
That is, if `p=(p_1,\ldots,p_i)` and `q=(q_1,\ldots,q_j)` are
|
612
|
-
integer partitions of `n`, then `p
|
613
|
-
only if `p_1+\cdots+p_k
|
660
|
+
integer partitions of `n`, then `p \geq q` if and
|
661
|
+
only if `p_1+\cdots+p_k \geq q_1+\cdots+q_k` for all `k`.
|
614
662
|
|
615
663
|
INPUT:
|
616
664
|
|
@@ -653,6 +701,7 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
653
701
|
|
654
702
|
EXAMPLES::
|
655
703
|
|
704
|
+
sage: # needs nauty
|
656
705
|
sage: P3 = posets.PowerPoset(3); P3
|
657
706
|
Finite meet-semilattice containing 19 elements
|
658
707
|
sage: all(P.is_chain() for P in P3.maximal_elements())
|
@@ -660,6 +709,7 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
660
709
|
|
661
710
|
TESTS::
|
662
711
|
|
712
|
+
sage: # needs nauty
|
663
713
|
sage: P0 = posets.PowerPoset(0); P0
|
664
714
|
Finite meet-semilattice containing 1 elements
|
665
715
|
sage: P0[0]
|
@@ -1433,16 +1483,16 @@ class Posets(metaclass=ClasscallMetaclass):
|
|
1433
1483
|
return ((a[0] == b[0] + 1 and a[1] == b[1]) or
|
1434
1484
|
(a[1] == b[1] + 1 and a[0] == b[0]))
|
1435
1485
|
return JoinSemilattice((lam.cells(), cell_geq), cover_relations=True)
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1486
|
+
|
1487
|
+
def cell_leq(a, b):
|
1488
|
+
"""
|
1489
|
+
Nested function that returns ``True`` if the cell `a` is
|
1490
|
+
to the left or above
|
1491
|
+
the cell `b` in the (English) Young diagram.
|
1492
|
+
"""
|
1493
|
+
return ((a[0] == b[0] - 1 and a[1] == b[1]) or
|
1494
|
+
(a[1] == b[1] - 1 and a[0] == b[0]))
|
1495
|
+
return MeetSemilattice((lam.cells(), cell_leq), cover_relations=True)
|
1446
1496
|
|
1447
1497
|
@staticmethod
|
1448
1498
|
def YoungsLattice(n):
|