Menu

#201 Convert vectors to lists for multiargument functions

v1.1.x
closed
None
v1.1.0
Change Request
2017-05-28
2017-05-15
Erik Hänel
No

If one applies a multiargument functions (just like norm(x,y,z...)) to a vector, one won't get one but multiple results, because the multiargument function was applied to the single componentes of the vector. Change this behavior by explicitly convert the vectors to lists in this case.

Analysis:
This can be done by hooking into the SetExpr(const string&) method of the parser. Currently there's already a preevaluation of the vector components done, so it should be possible to apply the multiargument function to the result of the component evaluation.

Implementation:
Implementation was done as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
Not needed. Change resulted in intended behavior.

Tests:
Tests were passed without any deviation. Change was implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2017-05-15
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2017-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     If one applies a multiargument functions (just like `norm(x,y,z...)`) to a vector, one won't get one but multiple results, because the multiargument function was applied to the single componentes of the vector. Change this behavior by explicitly convert the vectors to lists in this case.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2017-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     If one applies a multiargument functions (just like `norm(x,y,z...)`) to a vector, one won't get one but multiple results, because the multiargument function was applied to the single componentes of the vector. Change this behavior by explicitly convert the vectors to lists in this case.
    
     **Analysis:**
    +This can be done by hooking into the `SetExpr(const string&)` method of the parser. Currently there's already a preevaluation of the vector components done, so it should be possible to apply the multiargument function to the result of the component evaluation.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2017-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,9 @@
     This can be done by hooking into the `SetExpr(const string&)` method of the parser. Currently there's already a preevaluation of the vector components done, so it should be possible to apply the multiargument function to the result of the component evaluation.
    
     **Implementation:**
    +Implementation was done as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +Not needed. Change resulted in intended behavior.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2017-05-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,3 +10,4 @@
     Not needed. Change resulted in intended behavior.
    
     **Tests:**
    +Tests were passed without any deviation. Change was implemented successfully.
    
     
  • Erik Hänel

    Erik Hänel - 2017-05-28
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB