Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-646

Unmodifiable views of RealVector

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • None
    • None

    Description

      The issue has been discussed on the mailing list. Please find attached a proposal for a new class UnmodifiableRealVector. I chose not to nest it in AbstractRealVector because it would make the corresponding file huge. Therefore, UnmodifiableRealVector is final. Maybe you'd like it to be private as well? A static method is provided in AbstractRealVector to build an UnmodifiableRealVector from any RealVector.
      Tests are also provided. Since iterating through different implementations of RealVector is actually different, a test is provided for UnmodifiableRealVector built on ArrayRealVector and OpenMapRealVector. These tests both derive from the same abstract test class. Hope everything works fine.

      Attachments

        1. MATH-646.patch
          33 kB
          Sebastien Brisard
        2. MATH-646.patch
          33 kB
          Sebastien Brisard

        Activity

          People

            Unassigned Unassigned
            celestin Sebastien Brisard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: