Questions tagged [apache-commons-math]

Apache Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Apache Commons Lang.

Apache Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Apache Commons Lang.

Binaries and source code for Apache Commons Math can be downloaded from here.

202 questions
0
votes
1 answer

how to use Apache Commons Math Optimization in Jython?

I want to transfer Matlab code to Jython version, and find that the fminsearch in Matlab might be replaced by Apache-Common-Math-Optimization. I'm coding on the Mango Medical Image script manager, which uses Jython 2.5.3 as coding language. And the…
0
votes
0 answers

Are Apache's LinearInterpolator and SplineInterpolator thread-safe?

I have utilized org.apache.commons.math3.analysis.interpolation.LinearInterpolator and org.apache.commons.math3.analysis.interpolation.SplineInterpolator in the following way: I initialized SPLINE_INTERPOLATOR as static final private static final…
dotwin
  • 1,302
  • 2
  • 11
  • 31
0
votes
0 answers

Apache Common Math : apply exponential to a RealMatrix

Using Java Apache Common Maths, I would like to apply an exponential function to each element of the RealMatrix without having to go through each elements line by line and use a for loops. In other words, is there an exponential function in ACM…
Nielsou Akbrg
  • 201
  • 3
  • 13
0
votes
1 answer

Calculate derivative of an array with apache-commons-math

Good Morning, I have an array with about 3000 double values, I need to find all local minimum and maximum, for this I'm interested to first and second derivative, what's best way to achieve this with Apache Commons Math? My trouble is that I'm…
Etantonio
  • 359
  • 1
  • 5
  • 13
0
votes
3 answers

android java what is a long[ ][ ]?

I need to do the chiSquaredTest. I'm using the Apache Commons Math library but not sure what is a long[][] what the difference to a long[] ? Here is the method description : public double chiSquareTest(long[][] counts) throws…
0
votes
1 answer

What is the reason behind the calculation different of apache's DescriptiveStatistics::getPercentile method and normal percentile calculation method

Recently i have encountered the fact that org.apache.commons.math3.stat lib's DescriptiveStatistics::getPercentile method uses different approach to calculate the percentile of a given number set than the regular method. This SO answer explains the…
HarshaXsoad
  • 776
  • 9
  • 30
0
votes
0 answers

Calculate Factor unknown

I'm currently trying to add some JUnit tests to my pathdrawing system in order to check if the calculations are right... Currently I have: Class to Test(MapRouteDrawer.java): protected static double[] getCoords(PolynomialSplineFunction curve,…
RoiEX
  • 1,186
  • 1
  • 10
  • 37
0
votes
1 answer

How to draw a path correctly?

I'm currently working on a rewrite for a Path drawing algorythm. I'm using apache-commons-math's Spline Interpolator for getting a smooth path through all given points in 2D Space... Currently I have: /** * Draws a route on a map. */ public class…
RoiEX
  • 1,186
  • 1
  • 10
  • 37
0
votes
1 answer

Functionality of ValueServer in commons-math3

In one of the project have used the commons-math3-3.3.jar. This jar has concept of ValueServer. Have the code private static ValueServer getValueServer(final File file, final int count) throws ZeroException, NullArgumentException,…
Rehan
  • 929
  • 1
  • 12
  • 29
0
votes
1 answer

Extrapolation OutOfRangeException Apache Commons Math

I'm trying to implement an Extrapolation function using the Apache Commons Math lib and the PolynomialSplineFunction & LinearInterpolator functions. public double[] linearInterp(double[] x, double[] y, double[] xi) { LinearInterpolator li = new…
JTK
  • 1,469
  • 2
  • 22
  • 39
0
votes
1 answer

Apache commons math: matrix having arbitrary number of dimensions

I need to handle nD (n-Dimension, arbitrary n) matrixes using Java and I am trying to use apache commons math. I just need the common operations: sum, multiply, divide, traspose etc. I can easily create N x N matrixes of doubles: RealMatrix…
leocasucci
  • 101
  • 1
  • 1
  • 5
0
votes
1 answer

Commons Math: Multiple Samples support for DescriptiveStatistics instances

I'm using the Apache Commons Math library to do some statistical analysis and it is working great so far. According to the documentation, I can accumulate the statistics produced by multiple SummaryStatistics instances using the convenient…
0
votes
0 answers

PolynomialSplineFunction (from Apache Commons Math) evaluation in an x point

Doc says: "The value of the polynomial spline function for an argument x is computed as follows: The knot array is searched to find the segment to which x belongs. If x is less than the smallest knot point or greater than the largest one, an…
0
votes
1 answer

Java- DerivativeStructure inside the Apache Math.Commons library

I am having trouble implementing a more complicated form of the DerivativeStructure class provided by the Apache Commons Math Library. I wrote two programs, a trial program and then a real program. The problem I have encountered deals with my real…
Axion004
  • 943
  • 1
  • 11
  • 37
0
votes
2 answers

Java- Commons.Math BrentSolver returns NoBracketingException. Is this a bug?

I wrote a test program to review the BrentSolver class through the Apache Commons Math library. import java.util.TreeSet; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.solvers.*; public class…
Axion004
  • 943
  • 1
  • 11
  • 37