Skip to content

Commit

Permalink
gh-36596: Replace relative imports by absolute ones in `sage.{geometr…
Browse files Browse the repository at this point in the history
…y,groups,numerical,plot}`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
- Cherry-picked from #35095
- This is for #36228
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #36596
Reported by: Matthias Köppe
Reviewer(s): Tobias Diez
  • Loading branch information
Release Manager committed Nov 5, 2023
2 parents 571320b + b9b9bc8 commit 1a2624f
Show file tree
Hide file tree
Showing 48 changed files with 114 additions and 105 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cimport cython
from sage.data_structures.list_of_pairs cimport ListOfPairs
from sage.structure.sage_object cimport SageObject
from .face_iterator cimport FaceIterator, CombinatorialFace
from .list_of_faces cimport ListOfFaces
from .face_data_structure cimport face_t
from .polyhedron_face_lattice cimport PolyhedronFaceLattice
from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator, CombinatorialFace
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.polyhedron_face_lattice cimport PolyhedronFaceLattice

@cython.final
cdef class CombinatorialPolyhedron(SageObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ from .conversions \
incidence_matrix_to_bit_rep_of_Vrep, \
facets_tuple_to_bit_rep_of_facets, \
facets_tuple_to_bit_rep_of_Vrep
from .conversions cimport Vrep_list_to_bit_rep
from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport Vrep_list_to_bit_rep
from sage.misc.cachefunc import cached_method

from sage.rings.integer cimport smallInteger
from cysignals.signals cimport sig_check

from .face_data_structure cimport face_len_atoms, face_init, face_free
from .face_iterator cimport iter_t, parallel_f_vector
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_len_atoms, face_init, face_free
from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport iter_t, parallel_f_vector


cdef extern from "Python.h":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cimport cython
from sage.structure.sage_object cimport SageObject
from .list_of_faces cimport ListOfFaces
from .face_data_structure cimport face_t
from .face_iterator cimport FaceIterator
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator

@cython.final
cdef class CombinatorialFace(SageObject):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ from cysignals.memory cimport check_allocarray, sig_free

import numbers
from sage.rings.integer cimport smallInteger
from .conversions cimport bit_rep_to_Vrep_list
from .base cimport CombinatorialPolyhedron
from .face_iterator cimport FaceIterator_base, FaceStatus
from .polyhedron_face_lattice cimport PolyhedronFaceLattice
from .face_data_structure cimport face_len_atoms, face_init, face_free, face_copy, face_issubset
from .face_list_data_structure cimport bit_rep_to_coatom_rep
from .list_of_faces cimport face_as_combinatorial_polyhedron
from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list
from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron
from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator_base, FaceStatus
from sage.geometry.polyhedron.combinatorial_polyhedron.polyhedron_face_lattice cimport PolyhedronFaceLattice
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_len_atoms, face_init, face_free, face_copy, face_issubset
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport bit_rep_to_coatom_rep
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport face_as_combinatorial_polyhedron


cdef extern from "Python.h":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .face_list_data_structure cimport face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_t


cdef int Vrep_list_to_bit_rep(tuple Vrep_list, face_t output) except -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ from memory_allocator cimport MemoryAllocator

from sage.matrix.matrix_dense cimport Matrix_dense

from .list_of_faces cimport ListOfFaces
from .face_data_structure cimport face_next_atom, face_add_atom_safe, facet_set_coatom, face_clear
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_next_atom, face_add_atom_safe, facet_set_coatom, face_clear

cdef extern from "Python.h":
int unlikely(int) nogil # Defined by Cython
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cimport cython
from sage.structure.sage_object cimport SageObject
from .list_of_faces cimport ListOfFaces
from .face_data_structure cimport face_t
from .face_list_data_structure cimport face_list_t
from .combinatorial_face cimport CombinatorialFace
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t
from sage.geometry.polyhedron.combinatorial_polyhedron.combinatorial_face cimport CombinatorialFace

cdef enum FaceStatus:
NOT_INITIALIZED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,13 @@ AUTHOR:

from cython.parallel cimport prange, threadid
from cysignals.memory cimport check_allocarray, sig_free
from cysignals.signals cimport sig_check
from memory_allocator cimport MemoryAllocator

from cysignals.signals cimport sig_check
from .conversions cimport bit_rep_to_Vrep_list
from .base cimport CombinatorialPolyhedron

from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron
from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport *
from sage.geometry.polyhedron.face import combinatorial_face_to_polyhedral_face, PolyhedronFace
from .face_list_data_structure cimport *


cdef extern from "Python.h":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Inline cython methods for lists of faces.
cdef extern from "Python.h":
int unlikely(int) nogil # Defined by Cython

from .face_data_structure cimport *
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport *
from libc.string cimport memset
from cysignals.signals cimport sig_check
from cysignals.memory cimport check_allocarray, check_calloc, sig_free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cimport cython
from .face_list_data_structure cimport face_list_t, face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t, face_t

@cython.final
cdef class ListOfFaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ AUTHOR:

from sage.matrix.matrix_dense cimport Matrix_dense

from .face_list_data_structure cimport *
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport *

cdef extern from "Python.h":
int unlikely(int) nogil # Defined by Cython
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cimport cython
from .list_of_faces cimport ListOfFaces
from .face_data_structure cimport face_t
from .face_list_data_structure cimport face_list_t
from .combinatorial_face cimport CombinatorialFace
from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces
from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t
from sage.geometry.polyhedron.combinatorial_polyhedron.combinatorial_face cimport CombinatorialFace

@cython.final
cdef class PolyhedronFaceLattice:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ from .conversions \
import facets_tuple_to_bit_rep_of_facets, \
facets_tuple_to_bit_rep_of_Vrep

from .conversions cimport bit_rep_to_Vrep_list
from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list

from .base cimport CombinatorialPolyhedron
from .face_iterator cimport FaceIterator
from .face_list_data_structure cimport *
from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron
from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator
from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport *


cdef extern from "Python.h":
Expand Down
4 changes: 2 additions & 2 deletions src/sage/geometry/triangulation/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ from sage.structure.parent cimport Parent
from sage.categories.sets_cat import Sets
from sage.matrix.constructor import matrix

from .functions cimport binomial
from .triangulations cimport \
from sage.geometry.triangulation.functions cimport binomial
from sage.geometry.triangulation.triangulations cimport \
triangulations_ptr, init_triangulations, next_triangulation, delete_triangulations


Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/matrix_gps/group_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ from sage.structure.richcmp cimport richcmp


try:
from .group_element_gap import MatrixGroupElement_gap
from sage.groups.matrix_gps.group_element_gap import MatrixGroupElement_gap
except ImportError:
MatrixGroupElement_gap = ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset cimport bitset_t
from sage.rings.integer cimport Integer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ REFERENCE:
from libc.string cimport memcmp, memcpy
from cysignals.memory cimport sig_malloc, sig_realloc, sig_free

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset_base cimport *

cdef inline int agcl_cmp(int a, int b) noexcept:
Expand Down
6 changes: 3 additions & 3 deletions src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ AUTHORS:
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *

from .automorphism_group_canonical_label cimport (
from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport (
get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space,
allocate_agcl_output, deallocate_agcl_output,
allocate_agcl_work_space, deallocate_agcl_work_space)
from .double_coset cimport (double_coset,
from sage.groups.perm_gps.partn_ref.double_coset cimport (double_coset,
dc_work_space, allocate_dc_work_space, deallocate_dc_work_space)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ REFERENCE:

from cysignals.memory cimport sig_malloc, sig_free

from .data_structures cimport*
from sage.groups.perm_gps.partn_ref.data_structures cimport*


cdef void *canonical_generator_next(void *can_gen_data, int *degree, bint *mem_err) noexcept:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/partn_ref/double_coset.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset cimport bitset_t
from sage.rings.integer cimport Integer

Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/partn_ref/double_coset.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ REFERENCE:

from cysignals.memory cimport sig_calloc

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset_base cimport *

# Functions
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *

from .automorphism_group_canonical_label cimport (
from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport (
get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space,
allocate_agcl_output, deallocate_agcl_output,
allocate_agcl_work_space, deallocate_agcl_work_space)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ REFERENCE:
#*****************************************************************************

from sage.data_structures.bitset_base cimport *
from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.rings.integer cimport Integer
from sage.structure.element import is_Matrix
from .double_coset cimport double_coset
from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset


cdef class LinearBinaryCodeStruct(BinaryCodeStruct):
Expand Down
8 changes: 4 additions & 4 deletions src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.graphs.base.c_graph cimport CGraph
from .automorphism_group_canonical_label cimport (
from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport (
get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space,
allocate_agcl_output, deallocate_agcl_output,
allocate_agcl_work_space, deallocate_agcl_work_space)
from .canonical_augmentation cimport (iterator,
from sage.groups.perm_gps.partn_ref.canonical_augmentation cimport (iterator,
canonical_generator_data, allocate_cgd, deallocate_cgd,
canonical_generator_next,
setup_canonical_generator, start_canonical_generator)
from .refinement_sets cimport (subset, free_subset, all_set_children_are_equivalent,
from sage.groups.perm_gps.partn_ref.refinement_sets cimport (subset, free_subset, all_set_children_are_equivalent,
refine_set, compare_sets, generate_child_subsets, apply_subset_aug,
canonical_set_parent, allocate_sgd, deallocate_sgd, allocate_subset_gen, free_subset_gen,
setup_set_gen, subset_generator_next, subset_generator_data, allocate_subset_gen_2)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ REFERENCE:
# https://www.gnu.org/licenses/
# ****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset_base cimport *
from sage.rings.integer cimport Integer
from sage.graphs.base.sparse_graph cimport SparseGraph
from sage.graphs.base.dense_graph cimport DenseGraph, copy_dense_graph
from .double_coset cimport double_coset
from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset


def isomorphic(G1, G2, partn, ordering2, dig, use_indicator_function, sparse=False):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *


# name of the three functions to customize
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ EXAMPLES::

from cysignals.memory cimport sig_malloc, sig_free

from .data_structures cimport *
from .double_coset cimport double_coset, int_cmp
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset, int_cmp


def is_isomorphic(self, other):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *

from .automorphism_group_canonical_label cimport (
from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport (
get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space,
allocate_agcl_output, deallocate_agcl_output,
allocate_agcl_work_space, deallocate_agcl_work_space)
Expand Down
6 changes: 3 additions & 3 deletions src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ REFERENCE:

from libc.string cimport memcmp

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.data_structures.bitset_base cimport *
from sage.rings.integer cimport Integer
from sage.matrix.constructor import Matrix
from .refinement_binary cimport NonlinearBinaryCodeStruct, refine_by_bip_degree
from .double_coset cimport double_coset
from sage.groups.perm_gps.partn_ref.refinement_binary cimport NonlinearBinaryCodeStruct, refine_by_bip_degree
from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset


cdef class MatrixStruct:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/partn_ref/refinement_python.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .data_structures cimport *
from sage.groups.perm_gps.partn_ref.data_structures cimport *


cdef class PythonPartitionStack:
Expand Down
6 changes: 3 additions & 3 deletions src/sage/groups/perm_gps/partn_ref/refinement_python.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ debugger.

from cysignals.memory cimport sig_malloc, sig_free

from .data_structures cimport *
from .automorphism_group_canonical_label cimport (
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport (
get_aut_gp_and_can_lab, aut_gp_and_can_lab,
deallocate_agcl_output)
from .double_coset cimport double_coset
from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset
from sage.rings.integer cimport Integer


Expand Down
Loading

0 comments on commit 1a2624f

Please sign in to comment.