Search in sources :

Example 21 with Min

use of org.apache.commons.math3.stat.descriptive.rank.Min in project OpenTripPlanner by opentripplanner.

the class Graph method calculateTransitCenter.

/**
 * Calculates Transit center from median of coordinates of all transitStops if graph
 * has transit. If it doesn't it isn't calculated. (mean walue of min, max latitude and longitudes are used)
 *
 * Transit center is saved in center variable
 *
 * This speeds up calculation, but problem is that median needs to have all of latitudes/longitudes
 * in memory, this can become problematic in large installations. It works without a problem on New York State.
 * @see GraphEnvelope
 */
public void calculateTransitCenter() {
    if (hasTransit) {
        TDoubleList latitudes = new TDoubleLinkedList();
        TDoubleList longitudes = new TDoubleLinkedList();
        Median median = new Median();
        getVertices().stream().filter(v -> v instanceof TransitStop).forEach(v -> {
            latitudes.add(v.getLat());
            longitudes.add(v.getLon());
        });
        median.setData(latitudes.toArray());
        double medianLatitude = median.evaluate();
        median = new Median();
        median.setData(longitudes.toArray());
        double medianLongitude = median.evaluate();
        this.center = new Coordinate(medianLongitude, medianLatitude);
    }
}
Also used : TDoubleList(gnu.trove.list.TDoubleList) TurnRestriction(org.opentripplanner.common.TurnRestriction) LoggerFactory(org.slf4j.LoggerFactory) TransitStop(org.opentripplanner.routing.vertextype.TransitStop) CalendarServiceData(org.onebusaway.gtfs.model.calendar.CalendarServiceData) StreetSpeedSnapshotSource(org.opentripplanner.traffic.StreetSpeedSnapshotSource) GraphUtils(org.opentripplanner.common.geometry.GraphUtils) StreetVertexIndexService(org.opentripplanner.routing.services.StreetVertexIndexService) Median(org.apache.commons.math3.stat.descriptive.rank.Median) DefaultStreetVertexIndexFactory(org.opentripplanner.routing.impl.DefaultStreetVertexIndexFactory) Geometry(com.vividsolutions.jts.geom.Geometry) TraverseMode(org.opentripplanner.routing.core.TraverseMode) com.google.common.collect(com.google.common.collect) FeedInfo(org.onebusaway.gtfs.model.FeedInfo) ServiceDate(org.onebusaway.gtfs.model.calendar.ServiceDate) MavenVersion(org.opentripplanner.common.MavenVersion) TransferTable(org.opentripplanner.routing.core.TransferTable) StreetNotesService(org.opentripplanner.routing.services.notes.StreetNotesService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) SampleFactory(org.opentripplanner.analyst.request.SampleFactory) CalendarService(org.onebusaway.gtfs.services.calendar.CalendarService) TripPattern(org.opentripplanner.routing.edgetype.TripPattern) Stop(org.onebusaway.gtfs.model.Stop) Agency(org.onebusaway.gtfs.model.Agency) GraphUpdaterManager(org.opentripplanner.updater.GraphUpdaterManager) TimetableSnapshotSource(org.opentripplanner.updater.stoptime.TimetableSnapshotSource) StreetVertexIndexFactory(org.opentripplanner.routing.services.StreetVertexIndexFactory) java.util(java.util) AlertPatch(org.opentripplanner.routing.alertpatch.AlertPatch) WorldEnvelope(org.opentripplanner.util.WorldEnvelope) TDoubleList(gnu.trove.list.TDoubleList) TDoubleLinkedList(gnu.trove.list.linked.TDoubleLinkedList) StreetEdge(org.opentripplanner.routing.edgetype.StreetEdge) NoFutureDates(org.opentripplanner.graph_builder.annotation.NoFutureDates) GraphUpdaterConfigurator(org.opentripplanner.updater.GraphUpdaterConfigurator) GraphBuilderAnnotation(org.opentripplanner.graph_builder.annotation.GraphBuilderAnnotation) GeometryIndex(org.opentripplanner.analyst.core.GeometryIndex) MortonVertexComparatorFactory(org.opentripplanner.routing.core.MortonVertexComparatorFactory) EdgeWithCleanup(org.opentripplanner.routing.edgetype.EdgeWithCleanup) Coordinate(com.vividsolutions.jts.geom.Coordinate) Logger(org.slf4j.Logger) Envelope(com.vividsolutions.jts.geom.Envelope) CalendarServiceImpl(org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl) GraphBundle(org.opentripplanner.model.GraphBundle) DateTime(org.joda.time.DateTime) TransitStation(org.opentripplanner.routing.vertextype.TransitStation) Preferences(java.util.prefs.Preferences) java.io(java.io) AgencyAndId(org.onebusaway.gtfs.model.AgencyAndId) Deduplicator(org.opentripplanner.routing.trippattern.Deduplicator) PatternArriveVertex(org.opentripplanner.routing.vertextype.PatternArriveVertex) VisibleForTesting(com.google.common.annotations.VisibleForTesting) TransitStop(org.opentripplanner.routing.vertextype.TransitStop) Coordinate(com.vividsolutions.jts.geom.Coordinate) TDoubleLinkedList(gnu.trove.list.linked.TDoubleLinkedList) Median(org.apache.commons.math3.stat.descriptive.rank.Median)

