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

Change some constructors of ArrayFieldVector to accept FieldVector

    Details

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

      Description

      the constructor public ArrayFieldVector(T[] v1, ArrayFieldVector<T> v2) {
      ...
      }
      takes an ArrayFieldVector.

      but the same can be easier archieved with this

      public ArrayFieldVector(T[] v1, FieldVector<T> v2)

      { this(v1, v2 == null ? null : v2.getData()); }

      this goes for all other constructors...

      P.S. I donk know if copying the data in getData is an issue ... for this the named constructor may make sense...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aploese Arne Plöse
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: