public class Partition extends Object
| Constructor and Description |
|---|
Partition(double[] points)
Creates a partition with fixed weight=0.5.
|
Partition(double[] points,
double weight)
Creates a partition.
|
| Modifier and Type | Method and Description |
|---|---|
double |
d(double x)
If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.
|
double |
getIntervalLength(int intervalIndex) |
int |
getIntervalNumber(double x)
Returns for a given x the number of the interval where x is included.
|
double |
getIntervalReferencePoint(int intervalIndex) |
int |
getLength() |
int |
getNumberOfIntervals() |
double |
getPoint(int pointIndex) |
double[] |
getPoints() |
double[] |
getReferencePoints() |
double |
getWeight() |
public Partition(double[] points,
double weight)
points - The points of the partition. It should be kept in mind that no point should be included twice.
There is no need to take care of the order of the points.weight - The weight if the partition as double. It is needed to compute the reference points.public Partition(double[] points)
points - The points of the partition. It should be kept in mind that no point should be included twice.
There is no need to take care of the order of the points.public int getIntervalNumber(double x)
x - The point of interest.public double d(double x)
x - The point of interest.public double[] getReferencePoints()
public double getIntervalReferencePoint(int intervalIndex)
public double[] getPoints()
public double getPoint(int pointIndex)
public int getLength()
public int getNumberOfIntervals()
public double getIntervalLength(int intervalIndex)
public double getWeight()
Copyright © 2019. All rights reserved.