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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
COMMENT:
MATRIX
------
This is the data structure for MATRIX objects.
It has three components:
the length, the height and the selfpart.
routine macro description
----------------------------------------------------------------
s_m_s S_M_S select_matrix_self
s_m_h S_M_H select_matrix_height
s_m_hi S_M_HI select_matrix_height as INT
s_m_l S_M_L select_matrix_length
s_m_li S_M_LI select_matrix_length as INT
s_m_ij S_M_IJ select_matrix_i,j_element
s_m_iji S_M_IJI select_matrix_i,j_element as INT
c_m_s C_M_S change_matrix_self
c_m_h C_M_H change_matrix_height
c_m_l C_M_L change_matrix_length
b_lhs_m build_length_height_self_matrix
b_lh_m build_length_height_matrix
m_lh_m make_length_height_matrix
m_ilih_m make_integerlength_integerlength_
matrix
b_lh_nm build_length_height_null_matrix
m_lh_nm make_length_height_null_matrix
m_ilih_nm make_integerlength_integerlength_
null_matrix
the last three routines initialize the matrix with zero entries
The routine s_m_ij differs from S_M_IJ because in the macro
S_M_IJ there is no check on the indices.
BASIC ROUTINES
--------------
NAME:
s_m_h
SYNOPSIS:
OP s_m_h(OP mat)
MACRO:
S_M_H
DESCRIPTION:
the parameter must be a MATRIX object, the return
value is the height of the matrix, i.e. the INTEGER object
which tells how many rows are in the MATRIX object.
NAME:
s_m_l
SYNOPSIS:
OP s_m_l(OP mat)
MACRO:
S_M_L
DESCRIPTION:
the parameter must be a MATRIX object, the return
value is the length of the matrix, i.e. the INTEGER object
which tells how many rows are in the MATRIX object.
COMMENT:
COMMENT:
GENERAL ROUTINES FOR MATRICES
-----------------------------
NAME:
change_column_ij
SYNOPSIS:
INT change_column_ij(OP mat, INT i,j)
DESCRIPTION:
interchanges in the MATRIX object
mat the columns i,j.
NAME:
change_row_ij
SYNOPSIS:
INT change_row_ij(OP mat, INT i,j)
DESCRIPTION:
interchanges in the MATRIX
object mat the rows i,j.
NAME:
delete_column_matrix
SYNOPSIS:
INT delete_column_matrix(OP mat, INT i, OP result)
DESCRIPTION:
deletes in the MATRIX object mat the column i.
The result is the MATRIX object result. mat and result may be the
same object.
NAME:
delete_row_matrix
SYNOPSIS:
INT delete_row_matrix(OP mat, INT i, OP result)
DESCRIPTION:
deletes in the MATRIX object mat the row i. The
result is the MATRIX object result. mat and result may be the
same object.
NAME:
det_mat_imm
SYNOPSIS:
INT det_mat_imm(OP mat,erg)
DESCRIPTION:
computes the determinant of the MATRIX mat, it uses the
definition as an alternating sum. You should use it if
there is no div opertion defined for the entries. e. g.
POLYNOM objects as entries.
NAME:
det_mat_tri
SYNOPSIS:
INT det_mat_tri(OP mat,erg)
DESCRIPTION:
computes the determinant of the MATRIX mat, it uses the
the trinagulation of the matrix, so you must be careful with non
scalar entries, which allow no divison.
NAME:
pfaffian_matrix
SYNOPSIS:
INT pfaffian_matrix(OP mat,res)
DESCRIPTION:
computes the pfaffian of the MATRIX object mat. The result
is stored in res. It is not necessary that the matrix is
skewsymmetric, but only the parts of the upper triangular part
of the matrix are used.
NAME:
immanente_matrix
SYNOPSIS:
INT immanente_matrix(OP mat,part,res)
DESCRIPTION:
computes the immanente labeled by the PARTITION object
part of the MATRIX object mat. The result is stored in res.
NAME:
kronecker_product
SYNOPSIS:
INT kronecker_product(OP a,b,c)
DESCRIPTION:
computes the kronecker product of two MATRIX objects.
the three parameter may be equal. The result is the object c.
NAME:
rank
SYNOPSIS:
INT rank(OP a,b)
DESCRIPTION:
computes the rank of a matrix, it only works if it
possible to apply the function div to the entries of the
MATRIX object a
NAME:
spalten_summe
SYNOPSIS:
INT spalten_summe(OP mat,res)
DESCRIPTION:
computes the sum of columns, the result is a VECTOR object
whose length is the number of columns
NAME:
select_row
SYNOPSIS:
INT select_row(OP mat, INT i, OP vec)
DESCRIPTION:
transforms a MATRIX object into a VECTOR object, which contains
the elements of the labeled row
NAME:
select_column
SYNOPSIS:
INT select_column(OP mat, INT i, OP vec)
DESCRIPTION:
transforms a MATRIX object into a VECTOR object, which contains
the elements of the labeled column
NAME:
test_matrix
SYNOPSIS:
INT test_matrix()
DESCRIPTION:
to test the installation of the MATRIX objects
NAME:
scan_skewsymmetric_matrix
SYNOPSIS:
INT scan_skewsymmetric_matrix(OP mat)
DESCRIPTION:
to enter a MATRIX object, which is skew symmetric,
so you enter only the upper triangular part.
COMMENT:
GENERAL ROUTINES
----------------
add()
add_apply()
comp()
copy()
einsp()
fprint()
fprintln()
freeall()
freeself()
inc() appends a new column to the right and a
new row at the bottom
invers()
max() computes the maximum entry
mod() applied to all entries of the matrix
mult()
mult_apply()
nullp()
objectread()
objectwrite()
print()
println()
quadraticp() test if quadratic matrix
scan()
tex()
trace() trace of the matrix
transpose()
|