Example 22 with Min

use of org.apache.commons.math3.stat.descriptive.rank.Min in project tetrad by cmu-phil.

the class Ling method pruneEdgesByResampling.

// ==============================PRIVATE METHODS====================//
/**
 * This is the method used in Patrik's code.
 */
public TetradMatrix pruneEdgesByResampling(TetradMatrix data) {
    TetradMatrix X = new TetradMatrix(data.transpose().toArray());
    int npieces = 10;
    int cols = X.columns();
    int rows = X.rows();
    int piecesize = (int) Math.floor(cols / npieces);
    List<TetradMatrix> bpieces = new ArrayList<>();
    List<TetradVector> diststdpieces = new ArrayList<>();
    List<TetradVector> cpieces = new ArrayList<>();
    for (int p = 0; p < npieces; p++) {
        // % Select subset of data, and permute the variables to the causal order
        // Xp = X(k,((p-1)*piecesize+1):(p*piecesize));
        int p0 = (p) * piecesize;
        int p1 = (p + 1) * piecesize - 1;
        int[] range = range(p0, p1);
        TetradMatrix Xp = X;
        // % Remember to subract out the mean
        // Xpm = mean(Xp,2);
        // Xp = Xp - Xpm*ones(1,size(Xp,2));
        // 
        // % Calculate covariance matrix
        // cov = (Xp*Xp')/size(Xp,2);
        TetradVector Xpm = new TetradVector(rows);
        for (int i = 0; i < rows; i++) {
            double sum = 0.0;
            for (int j = 0; j < Xp.columns(); j++) {
                sum += Xp.get(i, j);
            }
            Xpm.set(i, sum / Xp.columns());
        }
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < Xp.columns(); j++) {
                Xp.set(i, j, Xp.get(i, j) - Xpm.get(i));
            }
        }
        TetradMatrix Xpt = Xp.transpose();
        TetradMatrix cov = Xp.times(Xpt);
        for (int i = 0; i < cov.rows(); i++) {
            for (int j = 0; j < cov.columns(); j++) {
                cov.set(i, j, cov.get(i, j) / Xp.columns());
            }
        }
        // % Do QL decomposition on the inverse square root of cov
        // [Q,L] = tridecomp(cov^(-0.5),'ql');
        boolean posDef = LingUtils.isPositiveDefinite(cov);
        if (!posDef) {
            System.out.println("Covariance matrix is not positive definite.");
        }
        TetradMatrix sqrt = cov.sqrt();
        ;
        TetradMatrix I = TetradMatrix.identity(rows);
        TetradMatrix AI = I.copy();
        TetradMatrix invSqrt = sqrt.inverse();
        QRDecomposition qr = new QRDecomposition(invSqrt.getRealMatrix());
        RealMatrix r = qr.getR();
        // % The estimated disturbance-stds are one over the abs of the diag of L
        // newestdisturbancestd = 1./diag(abs(L));
        TetradVector newestdisturbancestd = new TetradVector(rows);
        for (int t = 0; t < rows; t++) {
            newestdisturbancestd.set(t, 1.0 / Math.abs(r.getEntry(t, t)));
        }
        // 
        for (int s = 0; s < rows; s++) {
            for (int t = 0; t < min(s, cols); t++) {
                r.setEntry(s, t, r.getEntry(s, t) / r.getEntry(s, s));
            }
        }
        // % Calculate corresponding B
        // bnewest = eye(dims)-L;
        TetradMatrix bnewest = TetradMatrix.identity(rows);
        bnewest = bnewest.minus(new TetradMatrix(r));
        TetradVector cnewest = new TetradMatrix(r).times(Xpm);
        bpieces.add(bnewest);
        diststdpieces.add(newestdisturbancestd);
        cpieces.add(cnewest);
    }
    // 
    // for i=1:dims,
    // for j=1:dims,
    // 
    // themean = mean(Bpieces(i,j,:));
    // thestd = std(Bpieces(i,j,:));
    // if abs(themean)<prunefactor*thestd,
    // Bfinal(i,j) = 0;
    // else
    // Bfinal(i,j) = themean;
    // end
    // 
    // end
    // end
    TetradMatrix means = new TetradMatrix(rows, rows);
    TetradMatrix stds = new TetradMatrix(rows, rows);
    TetradMatrix BFinal = new TetradMatrix(rows, rows);
    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < rows; j++) {
            double sum = 0.0;
            for (int y = 0; y < npieces; y++) {
                sum += bpieces.get(y).get(i, j);
            }
            double themean = sum / (npieces);
            double sumVar = 0.0;
            for (int y = 0; y < npieces; y++) {
                sumVar += Math.pow((bpieces.get(y).get(i, j)) - themean, 2);
            }
            double thestd = Math.sqrt(sumVar / (npieces));
            means.set(i, j, themean);
            stds.set(i, j, thestd);
            if (Math.abs(themean) < threshold * thestd) {
                // getPruneFactor() * thestd) {
                BFinal.set(i, j, 0);
            } else {
                BFinal.set(i, j, themean);
            }
        }
    }
    return BFinal;
}
Also used : TetradVector(edu.cmu.tetrad.util.TetradVector) QRDecomposition(org.apache.commons.math3.linear.QRDecomposition) RealMatrix(org.apache.commons.math3.linear.RealMatrix) ArrayList(java.util.ArrayList) TetradMatrix(edu.cmu.tetrad.util.TetradMatrix)

