Menu

#772 Create cumulative matrix functions

v1.1.x
closed
v1.1.5
New Functionality
2023-02-16
2022-12-20
Erik Hänel
No

Create the following cumulative matrix functions:

  • cumsum(MAT, BASE=0) -> MAT (Cumulative sum, will add cumulative to the BASE matrix)
  • cumprd(MAT, BASE=1) -> MAT (Cumulative product, will multiply cumulative with the BASE matrix)

Analysis:

We will omit those BASE parameters as these are either realizable as pre- or post-operation operands and will therefore only result in misunderstandings. Instead we'll use the second parameter to define the direction of application for actual matrices (for vectors it is obvious). As a reference of application, we'll use the dimension logic of the unique() matrix function.

Implementation:

  • Implementation: Implemented as proposed by the analysis.
  • Revision: [r1307]
  • Implementation test: Both functions were tested on a human-readable matrix.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [x] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [ ] not needed
  • Language files:
    • [x] corresponding language files updated
    • [ ] not needed

Tests:

Functions were added to the automatic SW tests. No deviations detected.

Related

Commit: [r1307]

Discussion

  • Erik Hänel

    Erik Hänel - 2022-12-20
    • labels: --> matrix, function, internal
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-12-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,3 +2,25 @@
    
    
     * `cumsum(MAT, BASE=0) -> MAT` (Cumulative sum, will add cumulative to the BASE matrix)
     * `cumprd(MAT, BASE=1) -> MAT` (Cumulative product, will multiply cumulative with the BASE matrix)
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2023-01-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,7 @@
    
     * `cumprd(MAT, BASE=1) -> MAT` (Cumulative product, will multiply cumulative with the BASE matrix)
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +We will omit those `BASE` parameters as these are either realizable as pre- or post-operation operands and will therefore only result in misunderstandings. Instead we'll use the second parameter to define the direction of application for actual matrices (for vectors it is obvious). As a reference of application, we'll use the dimension logic of the `unique()` matrix function.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2023-01-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,19 +7,19 @@
     We will omit those `BASE` parameters as these are either realizable as pre- or post-operation operands and will therefore only result in misunderstandings. Instead we'll use the second parameter to define the direction of application for actual matrices (for vectors it is obvious). As a reference of application, we'll use the dimension logic of the `unique()` matrix function.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as proposed by the analysis.
    +* Revision: [r1307]
    +* Implementation test: Both functions were tested on a human-readable matrix.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
    -    * [ ] corresponding documentation articles updated
    +    * [x] corresponding documentation articles updated
         * [ ] new documentation articles created
         * [ ] not needed
     * **Language files:**
    -    * [ ] corresponding language files updated
    +    * [x] corresponding language files updated
         * [ ] not needed
    
     ###Tests:
    
    • status: implementing --> testing
     

    Related

    Commit: [r1307]

  • Erik Hänel

    Erik Hänel - 2023-02-16
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -23,4 +23,4 @@
    
         * [ ] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Functions were added to the automatic SW tests. No deviations detected.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB