Skip to content

Commit

Permalink
matroids: no relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
gmou3 committed May 27, 2024
1 parent bb9d488 commit bc11824
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 49 deletions.
26 changes: 13 additions & 13 deletions src/sage/matroids/advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@

import sage.matroids.matroid
import sage.matroids.basis_exchange_matroid
from .minor_matroid import MinorMatroid
from .dual_matroid import DualMatroid
from .rank_matroid import RankMatroid
from .circuits_matroid import CircuitsMatroid
from .circuit_closures_matroid import CircuitClosuresMatroid
from .basis_matroid import BasisMatroid
from .flats_matroid import FlatsMatroid
from .linear_matroid import LinearMatroid, RegularMatroid, BinaryMatroid, TernaryMatroid, QuaternaryMatroid
from .utilities import setprint, newlabel, get_nonisomorphic_matroids, lift_cross_ratios, lift_map
from . import lean_matrix
from .extension import LinearSubclasses, MatroidExtensions
from .union_matroid import MatroidUnion, MatroidSum, PartitionMatroid
from .graphic_matroid import GraphicMatroid
from sage.matroids.minor_matroid import MinorMatroid
from sage.matroids.dual_matroid import DualMatroid
from sage.matroids.rank_matroid import RankMatroid
from sage.matroids.circuits_matroid import CircuitsMatroid
from sage.matroids.circuit_closures_matroid import CircuitClosuresMatroid
from sage.matroids.basis_matroid import BasisMatroid
from sage.matroids.flats_matroid import FlatsMatroid
from sage.matroids.linear_matroid import LinearMatroid, RegularMatroid, BinaryMatroid, TernaryMatroid, QuaternaryMatroid
from sage.matroids.utilities import setprint, newlabel, get_nonisomorphic_matroids, lift_cross_ratios, lift_map
from sage.matroids import lean_matrix
from sage.matroids.extension import LinearSubclasses, MatroidExtensions
from sage.matroids.union_matroid import MatroidUnion, MatroidSum, PartitionMatroid
from sage.matroids.graphic_matroid import GraphicMatroid
4 changes: 2 additions & 2 deletions src/sage/matroids/basis_exchange_matroid.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sage.data_structures.bitset cimport *
from sage.data_structures.bitset_base cimport bitset_t, bitset_s
from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem

cdef class BasisExchangeMatroid(Matroid):
cdef long _groundset_size, _matroid_rank, _bitset_size
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/basis_exchange_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ AUTHORS:
# https://www.gnu.org/licenses/
# ****************************************************************************

from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem
from sage.data_structures.bitset_base cimport *

cdef class BasisExchangeMatroid(Matroid):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/basis_matroid.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sage.data_structures.bitset cimport bitset_t
from .basis_exchange_matroid cimport BasisExchangeMatroid
from .set_system cimport SetSystem
from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid
from sage.matroids.set_system cimport SetSystem

cdef class BasisMatroid(BasisExchangeMatroid):
cdef bitset_t _bb
Expand Down
8 changes: 4 additions & 4 deletions src/sage/matroids/basis_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ from itertools import combinations
from sage.data_structures.bitset_base cimport *
from sage.misc.decorators import rename_keyword
from sage.structure.richcmp cimport rich_to_bool
from .matroid cimport Matroid
from .basis_exchange_matroid cimport BasisExchangeMatroid
from .set_system cimport SetSystem
from .utilities import cmp_elements_key
from sage.matroids.matroid cimport Matroid
from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid
from sage.matroids.set_system cimport SetSystem
from sage.matroids.utilities import cmp_elements_key

# class of general matroids, represented by their list of bases

Expand Down
6 changes: 3 additions & 3 deletions src/sage/matroids/circuit_closures_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ AUTHORS:

from cpython.object cimport Py_EQ, Py_NE
from sage.structure.richcmp cimport rich_to_bool, richcmp
from .matroid cimport Matroid
from .set_system cimport SetSystem
from .utilities import setprint_s, cmp_elements_key
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem
from sage.matroids.utilities import setprint_s, cmp_elements_key

cdef class CircuitClosuresMatroid(Matroid):
r"""
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/circuits_matroid.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem

cdef class CircuitsMatroid(Matroid):
cdef frozenset _groundset
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/circuits_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ AUTHORS:

from cpython.object cimport Py_EQ, Py_NE
from sage.structure.richcmp cimport rich_to_bool, richcmp
from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem

cdef class CircuitsMatroid(Matroid):
r"""
Expand Down
14 changes: 7 additions & 7 deletions src/sage/matroids/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@
from sage.rings.finite_rings.finite_field_base import FiniteField
import sage.matroids.matroid
import sage.matroids.basis_exchange_matroid
from .rank_matroid import RankMatroid
from .circuits_matroid import CircuitsMatroid
from .flats_matroid import FlatsMatroid
from .circuit_closures_matroid import CircuitClosuresMatroid
from .basis_matroid import BasisMatroid
from .linear_matroid import LinearMatroid, RegularMatroid, BinaryMatroid, TernaryMatroid, QuaternaryMatroid
from .graphic_matroid import GraphicMatroid
from sage.matroids.rank_matroid import RankMatroid
from sage.matroids.circuits_matroid import CircuitsMatroid
from sage.matroids.flats_matroid import FlatsMatroid
from sage.matroids.circuit_closures_matroid import CircuitClosuresMatroid
from sage.matroids.basis_matroid import BasisMatroid
from sage.matroids.linear_matroid import LinearMatroid, RegularMatroid, BinaryMatroid, TernaryMatroid, QuaternaryMatroid
from sage.matroids.graphic_matroid import GraphicMatroid
import sage.matroids.utilities


Expand Down
2 changes: 1 addition & 1 deletion src/sage/matroids/dual_matroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from .matroid import Matroid
from sage.matroids.matroid import Matroid

class DualMatroid(Matroid):
r"""
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/flats_matroid.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem

cdef class FlatsMatroid(Matroid):
cdef frozenset _groundset
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/flats_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ AUTHORS:

from cpython.object cimport Py_EQ, Py_NE
from sage.structure.richcmp cimport rich_to_bool, richcmp
from .matroid cimport Matroid
from .set_system cimport SetSystem
from sage.matroids.matroid cimport Matroid
from sage.matroids.set_system cimport SetSystem
from sage.combinat.posets.lattices import LatticePoset, FiniteLatticePoset

cdef class FlatsMatroid(Matroid):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matroids/graphic_matroid.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .matroid cimport Matroid
from sage.matroids.matroid cimport Matroid
from sage.graphs.generic_graph_pyx cimport GenericGraph_pyx

cdef class GraphicMatroid(Matroid):
Expand Down
6 changes: 3 additions & 3 deletions src/sage/matroids/graphic_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ AUTHORS:
# https://www.gnu.org/licenses/
# ****************************************************************************

from .matroid cimport Matroid
from sage.matroids.matroid cimport Matroid
from copy import copy, deepcopy
from .utilities import newlabel, split_vertex, sanitize_contractions_deletions
from sage.matroids.utilities import newlabel, split_vertex, sanitize_contractions_deletions
from itertools import combinations
from sage.rings.integer import Integer
from sage.sets.disjoint_set cimport DisjointSet_of_hashables
Expand Down Expand Up @@ -452,7 +452,7 @@ cdef class GraphicMatroid(Matroid):
sage: loads(dumps(M))
Graphic matroid of rank 9 on 15 elements
"""
from .unpickling import unpickle_graphic_matroid
from sage.matroids.unpickling import unpickle_graphic_matroid
data = (self._G, self.get_custom_name())
version = 0
return unpickle_graphic_matroid, (version, data)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matroids/minor_matroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
# the License, or (at your option) any later version.
# https://www.gnu.org/licenses/
# ****************************************************************************
from .matroid import Matroid
from .utilities import setprint_s
from sage.matroids.matroid import Matroid
from sage.matroids.utilities import setprint_s


class MinorMatroid(Matroid):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matroids/rank_matroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ``RankMatroid``. All that is required is a groundset and a function that
# the License, or (at your option) any later version.
# https://www.gnu.org/licenses/
# ****************************************************************************
from .matroid import Matroid
from sage.matroids.matroid import Matroid


class RankMatroid(Matroid):
Expand Down

0 comments on commit bc11824

Please sign in to comment.