public class ListMath extends Object
| Modifier and Type | Method and Description |
|---|---|
static ListDouble |
add(ListNumber data,
double offset)
Returns a new list where all elements are added to a constant.
|
static ListDouble |
add(ListNumber data1,
ListNumber data2)
Returns a list where each element is the sum of the elements of the two
lists at the same index.
|
static List<ListNumber> |
dft(ListNumber x,
ListNumber y)
XXX: This is just a prototype
|
static ListDouble |
divide(ListNumber data1,
ListNumber data2)
Returns a list where each element is the division of the elements of the two
lists at the same index.
|
static ListDouble |
inverseRescale(ListNumber data,
double numerator,
double offset)
Performs a linear transformation on inverse value of each number in a list.
|
static ListDouble |
limit(ListDouble data,
int start,
int end)
Returns a sublist of the given data.
|
static ListLong |
limit(ListLong data,
int start,
int end)
Returns a sublist of the given data.
|
static ListNumber |
limit(ListNumber data,
int start,
int end)
Returns a sublist of the given data.
|
static ListDouble |
multiply(ListNumber data1,
ListNumber data2)
Returns a list where each element is the product of the elements of the two
lists at the same index.
|
static ListDouble |
pow(double base,
ListNumber expons)
Raises a value to the power of each value in a list.
|
static ListDouble |
pow(ListNumber data,
double expon)
Raises each value in a list to the same power.
|
static ListDouble |
rescale(ListNumber data,
double factor,
double offset)
Performs a linear transformation on the data.
|
static ListDouble |
subtract(ListNumber data1,
ListNumber data2)
Returns a list where each element is the difference of the elements of the two
lists at the same index.
|
public static ListDouble limit(ListDouble data, int start, int end)
data - a liststart - start point for the sublistend - end point (exclusive) for the sublistpublic static ListNumber limit(ListNumber data, int start, int end)
TODO: this should go as a member method
data - a liststart - start point for the sublistend - end point (exclusive) for the sublistpublic static ListLong limit(ListLong data, int start, int end)
data - a liststart - start point for the sublistend - end point (exclusive) for the sublistpublic static ListDouble rescale(ListNumber data, double factor, double offset)
data - A list of numbersfactor - The multiplicative constantoffset - The additive constantpublic static ListDouble inverseRescale(ListNumber data, double numerator, double offset)
data - The list of numbers to divide the numerator bynumerator - The numerator for each divisionoffset - The additive constantpublic static ListDouble pow(ListNumber data, double expon)
data - The list of numbers to raise to a powerexpon - The power to raise each number in the list topublic static ListDouble pow(double base, ListNumber expons)
base - The value to raise to each powerexpons - The list of exponents to raise the base value topublic static ListDouble add(ListNumber data, double offset)
data - a list of numberoffset - the additive constantpublic static ListDouble add(ListNumber data1, ListNumber data2)
data1 - a list of numbersdata2 - another list of numberspublic static ListDouble subtract(ListNumber data1, ListNumber data2)
data1 - a list of numbersdata2 - another list of numberspublic static ListDouble multiply(ListNumber data1, ListNumber data2)
data1 - a list of numbersdata2 - another list of numberspublic static ListDouble divide(ListNumber data1, ListNumber data2)
data1 - a list of numbersdata2 - another list of numberspublic static List<ListNumber> dft(ListNumber x, ListNumber y)
x - real party - imaginary partCopyright © 2015. All rights reserved.