Commons Math
  1. Commons Math
  2. MATH-875

Deprecate RealVector.sparseIterator()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 3.3
    • Labels:

      Description

      Following MATH-870, RealVector.sparseIterator() has become useless. Its interface was confusing. Indeed, the Javadoc states

      Specialized implementations may choose to not iterate over all dimensions, either because those values are unset, or are equal to defaultValue(), or are small enough to be ignored for the purposes of iteration.

      The reference to defaultValue() (which does not exist) suggests that the interface offers the flexibility to chose the value which is not stored in the sparse implementation. On the other hand, "small enough to be ignored" suggests that this default value is zero.

      In version 3.1, this method will be deprecated, to be removed in 4.0.

        Activity

        Luc Maisonobe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Luc Maisonobe made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.3 [ 12324600 ]
        Resolution Fixed [ 1 ]
        Sébastien Brisard made changes -
        Field Original Value New Value
        Summary Deprecate RealVector.sparseIterator() and FieldVector.sparseIterator() Deprecate RealVector.sparseIterator()
        Affects Version/s 3.1 [ 12317576 ]
        Description Following MATH-870, {{RealVector.sparseIterator()}} and {{FieldVector.sparseIterator()}} have become useless. Their interface was confusing. Indeed, the Javadoc states

        {quote}
        Specialized implementations may choose to not iterate over all dimensions, either because those values are unset, or are equal to defaultValue(), or are small enough to be ignored for the purposes of iteration.
        {quote}

        The reference to {{defaultValue()}} (which does *not* exist) suggests that the interface offers the flexibility to chose the value which is not stored in the sparse implementation. On the other hand, "small enough to be ignored" suggests that this default value is zero.

        In version 3.1, this method will be deprecated, to be removed in 4.0.
        Following MATH-870, {{RealVector.sparseIterator()}} has become useless. Its interface was confusing. Indeed, the Javadoc states

        {quote}
        Specialized implementations may choose to not iterate over all dimensions, either because those values are unset, or are equal to defaultValue(), or are small enough to be ignored for the purposes of iteration.
        {quote}

        The reference to {{defaultValue()}} (which does *not* exist) suggests that the interface offers the flexibility to chose the value which is not stored in the sparse implementation. On the other hand, "small enough to be ignored" suggests that this default value is zero.

        In version 3.1, this method will be deprecated, to be removed in 4.0.
        Sébastien Brisard created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Sébastien Brisard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development