-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
matrix_types.sg
72 lines (65 loc) · 1.62 KB
/
matrix_types.sg
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
BoolMatrix bool_matrix(2,3)
bool_matrix[0,0]=False
bool_matrix[1,0]=True
bool_matrix[0,1]=False
bool_matrix[1,1]=True
bool_matrix[0,2]=False
bool_matrix[1,2]=True
bool bool_element=bool_matrix[1,0]
bool_matrix[0,0]=bool_element
ByteMatrix byte_matrix(2,3)
byte_matrix[0,0]=0
byte_matrix[1,0]=1
byte_matrix[0,1]=0
byte_matrix[1,1]=1
byte_matrix[0,2]=0
byte_matrix[1,2]=1
byte_matrix[0,0]=byte_matrix[1,0]
WordMatrix word_matrix(2,3)
word_matrix[0,0]=0
word_matrix[1,0]=1
word_matrix[0,1]=0
word_matrix[1,1]=1
word_matrix[0,2]=0
word_matrix[1,2]=1
word_matrix[0,0]=word_matrix[1,0]
IntMatrix int_matrix(2,3)
int_matrix[0,0]=0
int_matrix[1,0]=1
int_matrix[0,1]=0
int_matrix[1,1]=1
int_matrix[0,2]=0
int_matrix[1,2]=1
int_matrix[0,0]=int_matrix[1,0]
LongIntMatrix long_int_matrix(2,3)
long_int_matrix[0,0]=0
long_int_matrix[1,0]=1
long_int_matrix[0,1]=0
long_int_matrix[1,1]=1
long_int_matrix[0,2]=0
long_int_matrix[1,2]=1
long_int_matrix[0,0]=long_int_matrix[1,0]
ShortRealMatrix short_real_matrix(2,3)
short_real_matrix[0,0]=0.0f
short_real_matrix[1,0]=1.0f
short_real_matrix[0,1]=0.0f
short_real_matrix[1,1]=1.0f
short_real_matrix[0,2]=0.0f
short_real_matrix[1,2]=1.0f
short_real_matrix[0,0]=short_real_matrix[1,0]
RealMatrix real_matrix(2,3)
real_matrix[0,0]=0.1
real_matrix[1,0]=0.1
real_matrix[0,1]=0.1
real_matrix[1,1]=0.1
real_matrix[0,2]=0.1
real_matrix[1,2]=0.1
real_matrix[0,0]=real_matrix[1,0]
#LongRealMatrix long_real_matrix(2,3)
#long_real_matrix[0,0]=0.1
#long_real_matrix[1,0]=0.1
#long_real_matrix[0,1]=0.1
#long_real_matrix[1,1]=0.1
#long_real_matrix[0,2]=0.1
#long_real_matrix[1,2]=0.1
#long_real_matrix[0,0]=long_real_matrix[1,0]