Example 23 with Min

use of org.apache.commons.math3.stat.descriptive.rank.Min in project MPW by shineangelic.

the class ChartUtils method drawHashrateHistory.

static void drawHashrateHistory(TextView titleTextView, LinkedMap<Date, HomeStatsChartData> storia, LineView chart, GranularityEnum grane) {
    SummaryStatistics stats = new SummaryStatistics();
    ArrayList<Float> dataList = new ArrayList<>();
    ArrayList<Float> dataListMax = new ArrayList<>();
    ArrayList<Float> dataListMin = new ArrayList<>();
    ArrayList<String> labelsArr = new ArrayList<>();
    List<Date> dates = storia.asList();
    // HomeStats campione = storia.values().iterator().next();
    for (Date date2 : dates) {
        labelsArr.add(getLabelFormat(grane, date2));
        dataList.add(Utils.condenseHashRate(storia.get(date2).getHashrate()));
        dataListMax.add(Utils.condenseHashRate(storia.get(date2).getHashrateMax()));
        dataListMin.add(Utils.condenseHashRate(storia.get(date2).getHashrateMin()));
        stats.addValue(storia.get(date2).getHashrate());
        stats.addValue(storia.get(date2).getHashrateMax());
        stats.addValue(storia.get(date2).getHashrateMin());
    }
    String curHashRateTxt = "--";
    try {
        curHashRateTxt = Utils.formatHashrate(storia.get(dates.get(dataList.size() - 1)).getHashrate());
    } catch (Exception re) {
        Log.w(TAG, "history too short?", re);
    }
    titleTextView.setText("Hashrate History chart " + "(avg: " + Utils.formatHashrate((long) stats.getMean()) + ", max: " + Utils.formatHashrate((long) stats.getMax()) + ", min: " + Utils.formatHashrate((long) stats.getMin()) + ", now: " + curHashRateTxt + ", std dev: " + Utils.formatHashrate((long) stats.getStandardDeviation()) + ")");
    ArrayList<ArrayList<Float>> dataLists = new ArrayList<>();
    List<Integer> colArr = new ArrayList<>();
    dataLists.add(dataListMax);
    colArr.add(ResourcesCompat.getColor(titleTextView.getResources(), R.color.colorPrimaryAlpha, null));
    dataLists.add(dataListMin);
    colArr.add(ResourcesCompat.getColor(titleTextView.getResources(), R.color.colorAccentAlpha, null));
    dataLists.add(dataList);
    chart.setShowPopup(LineView.SHOW_POPUPS_MAXMIN_ONLY);
    // optional
    chart.setDrawDotLine(false);
    chart.setBottomTextList(labelsArr);
    colArr.add(Color.DKGRAY);
    /*colorArray = new int[]{ ResourcesCompat.getColor(titleTextView.getResources(), enableMax?R.color.colorPrimaryAlpha:android.R.color.transparent,null),
                ResourcesCompat.getColor(titleTextView.getResources(), enableMin?R.color.colorAccentAlpha:android.R.color.transparent,null),
                Color.DKGRAY,};*/
    int[] ret = new int[colArr.size()];
    int i = 0;
    for (Integer e : colArr) ret[i++] = e.intValue();
    chart.setColorArray(ret);
    Assert.assertTrue(dataLists.size() == colArr.size());
    // or lineView.setFloatDataList(floatDataLists)
    chart.setFloatDataList(dataLists);
    chart.requestLayout();
    chart.invalidate();
}
Also used : ArrayList(java.util.ArrayList) SummaryStatistics(org.apache.commons.math3.stat.descriptive.SummaryStatistics) Date(java.util.Date) BigInteger(java.math.BigInteger)

