Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Partition backtrack functions for lists -- a simple example of using partn_ref.
EXAMPLES::
sage: import sage.groups.perm_gps.partn_ref.refinement_lists
"""
#***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller <rlmillster@gmail.com> # Copyright (C) 2009 Nicolas Borie <nicolas.borie@math.u-psud.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # http://www.gnu.org/licenses/ #*****************************************************************************
from cysignals.memory cimport sig_malloc, sig_free
from .data_structures cimport * from .double_coset cimport double_coset, int_cmp
r""" Return the bijection as a permutation if two lists are isomorphic, return False otherwise.
EXAMPLES::
sage: from sage.groups.perm_gps.partn_ref.refinement_lists import is_isomorphic sage: is_isomorphic([0,0,1],[1,0,0]) [1, 2, 0]
""" cdef PartitionStack *part cdef int *output cdef int *ordering PS_dealloc(part) sig_free(ordering) sig_free(output) raise MemoryError
else: output_py = False
cdef bint all_list_children_are_equivalent(PartitionStack *PS, void *S):
cdef int refine_list(PartitionStack *PS, void *S, int *cells_to_refine_by, int ctrb_len):
cdef int compare_lists(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): r""" Compare two lists according to the lexicographic order. """ cdef int i, j |