Commit 59f2b1a
committed
Add vecdim, nanflag, and comparison method support to core data functions
This patch adds support for vecdim, nanflag, comparison method and direction
input arguments to the following functions:
min : add support for vecdim and "all", nanflag, and 'ComparisonMethod' paired
argument with options "real", "abs", and "auto".
max : add support for vecdim and "all", nanflag, and 'ComparisonMethod' paired
argument with options "real", "abs", and "auto".
cummin : add support for vecdim and "all", nanflag, direction, and
'ComparisonMethod' paired argument with options "real", "abs", and
"auto".
cummax : add support for vecdim and "all", nanflag, direction, and
'ComparisonMethod' paired argument with options "real", "abs", and
"auto".
* max.cc (get_dim_vecdim_all): New function for parsing dim, vecdim, and "all"
arguments.
* max.cc (do_minmax_red_op): New template functions.
* max.cc (do_cumminmax_red_op): New template functions.
* max.cc (Fmin, Fmax, Fcummin, Fcummax): Rewrite functions.
Update documentation. Add BIST tests.
This patch also improves the efficiency of the 'nanflag' implementation and
fixes certain behavior in sparse matrices to the following functions: 'cumsum',
'cumprod', 'prod', 'sum', and 'sumsq'.
* data.cc (Fcumsum, Fcumprod, Fprod, Fsum, Fsumsq): Rewrite functions.
* CSparse.cc (cumsum, cumprod, prod, sum, sumsq): Rewrite functions.
* dSparse.cc (cumsum, cumprod, prod, sum, sumsq): Rewrite functions.
Add new templated functions to support the extended functionality to the
following files:
* mx-inlines.cc (mx_inline_xmin): Add inline functions to support nanflag and
comparison methods.
* mx-inlines.cc (mx_inline_xmax): Add inline functions to support nanflag and
comparison methods.
* mx-inlines.cc (mx_inline_min): Added support for nanflag and comparison
methods in templated functions
* mx-inlines.cc (mx_inline_max): Added support for nanflag and comparison
methods in templated functions
* mx-inlines.cc (mx_inline_cmin): Specialized templated functions for complex
arrays.
* mx-inlines.cc (mx_inline_cmax): Specialized templated functions for complex
arrays.
* mx-inlines.cc (mx_inline_chmin): Specialized templated functions for character
arrays.
* mx-inlines.cc (mx_inline_chmax): Specialized templated functions for character
arrays.
* mx-inlines.cc (mx_inline_cummin): Added support for nanflag and comparison
methods in templated functions
* mx-inlines.cc (mx_inline_cummax): Added support for nanflag and comparison
methods in templated functions
* mx-inlines.cc (mx_inline_ccummin): Specialized templated functions for complex
arrays.
* mx-inlines.cc (mx_inline_ccummax): Specialized templated functions for complex
arrays.
* mx-inlines.cc (do_mx_minmax_op): Add inline functions to support new
functions.
* mx-inlines.cc (do_mx_cumminmax_op): Add inline functions to support new
functions.
* mx-op-decl.h : Add function declarations for min/max inline functions
to support nanflag and comparison methods.
* mx-op-defs.h : Update MINMAX function declarations for min/max inline
functions to support nanflag and comparison methods.
* Sparse-op-defs.h : Change MACRO functions to add support for 'nanflag' and
fix computations for 'cumprod', 'cumsum', 'prod', 'sum',
and 'sumsq' methods.
Add new templated methods to support binary min/max operations to the following
files:
* bsxfun-defs.cc (do_bsxfun1_op, do_bsxfun2_op): New methods to support nanflag
and comparison methods.
* bsxfun-defs.cc (do_bsxfun1_op, do_bsxfun2_op): New method declarations.
* mappers.h: (min, max): New templated functions to support nanflag and
comparison methods for binary min/max operations.
Add new templated methods and update existing methods to support binary min/max
operations to the following files:
* chNDArray.cc (min, max): Update methods to use specialized mx-inline functions
* CMatrix.cc (flip): New method.
* CMatrix.h (flip): New method declaration.
* CSparse.cc (min, max): Add support for 'nanflag' and comparison method.
* CSparse.h (min, max): Update method declarations.
* dMatrix.cc (flip): New method.
* dMatrix.h (flip): New method declaration.
* dNDArray.cc (flip): New method.
* dNDArray.h (flip): New method declaration.
* dSparse.cc (min, max): Add support for 'nanflag' and comparison method.
* dSparse.h (min, max): Update method declarations.
* fCNDArray.cc (flip, dsumsq): New methods.
* fCNDArray.h (flip, dsumsq): New method declarations.
* fMatrix.cc (flip): New method.
* fMatrix.h (flip): New method declaration.
* fNDArray.cc (flip, dsumsq): New methods.
* fNDArray.h (flip, dsumsq): New method declarations.
* intNDArray.cc (sumsq, flip, cumprod): New methods.
* intNDArray.h (sumsq, flip, cumprod): New method declarations.1 parent 91e497e commit 59f2b1a
File tree
33 files changed
+6797
-2259
lines changed- libinterp/corefcn
- liboctave
- array
- numeric
- operators
33 files changed
+6797
-2259
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2792 | 2792 | | |
2793 | 2793 | | |
2794 | 2794 | | |
2795 | | - | |
| 2795 | + | |
2796 | 2796 | | |
2797 | | - | |
| 2797 | + | |
2798 | 2798 | | |
2799 | 2799 | | |
2800 | 2800 | | |
2801 | | - | |
| 2801 | + | |
2802 | 2802 | | |
2803 | | - | |
| 2803 | + | |
2804 | 2804 | | |
2805 | 2805 | | |
2806 | 2806 | | |
2807 | | - | |
| 2807 | + | |
2808 | 2808 | | |
2809 | | - | |
| 2809 | + | |
2810 | 2810 | | |
2811 | 2811 | | |
2812 | 2812 | | |
2813 | | - | |
| 2813 | + | |
2814 | 2814 | | |
2815 | | - | |
| 2815 | + | |
2816 | 2816 | | |
2817 | 2817 | | |
2818 | 2818 | | |
2819 | | - | |
| 2819 | + | |
2820 | 2820 | | |
2821 | | - | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
2822 | 2828 | | |
2823 | 2829 | | |
2824 | 2830 | | |
| |||
3480 | 3486 | | |
3481 | 3487 | | |
3482 | 3488 | | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
3483 | 3505 | | |
3484 | 3506 | | |
3485 | 3507 | | |
| |||
3492 | 3514 | | |
3493 | 3515 | | |
3494 | 3516 | | |
3495 | | - | |
| 3517 | + | |
3496 | 3518 | | |
3497 | 3519 | | |
3498 | 3520 | | |
| |||
3501 | 3523 | | |
3502 | 3524 | | |
3503 | 3525 | | |
3504 | | - | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
3505 | 3543 | | |
3506 | 3544 | | |
3507 | 3545 | | |
3508 | 3546 | | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
3509 | 3563 | | |
3510 | 3564 | | |
3511 | 3565 | | |
| |||
3519 | 3573 | | |
3520 | 3574 | | |
3521 | 3575 | | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
3531 | | - | |
3532 | | - | |
3533 | | - | |
3534 | | - | |
3535 | | - | |
3536 | | - | |
3537 | | - | |
3538 | | - | |
3539 | | - | |
3540 | | - | |
3541 | | - | |
3542 | | - | |
3543 | | - | |
3544 | | - | |
3545 | | - | |
3546 | | - | |
3547 | | - | |
3548 | | - | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
3549 | 3581 | | |
3550 | 3582 | | |
3551 | 3583 | | |
3552 | 3584 | | |
3553 | 3585 | | |
3554 | 3586 | | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
3555 | 3603 | | |
3556 | 3604 | | |
3557 | 3605 | | |
| |||
3564 | 3612 | | |
3565 | 3613 | | |
3566 | 3614 | | |
3567 | | - | |
| 3615 | + | |
3568 | 3616 | | |
3569 | 3617 | | |
3570 | 3618 | | |
| |||
3573 | 3621 | | |
3574 | 3622 | | |
3575 | 3623 | | |
3576 | | - | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
3577 | 3641 | | |
3578 | 3642 | | |
3579 | 3643 | | |
3580 | 3644 | | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
3581 | 3661 | | |
3582 | 3662 | | |
3583 | 3663 | | |
| |||
3591 | 3671 | | |
3592 | 3672 | | |
3593 | 3673 | | |
3594 | | - | |
3595 | | - | |
3596 | | - | |
3597 | | - | |
3598 | | - | |
3599 | | - | |
3600 | | - | |
3601 | | - | |
3602 | | - | |
3603 | | - | |
3604 | | - | |
3605 | | - | |
3606 | | - | |
3607 | | - | |
3608 | | - | |
3609 | | - | |
3610 | | - | |
3611 | | - | |
3612 | | - | |
3613 | | - | |
3614 | | - | |
3615 | | - | |
3616 | | - | |
3617 | | - | |
3618 | | - | |
3619 | | - | |
3620 | | - | |
3621 | | - | |
3622 | | - | |
3623 | | - | |
3624 | | - | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
3625 | 3679 | | |
3626 | 3680 | | |
3627 | 3681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
| |||
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
481 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
482 | 491 | | |
483 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
484 | 498 | | |
485 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
486 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
487 | 509 | | |
488 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
489 | 516 | | |
490 | 517 | | |
491 | 518 | | |
| |||
0 commit comments