poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Micich <josh.mic...@gmail.com>
Subject Re: Commons Math dependency?
Date Fri, 09 Jul 2010 15:03:22 GMT
My initial preference was to avoid creating a dependency on another
project (in other words, copying / rewriting instead).

I took a look at copying over PoissonDistributionImpl and everything
it depends on.  Unfortunately, the code is heavily coupled (for
example, many convenience factory methods on the exception classes).
I abandoned this approach when I'd copied a few dozen classes with no
end in sight.

Next, I tried pruning the classes as I added them (with some educated
guesses as to what functionality POI doesn't need).  For example, for
our use case, the class NormalDistributionImpl is not needed.  With
this approach, I ended up with around 1000 lines of code to copy
across.  This represents about 1% of commons-math.

Overall, I think this might still be the best solution.  There are
many other examples of code which have been written anew in POI in
order to avoid creating another dependency.  If we need more code from
commons-math in future, we can re-evaluate at that time.

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


Mime
View raw message