Example usage for org.apache.commons.math4.geometry.euclidean.oned Interval getBarycenter

List of usage examples for org.apache.commons.math4.geometry.euclidean.oned Interval getBarycenter

Introduction

In this page you can find the example usage for org.apache.commons.math4.geometry.euclidean.oned Interval getBarycenter.

Prototype

public double getBarycenter() 

Source Link

Document

Get the barycenter of the interval.

Usage

From source file:alphamain.IntervalMain.java

public static void main(String[] args) {
    System.out.println("In IntervalMain class - BGN");
    System.out.println();// www  .j a va  2  s  . co m

    System.out.println("=========Constructor");
    Interval interval = new Interval(2.3, 5.7);

    System.out.println("=========getInf()");
    System.out.println("getInf()=" + interval.getInf());

    System.out.println("=========getSup()");
    System.out.println("getSup()=" + interval.getSup());

    System.out.println("=========getSize()");
    System.out.println("getSize()=" + interval.getSize());

    System.out.println("=========getBarycenter()");
    System.out.println("getBarycenter()=" + interval.getBarycenter());

    System.out.println("=========checkPoint() & location");
    Location location = interval.checkPoint(9.0, Double.POSITIVE_INFINITY);
    System.out.println("Location=" + location);

    System.out.println();
    System.out.println("In IntervalMain class - END");
}