-
-
Notifications
You must be signed in to change notification settings - Fork 405
/
lean_matrix.pxd
109 lines (80 loc) · 4.73 KB
/
lean_matrix.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
from sage.data_structures.bitset cimport bitset_t
cdef class LeanMatrix:
cdef long _nrows
cdef long _ncols
cdef LeanMatrix copy(self) # Deprecated Sage matrix operation
cdef int resize(self, long k) except -1 # Not a Sage matrix operation
cdef LeanMatrix stack(self, LeanMatrix M)
cdef LeanMatrix augment(self, LeanMatrix M)
cdef LeanMatrix prepend_identity(self) # Not a Sage matrix operation
cpdef long ncols(self) except -1
cpdef long nrows(self) except -1
cpdef base_ring(self)
cpdef characteristic(self) # Not a Sage matrix operation
cdef get_unsafe(self, long r, long c)
cdef int set_unsafe(self, long r, long c, x) except -1
cdef bint is_nonzero(self, long r, long c) except -2 # Not a Sage matrix operation
cdef int add_multiple_of_row_c(self, long x, long y, s, bint col_start) except -1
cdef int swap_rows_c(self, long x, long y) except -1
cdef int rescale_row_c(self, long x, s, bint col_start) except -1
cdef int rescale_column_c(self, long y, s, bint start_row) except -1
cdef int pivot(self, long x, long y) except -1 # Not a Sage matrix operation
cdef list gauss_jordan_reduce(self, columns) # Not a Sage matrix operation
cdef list nonzero_positions_in_row(self, long r)
cdef LeanMatrix transpose(self)
cdef LeanMatrix _matrix_times_matrix_(self, LeanMatrix other)
cdef LeanMatrix matrix_from_rows_and_columns(self, rows, columns)
cdef class GenericMatrix(LeanMatrix):
cdef _base_ring, _characteristic
cdef list _entries
cdef _zero
cdef _one
cdef inline row_inner_product(self, long i, long j) # Not a Sage matrix operation
cdef class BinaryMatrix(LeanMatrix):
cdef bitset_t* _M
cdef bitset_t _temp
cdef inline long row_len(self, long i) except -1 # Not a Sage matrix operation
cdef inline bint row_inner_product(self, long i, long j) # Not a Sage matrix operation
cdef inline bint get(self, long x, long y) # Not a Sage matrix operation
cdef inline void set(self, long x, long y) # Not a Sage matrix operation
cdef inline list row_sum(self, object L) # Not a Sage matrix operation
cdef inline list row_union(self, object L) # Not a Sage matrix operation
cdef LeanMatrix matrix_from_rows_and_columns(self, rows, columns)
cdef matrix_from_rows_and_columns_reordered(self, rows, columns)
cdef list _character(self, bitset_t x)
cdef BinaryMatrix _distinguish_by(self, BinaryMatrix P)
cdef BinaryMatrix _splice_by(self, BinaryMatrix P)
cdef BinaryMatrix _isolate(self, long r)
cdef BinaryMatrix equitable_partition(self, BinaryMatrix P=*) # Not a Sage matrix operation
cdef bint is_isomorphic(self, BinaryMatrix other, BinaryMatrix s_eq=*, BinaryMatrix o_eq=*) except -2 # Not a Sage matrix operation
cdef class TernaryMatrix(LeanMatrix):
cdef bitset_t *_M0 # _M0[i] = support of row i
cdef bitset_t *_M1 # _M1[i] = negative support of row i
cdef bitset_t _s, _t, _u # registers
cdef inline long get(self, long r, long c) # Not a Sage matrix operation
cdef inline int set(self, long r, long c, x) except -1 # Not a Sage matrix operation
cdef bint _is_negative(self, long r, long c)
cdef inline long row_len(self, long i) # Not a Sage matrix operation
cdef inline long row_inner_product(self, long i, long j) # Not a Sage matrix operation
cdef void row_subs(self, long x, long y) # Not a Sage matrix operation
cdef void _row_negate(self, long x)
cdef matrix_from_rows_and_columns_reordered(self, rows, columns)
cdef class QuaternaryMatrix(LeanMatrix):
cdef bitset_t *_M0 # _M0[i] = 1-support of row i
cdef bitset_t *_M1 # _M1[i] = x- support of row i
cdef bitset_t _s, _t, _u # registers
cdef object _gf4, _zero, _one, _x_zero, _x_one
cdef inline get(self, long r, long c) # Not a Sage matrix operation
cdef inline int set(self, long r, long c, x) except -1 # Not a Sage matrix operation
cdef inline long row_len(self, long i) except -1 # Not a Sage matrix operation
cdef inline row_inner_product(self, long i, long j) # Not a Sage matrix operation
cdef inline int _row_div(self, long x, object s) except -1
cdef matrix_from_rows_and_columns_reordered(self, rows, columns)
cdef void conjugate(self) # Not a Sage matrix operation
cdef class IntegerMatrix(LeanMatrix):
cdef int* _entries
cdef inline get(self, long r, long c) # Not a Sage matrix operation
cdef inline void set(self, long r, long c, int x) # Not a Sage matrix operation
cdef inline long row_len(self, long i) except -1 # Not a Sage matrix operation
cdef inline row_inner_product(self, long i, long j) # Not a Sage matrix operation
cpdef GenericMatrix generic_identity(n, ring)