public class Lng extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Lng.ReduceBy
Public interface for a very fast reduce by.
|
| Constructor and Description |
|---|
Lng() |
| Modifier and Type | Method and Description |
|---|---|
static long[] |
add(long[] array,
long v) |
static long[] |
add(long[] array,
long[] array2) |
static long[] |
array(long... array) |
static long[] |
arrayOfLong(int size)
Creates an array of bytes
|
static long |
atIndex(long[] array,
int index) |
static void |
atIndex(long[] array,
int index,
long value) |
static long[] |
compact(long[] array) |
static long[] |
copy(long[] array) |
static long[] |
endSliceOf(long[] array,
int endIndex) |
static boolean |
equals(int start,
int end,
long[] expected,
long[] got)
Checks to see if two arrays are equals
|
static boolean |
equals(long[] expected,
long[] got)
Checks to see if two arrays are equals
|
static boolean |
equals(long expected,
long got)
Some quick validation for an expected value
|
static boolean |
equalsOrDie(long[] expected,
long[] got)
Checks to see if two arrays are equals
|
static boolean |
equalsOrDie(long expected,
long got)
Some quick validation for an expected value
|
static long[] |
grow(long[] array) |
static long[] |
grow(long[] array,
int size) |
static int |
hashCode(int start,
int end,
long[] array) |
static int |
hashCode(long[] array) |
static long |
idx(long[] array,
int index) |
static void |
idx(long[] array,
int index,
long value) |
static boolean |
in(long value,
long[] array) |
static long[] |
insert(long[] array,
int idx,
long v) |
static long[] |
insert(long[] array,
int fromIndex,
long[] values) |
static int |
len(long[] array) |
static int |
lengthOf(long[] array) |
static long |
max(long[] values)
max
|
static long |
max(long[] values,
int length)
max
|
static long |
max(long[] values,
int start,
int length)
Max
|
static long |
mean(long[] values)
Average
|
static long |
mean(long[] values,
int length)
Average
|
static long |
mean(long[] values,
int start,
int length)
Average
|
static double |
meanDouble(long[] values,
int start,
int length)
Used internally to avoid loss and rounding errors a bit.
|
static long |
median(long[] values)
Calculate Median
|
static long |
median(long[] values,
int length)
Calculate Median
|
static long |
median(long[] values,
int start,
int length)
Calculate Median
|
static long |
min(long[] values)
Min
|
static long |
min(long[] values,
int length)
Min
|
static long |
min(long[] values,
int start,
int length)
Min
|
static long |
reduceBy(long[] array,
int start,
int length,
Lng.ReduceBy reduceBy) |
static long |
reduceBy(long[] array,
int start,
int length,
Object object)
Reduce By
|
static long |
reduceBy(long[] array,
int length,
Lng.ReduceBy reduceBy) |
static long |
reduceBy(long[] array,
int length,
Object object)
Reduce By
|
static long |
reduceBy(long[] array,
int length,
Object function,
String functionName)
Reduce By
|
static long |
reduceBy(long[] array,
Lng.ReduceBy reduceBy)
A very fast reduce by.
|
static <T> long |
reduceBy(long[] array,
T object)
Reduce by functional support for int arrays.
|
static <T> long |
reduceBy(long[] array,
T object,
String methodName)
Reduce by functional support for int arrays.
|
static long[] |
shrink(long[] array,
int size) |
static long[] |
slc(long[] array,
int startIndex) |
static long[] |
slc(long[] array,
int startIndex,
int endIndex) |
static long[] |
slcEnd(long[] array,
int endIndex) |
static long[] |
sliceOf(long[] array,
int startIndex) |
static long[] |
sliceOf(long[] array,
int startIndex,
int endIndex) |
static int |
standardDeviation(long[] values)
Calculate Standard Deviation
|
static long |
standardDeviation(long[] values,
int length)
Calculate standard deviation.
|
static long |
standardDeviation(long[] values,
int start,
int length)
Calculate standard deviation.
|
static String |
str(long value) |
static long |
sum(long[] values)
Sum
|
static long |
sum(long[] values,
int length)
Sum
|
static long |
sum(long[] values,
int start,
int length)
Big Sum
|
static long |
variance(long[] values)
Calculate variance
|
static long |
variance(long[] values,
int length)
Calculate variance
|
static long |
variance(long[] values,
int start,
int length)
Calculates variance
|
static double |
varianceDouble(long[] values,
int start,
int length)
Internal to avoid rounding errors
|
public static String str(long value)
public static long[] grow(long[] array,
int size)
public static long[] grow(long[] array)
public static long[] shrink(long[] array,
int size)
public static long[] compact(long[] array)
public static long[] arrayOfLong(int size)
size - size of the array you want to makepublic static long[] array(long... array)
array - public static int len(long[] array)
public static int lengthOf(long[] array)
public static long idx(long[] array,
int index)
public static long atIndex(long[] array,
int index)
public static void idx(long[] array,
int index,
long value)
public static void atIndex(long[] array,
int index,
long value)
public static long[] slc(long[] array,
int startIndex,
int endIndex)
public static long[] sliceOf(long[] array,
int startIndex,
int endIndex)
public static long[] slc(long[] array,
int startIndex)
public static long[] sliceOf(long[] array,
int startIndex)
public static long[] slcEnd(long[] array,
int endIndex)
public static long[] endSliceOf(long[] array,
int endIndex)
public static boolean in(long value,
long[] array)
public static long[] copy(long[] array)
public static long[] add(long[] array,
long v)
public static long[] add(long[] array,
long[] array2)
public static long[] insert(long[] array,
int idx,
long v)
public static long[] insert(long[] array,
int fromIndex,
long[] values)
public static long reduceBy(long[] array,
Lng.ReduceBy reduceBy)
array - array of items to reduce byreduceBy - reduceBy interfacepublic static long reduceBy(long[] array,
int start,
int length,
Lng.ReduceBy reduceBy)
array - array of items to reduce bystart - where to start in the arraylength - where to end in the arrayreduceBy - the function to do the reduce bypublic static long reduceBy(long[] array,
int length,
Lng.ReduceBy reduceBy)
array - array of items to reduce bylength - where to end in the arrayreduceBy - the function to do the reduce bypublic static <T> long reduceBy(long[] array,
T object)
T - the type of objectarray - array of items to reduce byobject - object that contains the reduce by functionpublic static <T> long reduceBy(long[] array,
T object,
String methodName)
T - the type of objectarray - array of items to reduce byobject - object that contains the reduce by functionpublic static long reduceBy(long[] array,
int length,
Object object)
array - array of items to reduce bylength - where to end in the arrayobject - functionpublic static long reduceBy(long[] array,
int length,
Object function,
String functionName)
array - array of items to reduce bylength - where to end in the arrayfunction - functionfunction - functionNamepublic static long reduceBy(long[] array,
int start,
int length,
Object object)
array - array of items to reduce bylength - where to end in the arrayobject - functionpublic static boolean equalsOrDie(long expected,
long got)
expected - expected thisgot - got thispublic static boolean equals(long expected,
long got)
expected - expected thisgot - got thispublic static long sum(long[] values)
values - values in intpublic static long sum(long[] values,
int length)
values - values in intpublic static long sum(long[] values,
int start,
int length)
values - values in intpublic static long max(long[] values,
int start,
int length)
values - values in intpublic static long max(long[] values)
values - values in intpublic static long max(long[] values,
int length)
values - values in intpublic static long min(long[] values,
int start,
int length)
values - values in intpublic static long min(long[] values)
values - values in intpublic static long min(long[] values,
int length)
values - values in intpublic static long mean(long[] values,
int start,
int length)
values - values in intpublic static long mean(long[] values,
int length)
values - values in intpublic static long mean(long[] values)
values - values in intpublic static long variance(long[] values,
int start,
int length)
values - valuesstart - startlength - lengthpublic static double meanDouble(long[] values,
int start,
int length)
values - valuesstart - startlength - lengthpublic static double varianceDouble(long[] values,
int start,
int length)
values - valuesstart - startlength - lengthpublic static long variance(long[] values,
int length)
values - length - public static long variance(long[] values)
values - public static long standardDeviation(long[] values,
int start,
int length)
values - valuesstart - startlength - lengthpublic static long standardDeviation(long[] values,
int length)
values - valueslength - lengthpublic static int standardDeviation(long[] values)
values - valuespublic static long median(long[] values,
int start,
int length)
values - valuesstart - startlength - lengthpublic static long median(long[] values,
int length)
values - valueslength - lengthpublic static long median(long[] values)
values - valuespublic static boolean equalsOrDie(long[] expected,
long[] got)
expected - expected arraygot - got arraypublic static boolean equals(long[] expected,
long[] got)
expected - expected arraygot - got arraypublic static boolean equals(int start,
int end,
long[] expected,
long[] got)
expected - expected arraygot - got arraypublic static int hashCode(long[] array)
public static int hashCode(int start,
int end,
long[] array)
Copyright © 2015. All Rights Reserved.