Skip to content

Commit 1cdc739

Browse files
committed
finishing touches for official 0.2 release
1 parent c395405 commit 1cdc739

3 files changed

Lines changed: 29 additions & 28 deletions

File tree

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
0.2.0:
3-
- 2018.
3+
- 2018.3.26
44
- add methods: add-row, add-column, multiply-row, multiply-column, map-row, map-column
55
- add methods move-row, move-column, swap-rows, swap-columns,
66
prepend-vertically, append-vertically, prepend-horizontally, append-horizontally

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ METHODS
4646

4747
* decompositions: decompositionLUCrout, decompositionLU, decompositionCholesky
4848

49-
* list like ops: equal, elems, elem, map, map-row, map-column, map-cell, reduce, reduce-rows, reduce-columns
49+
* list like ops: elems, elem, equal, map, map-row, map-column, map-cell, reduce, reduce-rows, reduce-columns
5050

5151
* structural ops: move-row, move-column, swap-rows, swap-columns, prepend-vertically, append-vertically, prepend-horizontally, append-horizontally
5252

@@ -315,13 +315,6 @@ List of two values: number of rows and number of columns.
315315
say $matrix.size();
316316
my $dim = min $matrix.size();
317317

318-
### elems
319-
320-
Number (count) of elements.
321-
322-
say $matrix.elems();
323-
say +$matrix; # same thing
324-
325318
### density
326319

327320
Density is the percentage of cell which are not zero.
@@ -438,12 +431,12 @@ This decomposition works only on symmetric and definite positive matrices.
438431
List Like Matrix Operations
439432
---------------------------
440433

441-
### equal
434+
### elems
442435

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.
444437

445-
if $matrixa.equal( $matrixb ) {
446-
if $matrixa ~~ $matrixb {
438+
say $matrix.elems();
439+
say +$matrix; # same thing
447440

448441
### elem
449442

@@ -453,6 +446,13 @@ Asks if certain value is present in cells (treating the matrix like a baggy set)
453446
Math::Matrix.new([[1,2],[3,4]]).elem(5); # False
454447
Math::Matrix.new([[1,2],[3,4]]).elem(3..7); # True
455448

449+
### equal
450+
451+
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+
456456
### map
457457

458458
Like the built in map it iterates over all elements, running a code block. The results for a new matrix.

lib/Math/Matrix.pod

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Matrices are readonly - all operations and derivatives are new objects.
3737
=item numeric properties: size, density, trace, determinant, rank, kernel, norm, condition
3838
=item derived matrices: transposed, negated, conjugated, inverted, reduced-row-echelon-form
3939
=item decompositions: decompositionLUCrout, decompositionLU, decompositionCholesky
40-
=item list like ops: equal, elems, elem, map, map-row, map-column, map-cell, reduce, reduce-rows, reduce-columns
40+
=item list like ops: elems, elem, equal, map, map-row, map-column, map-cell, reduce, reduce-rows, reduce-columns
4141
=item structural ops: move-row, move-column, swap-rows, swap-columns, prepend-vertically, append-vertically, prepend-horizontally, append-horizontally
4242
=item matrix math ops: add, subtract, add-row, add-column, multiply, multiply-row, multiply-column, dotProduct, tensorProduct
4343
=item operators: +, -, *, **, ⋅, dot, ⊗, x, | |, || ||
@@ -322,13 +322,6 @@ List of two values: number of rows and number of columns.
322322
say $matrix.size();
323323
my $dim = min $matrix.size();
324324
325-
=head3 elems
326-
327-
Number (count) of elements.
328-
329-
say $matrix.elems();
330-
say +$matrix; # same thing
331-
332325
=head3 density
333326
334327
Density is the percentage of cell which are not zero.
@@ -453,14 +446,13 @@ This decomposition works only on symmetric and definite positive matrices.
453446
454447
455448
=head2 List Like Matrix Operations
456-
=head3 equal
457449
458-
Checks two matrices for equality. They have to be of same size and every element
459-
of the first matrix on a particular position has to be equal to the element
460-
(on the same position) of the second matrix.
461-
462-
if $matrixa.equal( $matrixb ) {
463-
if $matrixa ~~ $matrixb {
450+
=head3 elems
451+
452+
Number (count) of elements.
453+
454+
say $matrix.elems();
455+
say +$matrix; # same thing
464456
465457
=head3 elem
466458
@@ -471,6 +463,15 @@ or if there is one value within a cetain range.
471463
Math::Matrix.new([[1,2],[3,4]]).elem(5); # False
472464
Math::Matrix.new([[1,2],[3,4]]).elem(3..7); # True
473465
466+
=head3 equal
467+
468+
Checks two matrices for equality. They have to be of same size and every element
469+
of the first matrix on a particular position has to be equal to the element
470+
(on the same position) of the second matrix.
471+
472+
if $matrixa.equal( $matrixb ) {
473+
if $matrixa ~~ $matrixb {
474+
474475
=head3 map
475476
476477
Like the built in map it iterates over all elements, running a code block.

0 commit comments

Comments
 (0)