37 typedef struct tla_matrix_st {
46 tla_matrix_init (tla_matrix_t M,
int m,
int n);
49 tla_matrix_init_set (tla_matrix_t M,
const tla_matrix_t N);
52 tla_matrix_init_with_vec (tla_matrix_t M,
const tla_vec_t v,
int iscol);
54 # define tla_matrix_init_with_vec_column(M, v) \
55 tla_matrix_init_with_vec (M, v, 1)
56 # define tla_matrix_init_with_vec_line(M, v) \
57 tla_matrix_init_with_vec (M, v, 0)
64 # define TLA_M_NUM(_M, _i, _j) \
65 (ccl_assert((((_M)->n)*((_i)-1)+((_j)-1))<(((_M)->m)*((_M)->n))), \
66 ((_M)->coefs->num[((_M)->n)*((_i)-1)+((_j)-1)]))
68 # define TLA_M_DEN(_M) (_M)->coefs->den
71 tla_matrix_remove_last_line (tla_matrix_t R, tla_matrix_t M);
74 tla_matrix_resize (tla_matrix_t M,
int m,
int n);
77 tla_matrix_clear (tla_matrix_t M);
80 tla_matrix_canonicalize (tla_matrix_t M);
82 #define tla_matrix_get_nb_lines(M) ((M)->m)
83 #define tla_matrix_get_nb_columns(M) ((M)->n)
86 tla_matrix_get_line (tla_matrix_t M,
int i, tla_vec_t R);
89 tla_matrix_get_column (tla_matrix_t M,
int j, tla_vec_t R);
95 tla_matrix_mul_vector (tla_vec_t R,
const tla_matrix_t M,
const tla_vec_t v);
98 tla_matrix_mul_matrix (tla_matrix_t R,
const tla_matrix_t M,
99 const tla_matrix_t N);
102 tla_matrix_set (tla_matrix_t M,
const tla_matrix_t N);
105 tla_matrix_z_mul (tla_matrix_t R,
const mpz_t z,
const tla_matrix_t M);
108 tla_matrix_set_identity (tla_matrix_t M);
111 tla_matrix_set_zero (tla_matrix_t M);
114 tla_matrix_are_equal (
const tla_matrix_t M1,
const tla_matrix_t M2);
117 tla_matrix_hash (
const tla_matrix_t M);
120 tla_matrix_Z_solution (
const tla_matrix_t M, tla_vec_t x,
const tla_vec_t v);
128 tla_matrix_t X, tla_matrix_t Y, tla_matrix_t U,
137 tla_matrix_t U, tla_matrix_t V);
141 tla_matrix_swap_lines (tla_matrix_t A,
int i1,
int i2);
144 tla_matrix_swap_columns (tla_matrix_t A,
int j1,
int j2);
147 tla_matrix_neg_line (tla_matrix_t A,
int i);
150 tla_matrix_neg_column (tla_matrix_t A,
int j);
153 tla_matrix_submul_column (tla_matrix_t A,
int j,
int jpivot, mpz_t x);
156 tla_matrix_sub_column (tla_matrix_t A,
int j,
int jpivot);
159 tla_matrix_addmul_column (tla_matrix_t A,
int j,
int jpivot, mpz_t x);
162 tla_matrix_submul_line (tla_matrix_t A,
int i,
int ipivot, mpz_t x);
165 tla_matrix_addmul_line (tla_matrix_t A,
int i,
int ipivot, mpz_t x);
168 tla_matrix_add_line (tla_matrix_t A,
int i,
int ipivot);
171 tla_matrix_least_in_line (tla_matrix_t H,
int i,
int jmin);
174 tla_matrix_is_identity (tla_matrix_t M);
void tla_matrix_compute_hnf(const tla_matrix_t A, tla_matrix_t H, int *dim, tla_matrix_t U, tla_matrix_t V)
void tla_matrix_compute_snf(tla_matrix_t A, tla_matrix_t H, int *dim, tla_matrix_t X, tla_matrix_t Y, tla_matrix_t U, tla_matrix_t V)