|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.data.container.DataContainerUtils
adams.data.instance.InstanceUtils
public class InstanceUtils
Utility class for instances.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class adams.data.container.DataContainerUtils |
|---|
DataContainerUtils.GapFilling |
| Field Summary | |
|---|---|
protected static InstancePointComparator |
m_Comparator
comparator for finding X values. |
| Constructor Summary | |
|---|---|
InstanceUtils()
|
|
| Method Summary | |
|---|---|
static int |
findClosestX(List<InstancePoint> points,
int x)
Returns the index in m_Points closest to the given x value. |
static int[] |
findEnclosingXs(List<InstancePoint> points,
int x)
Returns the indices of points in m_Points that enclose the given x value. |
static int |
findX(List<InstancePoint> points,
InstancePoint p)
Returns the index in m_Points of the given sequence point. |
static int |
findX(List<InstancePoint> points,
int x)
Returns the index in m_Points of the given x value. |
static InstancePointComparator |
getComparator()
Returns the comparator used for finding X values. |
static double[] |
toDoubleArray(Instance c)
Returns the points as double array. |
static double[] |
toDoubleArray(List<InstancePoint> data)
Returns the points as double array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static InstancePointComparator m_Comparator
| Constructor Detail |
|---|
public InstanceUtils()
| Method Detail |
|---|
public static InstancePointComparator getComparator()
public static int findX(List<InstancePoint> points,
InstancePoint p)
points - the data to processp - the point to get the index for
public static int findX(List<InstancePoint> points,
int x)
points - the data to processx - the x value to get the index for
public static int findClosestX(List<InstancePoint> points,
int x)
points - the data to processx - the x value to get the closest index for
public static int[] findEnclosingXs(List<InstancePoint> points,
int x)
points - the data to processx - the x value to get the enclosing indices for
public static double[] toDoubleArray(Instance c)
c - the instance to turn into a double array
public static double[] toDoubleArray(List<InstancePoint> data)
data - the instance points to turn into a double array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||