Example 24 with Min

use of org.apache.commons.math3.stat.descriptive.rank.Min in project MPW by shineangelic.

the class ChartUtils method drawWalletHashRateHistory.

public static void drawWalletHashRateHistory(TextView titleTextView, LineView chart, LinkedMap<Date, Wallet> dateWalletLinkedMap, GranularityEnum grane) {
    SummaryStatistics stats = new SummaryStatistics();
    ArrayList<Float> dataList = new ArrayList<>();
    ArrayList<String> labelsArr = new ArrayList<>();
    List<Date> dates = dateWalletLinkedMap.asList();
    Wallet campione = dateWalletLinkedMap.values().iterator().next();
    for (Date date2 : dates) {
        labelsArr.add(getLabelFormat(grane, date2));
        dataList.add(Utils.condenseHashRate(dateWalletLinkedMap.get(date2).getHashrate()));
        stats.addValue(dateWalletLinkedMap.get(date2).getHashrate());
    }
    titleTextView.setText("Wallet Hashrate History " + "(avg: " + Utils.formatHashrate((long) stats.getMean()) + ", max: " + Utils.formatHashrate((long) stats.getMax()) + ", min: " + Utils.formatHashrate((long) stats.getMin()) + ", now: " + Utils.formatHashrate(dateWalletLinkedMap.get(dates.get(dataList.size() - 1)).getHashrate()) + ", std dev: " + Utils.formatHashrate((long) stats.getStandardDeviation()) + ")");
    ArrayList<ArrayList<Float>> dataLists = new ArrayList<>();
    dataLists.add(dataList);
    chart.setShowPopup(LineView.SHOW_POPUPS_All);
    // optional
    chart.setDrawDotLine(false);
    chart.setBottomTextList(labelsArr);
    chart.setColorArray(new int[] { Color.DKGRAY, Color.CYAN });
    // or lineView.setFloatDataList(floatDataLists)
    chart.setFloatDataList(dataLists);
}
Also used : Wallet(it.angelic.mpw.model.jsonpojos.wallet.Wallet) ArrayList(java.util.ArrayList) SummaryStatistics(org.apache.commons.math3.stat.descriptive.SummaryStatistics) Date(java.util.Date)

Example 25 with Min

use of org.apache.commons.math3.stat.descriptive.rank.Min in project chordatlas by twak.

the class Prof method findProfileLines.

/**
 * We find an initial base offset. Then we cluster the start point of all
 * (clean) profiles. If any are a good distance from the initial base, we
 * add those as their own profile lines.
 *
 * The original line is offset by the remaiing data.
 */
