You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -315,13 +315,6 @@ List of two values: number of rows and number of columns.
315
315
say $matrix.size();
316
316
my $dim = min $matrix.size();
317
317
318
-
### elems
319
-
320
-
Number (count) of elements.
321
-
322
-
say $matrix.elems();
323
-
say +$matrix; # same thing
324
-
325
318
### density
326
319
327
320
Density is the percentage of cell which are not zero.
@@ -438,12 +431,12 @@ This decomposition works only on symmetric and definite positive matrices.
438
431
List Like Matrix Operations
439
432
---------------------------
440
433
441
-
### equal
434
+
### elems
442
435
443
-
Checks two matrices for equality. They have to be of same size and every element of the first matrix on a particular position has to be equal to the element (on the same position) of the second matrix.
436
+
Number (count) of elements.
444
437
445
-
if $matrixa.equal( $matrixb ) {
446
-
if $matrixa ~~ $matrixb {
438
+
say $matrix.elems();
439
+
say +$matrix; # same thing
447
440
448
441
### elem
449
442
@@ -453,6 +446,13 @@ Asks if certain value is present in cells (treating the matrix like a baggy set)
Checks two matrices for equality. They have to be of same size and every element of the first matrix on a particular position has to be equal to the element (on the same position) of the second matrix.
452
+
453
+
if $matrixa.equal( $matrixb ) {
454
+
if $matrixa ~~ $matrixb {
455
+
456
456
### map
457
457
458
458
Like the built in map it iterates over all elements, running a code block. The results for a new matrix.
0 commit comments