@@ -12,7 +12,7 @@ import pycubool as cb
1212# Creation an empty matrix of a known form
1313#
1414
15- shape = (3 , 3 ) # Adjacency matrices shape
15+ shape = (3 , 3 ) # Matrix shape
1616a = cb.Matrix.empty(shape = shape) # Creating matrix
1717
1818#
@@ -31,7 +31,7 @@ print(a, sep='\n') # Matrix output
3131# Creation an empty matrix of known shape and filling with given arrays of indices
3232#
3333
34- shape = (3 , 3 ) # Adjacency matrices shape
34+ shape = (3 , 3 ) # Matrix shape
3535a = cb.Matrix.empty(shape = shape) # Creating matrix
3636rows = [0 , 1 , 1 , 1 ] # Row indices of values
3737cols = [0 , 0 , 1 , 2 ] # Column indices of values
@@ -44,7 +44,7 @@ print(a, sep='\n') # Matrix output
4444# Creating a matrix via shape and arrays of significant element indices
4545#
4646
47- shape = (3 , 3 ) # Adjacency matrices shape
47+ shape = (3 , 3 ) # Matrix shape
4848rows = [0 , 1 , 1 , 1 ] # Row indices of values
4949cols = [0 , 0 , 1 , 2 ] # Column indices of values
5050a = cb.Matrix.from_lists(shape = shape, rows = rows, cols = cols)
@@ -57,7 +57,7 @@ print(a, sep='\n') # Matrix output
5757# Generate random matrix by determining the shape and density - the percentage of non-zeros elements
5858#
5959
60- shape = (4 , 4 ) # Adjacency matrices shape
60+ shape = (4 , 4 ) # Matrix shape
6161density = 0.5 # Matrix filling density
6262a = cb.Matrix.generate(shape = shape, density = density)
6363
@@ -110,12 +110,12 @@ import pycubool as cb
110110# Matrix initialization
111111#
112112
113- shape = (3 , 3 ) # Adjacency matrices shape
113+ shape = (3 , 3 ) # Matrix shape
114114a = cb.Matrix.empty(shape = shape)
115115a[0 , 0 ] = True
116116a[2 , 0 ] = True
117117
118- shape = (3 , 3 ) # Adjacency matrices shape
118+ shape = (3 , 3 ) # Matrix shape
119119b = cb.Matrix.empty(shape = shape)
120120b[1 , 1 ] = True
121121b[1 , 2 ] = True
@@ -151,21 +151,21 @@ import pycubool as cb
151151# Matrix initialization
152152#
153153
154- a = cb.Matrix.empty(shape = (3 , 3 ))
154+ a = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
155155a[1 , 0 ] = True
156156a[1 , 1 ] = True
157157a[1 , 2 ] = True
158158a[0 , 0 ] = True
159159
160- b = cb.Matrix.empty(shape = (3 , 3 ))
160+ b = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
161161b[0 , 1 ] = True
162162b[0 , 2 ] = True
163163
164164#
165165# Simple matrix multiplication
166166#
167167
168- result = a.mxm(b) # result = a * b
168+ result = a.mxm(b) # result = a * b
169169
170170print (" Simple matrix multiplication:" )
171171print (result, sep = ' \n ' ) # Matrix output
@@ -209,7 +209,7 @@ import pycubool as cb
209209# Matrix initialization
210210#
211211
212- shape = (3 , 3 ) # Adjacency matrices shape
212+ shape = (3 , 3 ) # Matrix shape
213213a = cb.Matrix.empty(shape = shape)
214214a[1 , 0 ] = True
215215a[1 , 1 ] = True
@@ -248,11 +248,11 @@ import pycubool as cb
248248# Matrix initialization
249249#
250250
251- a = cb.Matrix.empty(shape = (2 , 2 )) # Adjacency matrices shape
251+ a = cb.Matrix.empty(shape = (2 , 2 )) # Creating an empty matrix of a given shape
252252a[0 , 0 ] = True
253253a[1 , 0 ] = True
254254
255- b = cb.Matrix.empty(shape = (2 , 2 )) # Adjacency matrices shape
255+ b = cb.Matrix.empty(shape = (2 , 2 )) # Creating an empty matrix of a given shape
256256b[1 , 1 ] = True
257257b[1 , 0 ] = True
258258
@@ -289,7 +289,7 @@ import pycubool as cb
289289# Matrix initialization
290290#
291291
292- a = cb.Matrix.empty(shape = (3 , 3 )) # Adjacency matrices shape
292+ a = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
293293a[1 , 0 ] = True
294294a[1 , 1 ] = True
295295a[1 , 2 ] = True
@@ -327,7 +327,7 @@ import pycubool as cb
327327# Matrix initialization
328328#
329329
330- shape = (3 , 3 ) # Adjacency matrices shape
330+ shape = (3 , 3 ) # Matrix shape
331331a = cb.Matrix.empty(shape = shape)
332332a[1 , 0 ] = True
333333a[1 , 1 ] = True
@@ -384,7 +384,7 @@ import pycubool as cb
384384# Matrix initialization
385385#
386386
387- a = cb.Matrix.empty(shape = (3 , 3 )) # Adjacency matrices shape
387+ a = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
388388a[1 , 0 ] = True
389389a[1 , 1 ] = True
390390a[1 , 2 ] = True
@@ -422,7 +422,7 @@ import pycubool as cb
422422# Creation an empty matrix of a known form
423423#
424424
425- shape = (3 , 3 ) # Adjacency matrices shape
425+ shape = (3 , 3 ) # Matrix shape
426426a = cb.Matrix.empty(shape = shape) # Creating matrix
427427a[1 , 0 ] = True
428428a[1 , 1 ] = True
@@ -467,7 +467,7 @@ import pycubool as cb
467467# Matrix initialization
468468#
469469
470- shape = (3 , 3 ) # Adjacency matrices shape
470+ shape = (3 , 3 ) # Matrix shape
471471a = cb.Matrix.empty(shape = shape)
472472a[1 , 0 ] = True
473473a[1 , 1 ] = True
@@ -502,7 +502,7 @@ import pycubool as cb
502502# Matrix initialization
503503#
504504
505- a = cb.Matrix.empty(shape = (3 , 3 )) # Adjacency matrices shape
505+ a = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
506506a[1 , 0 ] = True
507507a[1 , 1 ] = True
508508a[1 , 2 ] = True
@@ -584,15 +584,15 @@ cb.setup_logger(path)
584584# Matrix initialization
585585#
586586
587- a = cb.Matrix.empty(shape = (3 , 3 ))
587+ a = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
588588a[1 , 0 ] = True
589589a[1 , 1 ] = True
590590a[1 , 2 ] = True
591591a[0 , 0 ] = True
592592
593593a.set_marker(" a-log-example-matrix" ) # Set debug marker for "a" matrix
594594
595- b = cb.Matrix.empty(shape = (3 , 3 ))
595+ b = cb.Matrix.empty(shape = (3 , 3 )) # Creating an empty matrix of a given shape
596596b[0 , 1 ] = True
597597b[0 , 2 ] = True
598598
0 commit comments