public static List<SuperLine> findProfileLines(Collection<Prof> profiles, Line3d line) {
    List<SuperLine> out = new ArrayList();
    // PaintThing.debug.clear();
    SuperLine superLine = new SuperLine(line.start.x, line.start.z, line.end.x, line.end.z);
    double outLen = superLine.length();
    double min = Double.MAX_VALUE, max = -Double.MAX_VALUE;
    Cache<Prof, Double> vLength = new Cache<Prof, Double>() {

        @Override
        public Double create(Prof i) {
            return i.verticalLength(0.5);
        }
    };
    double vLen = profiles.stream().mapToDouble(p -> vLength.get(p)).sum();
    boolean useVertical = vLen / profiles.size() > 1;
    class Wrapper implements Clusterable {

        double[] pt;

        public Wrapper(Point2d pt) {
            this.pt = new double[] { pt.x, pt.y };
        }

        @Override
        public double[] getPoint() {
            return pt;
        }
    }
    List<Wrapper> toCluster = new ArrayList();
    List<Double> baseLineOffset = new ArrayList();
    for (Prof p : profiles) {
        if (// vLen / (5*profiles.size()))
        useVertical && vLength.get(p) < 1)
            continue;
        Prof clean = p.parameterize();
        Point2d pt = clean.get(0);
        Point3d pt3 = clean.to3d(pt);
        double ppram = superLine.findPPram(new Point2d(pt3.x, pt3.z));
        baseLineOffset.add(pt.x);
        toCluster.add(new Wrapper(new Point2d(pt.x, ppram * outLen)));
        min = Math.min(min, ppram);
        max = Math.max(max, ppram);
    }
    if (min == max || toCluster.isEmpty())
        return out;
    if (true) {
        baseLineOffset.sort(Double::compareTo);
        double modeBaselineOffset = baseLineOffset.get(baseLineOffset.size() / 2);
        DBSCANClusterer<Wrapper> cr = new DBSCANClusterer<>(1.5, 0);
        List<Cluster<Wrapper>> results = cr.cluster(toCluster);
        Iterator<Cluster<Wrapper>> cit = results.iterator();
        while (cit.hasNext()) {
            Cluster<Wrapper> cw = cit.next();
            if (cw.getPoints().size() < 2 / TweedSettings.settings.profileHSampleDist) {
                cit.remove();
                double cMeanY = cw.getPoints().stream().mapToDouble(x -> x.pt[1]).average().getAsDouble();
                double bestDist = Double.MAX_VALUE;
                Cluster<Wrapper> bestWrapper = null;
                for (Cluster<Wrapper> near : results) {
                    double meanY = near.getPoints().stream().mapToDouble(x -> x.pt[1]).average().getAsDouble();
                    double dist = Math.abs(meanY - cMeanY);
                    if (dist < bestDist) {
                        bestDist = dist;
                        bestWrapper = near;
                    }
                }
                if (bestWrapper != null)
                    bestWrapper.getPoints().addAll(cw.getPoints());
            }
        }
        {
            baseLineOffset.clear();
            int c = 0;
            for (Cluster<Wrapper> cw : results) {
                double[] minMax = cw.getPoints().stream().map(p -> new double[] { p.pt[1] }).collect(new InAxDoubleArray());
                double[] offsetA = cw.getPoints().stream().mapToDouble(p -> p.pt[0]).sorted().toArray();
                double offset = offsetA[offsetA.length / 2];
                if (offset - modeBaselineOffset < 1) {
                    for (Wrapper w : cw.getPoints()) baseLineOffset.add(w.pt[0]);
                    continue;
                }
                SuperLine sl = new SuperLine(superLine.fromPPram(minMax[0] / outLen), superLine.fromPPram(minMax[1] / outLen));
                sl.moveLeft(offset);
                out.add(sl);
                List<Point2d> pts = cw.getPoints().stream().map(w -> new Point2d(w.pt[0], w.pt[1])).collect(Collectors.toList());
                PaintThing.debug(Rainbow.getColour(c++), 1, pts);
            }
        }
    }
    Point2d nStart = superLine.fromPPram(min), nEnd = superLine.fromPPram(max);
    superLine.start = nStart;
    superLine.end = nEnd;
    baseLineOffset.sort(Double::compare);
    if (!baseLineOffset.isEmpty())
        superLine.moveLeft(baseLineOffset.get(baseLineOffset.size() / 2));
    out.add(0, superLine);
    return out;
}
Also used : ConsecutivePairs(org.twak.utils.collections.ConsecutivePairs) Matrix4d(javax.vecmath.Matrix4d) ConsecutiveItPairs(org.twak.utils.collections.ConsecutiveItPairs) SliceParameters(org.twak.viewTrace.SliceParameters) Arrayz(org.twak.utils.collections.Arrayz) Node(com.jme3.scene.Node) ObjRead(org.twak.utils.geom.ObjRead) Map(java.util.Map) Cache(org.twak.utils.Cache) Material(com.jme3.material.Material) Point3d(javax.vecmath.Point3d) VertexBuffer(com.jme3.scene.VertexBuffer) IdentityHashMap(java.util.IdentityHashMap) Collection(java.util.Collection) Line(org.twak.utils.Line) FindLines(org.twak.viewTrace.FindLines) Set(java.util.Set) Vector2d(javax.vecmath.Vector2d) LinearForm(org.twak.utils.geom.LinearForm) Collectors(java.util.stream.Collectors) List(java.util.List) Rainbow(org.twak.utils.ui.Rainbow) Line3d(org.twak.utils.geom.Line3d) Mesh(com.jme3.scene.Mesh) Geometry(com.jme3.scene.Geometry) DBSCANClusterer(org.apache.commons.math3.ml.clustering.DBSCANClusterer) LinearForm3D(org.twak.utils.geom.LinearForm3D) Bin(org.twak.viewTrace.Bin) Pair(org.twak.utils.Pair) Vector3d(javax.vecmath.Vector3d) Clusterable(org.apache.commons.math3.ml.clustering.Clusterable) Tweed(org.twak.tweed.Tweed) ArrayList(java.util.ArrayList) TweedSettings(org.twak.tweed.TweedSettings) HashSet(java.util.HashSet) PanMouseAdaptor(org.twak.utils.PanMouseAdaptor) Graphics2D(java.awt.Graphics2D) ICanPaintU(org.twak.utils.PaintThing.ICanPaintU) Mathz(org.twak.utils.Mathz) PaintThing(org.twak.utils.PaintThing) Iterator(java.util.Iterator) Point2d(javax.vecmath.Point2d) SuperLine(org.twak.viewTrace.SuperLine) Cluster(org.apache.commons.math3.ml.clustering.Cluster) ColorRGBA(com.jme3.math.ColorRGBA) Comparator(java.util.Comparator) InAxDoubleArray(org.twak.utils.streams.InAxDoubleArray) Collections(java.util.Collections) ObjSlice(org.twak.viewTrace.ObjSlice) ArrayList(java.util.ArrayList) Cluster(org.apache.commons.math3.ml.clustering.Cluster) Clusterable(org.apache.commons.math3.ml.clustering.Clusterable) InAxDoubleArray(org.twak.utils.streams.InAxDoubleArray) Point2d(javax.vecmath.Point2d) Point3d(javax.vecmath.Point3d) SuperLine(org.twak.viewTrace.SuperLine) List(java.util.List) ArrayList(java.util.ArrayList) DBSCANClusterer(org.apache.commons.math3.ml.clustering.DBSCANClusterer) Cache(org.twak.utils.Cache)

Aggregations

ArrayList (java.util.ArrayList)16 List (java.util.List)10 DescriptiveStatistics (org.apache.commons.math3.stat.descriptive.DescriptiveStatistics)8 SummaryStatistics (org.apache.commons.math3.stat.descriptive.SummaryStatistics)7 Map (java.util.Map)6 UnivariateFunction (org.apache.commons.math3.analysis.UnivariateFunction)6 MaxEval (org.apache.commons.math3.optim.MaxEval)6 Collectors (java.util.stream.Collectors)5 ExpressionException (cbit.vcell.parser.ExpressionException)4 Plot2 (ij.gui.Plot2)4 TooManyEvaluationsException (org.apache.commons.math3.exception.TooManyEvaluationsException)4 InitialGuess (org.apache.commons.math3.optim.InitialGuess)4 PointValuePair (org.apache.commons.math3.optim.PointValuePair)4 RandomDataGenerator (org.apache.commons.math3.random.RandomDataGenerator)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 StoredDataStatistics (gdsc.core.utils.StoredDataStatistics)3 HashMap (java.util.HashMap)3 SimpsonIntegrator (org.apache.commons.math3.analysis.integration.SimpsonIntegrator)3 BrentOptimizer (org.apache.commons.math3.optim.univariate.BrentOptimizer)3 SearchInterval (org.apache.commons.math3.optim.univariate.SearchInterval)3