jscience
  1. jscience
  2. JSCIENCE-154

Identifying null with the neutral element for addition?

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: Mathematics
    • Labels:
      None

      Description

      When manipulating Polynomials, I worked with expressions like
      p.times(q.getCoefficient(Term.ONE))
      which raises NullPointerException if q has no constant term. Two possible solutions would be
      1. to make getCoefficient return polynomial zero when the specified term is not present,
      2. to change the contract of mul, so as to have
      p.times(null) == zero

      What do you think?
      Sébastien

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            celestin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: