commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arne Plöse <plq...@gmx.de>
Subject [math] RealVector with visibility protected|public conflict
Date Tue, 09 Apr 2013 17:58:37 GMT

Hi,

in class org.apache.commons.math3.linear.RealVector there is the
embedded class Entry which is protected, but it is exposed by method
public Iterator<Entry> iterator() ...

My solution: 
1. make class Entry public
2. make class RealVector implement Iterable<RealVector<Entry>>

so one can do this:

for (RealVector.Entry e : v) {
  if (Double.isNaN(e.getValue()) || 
      Double.isInfinite(e.getValue())) {
    throw new RuntimeException("roots: inputs must not contain Inf or
NaN");
  }
}

JIRA + diff???

Arne



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message