mikera.indexz
Class Indexz
- java.lang.Object
-
- mikera.indexz.Indexz
-
public class Indexz extends java.lang.ObjectClass for static index methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static Indexcreate(AIndex source)static Indexcreate(int[] source)static Indexcreate(java.util.List<java.lang.Integer> data)static IndexcreateLength(int length)static IndexcreateProgression(int start, int length, int skip)Create an Index containing an arithmetic progressionstatic IndexcreateRandomChoice(int count, Index source)static IndexcreateRandomChoice(int count, int max)static IndexcreateRandomPermutation(int length)static IndexcreateRandomSelection(int length, int maxValue)Creates a random selection of given length from the numbers 0..maxValue-1 Results are not sorted.static IndexcreateRandomSubset(AIndex index, double probability)Returns a random subset of an Index, including each element with the given probabilitystatic IndexcreateRandomSubset(int length, double probability)static IndexcreateSequence(int length)Creates a Index containing the sequence 0, 1, ...static IndexcreateSequence(int start, int length)Create an Index containing an arithmetic sequence (a, a+1, a+2 .....
-
-
-
Method Detail
-
create
public static Index create(java.util.List<java.lang.Integer> data)
-
create
public static Index create(int[] source)
-
createProgression
public static Index createProgression(int start, int length, int skip)
Create an Index containing an arithmetic progression
-
createSequence
public static Index createSequence(int start, int length)
Create an Index containing an arithmetic sequence (a, a+1, a+2 ..... a+length-1)
-
createSequence
public static Index createSequence(int length)
Creates a Index containing the sequence 0, 1, ... length-1- Parameters:
length-- Returns:
-
createRandomPermutation
public static Index createRandomPermutation(int length)
-
createRandomChoice
public static Index createRandomChoice(int count, int max)
-
createRandomSubset
public static Index createRandomSubset(AIndex index, double probability)
Returns a random subset of an Index, including each element with the given probability- Parameters:
probability-- Returns:
-
createRandomSubset
public static Index createRandomSubset(int length, double probability)
-
createRandomSelection
public static Index createRandomSelection(int length, int maxValue)
Creates a random selection of given length from the numbers 0..maxValue-1 Results are not sorted. May contain duplicates- Parameters:
length-probability-- Returns:
-
createLength
public static Index createLength(int length)
-
-
DMelt 3.0 © DataMelt by jWork.ORG