public final class AvatarUtils extends Object
| Constructor and Description |
|---|
AvatarUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
getChildrenWithSingleNode(int nstates,
int node)
Creates a state where only a single component is initialized (others as -1)
|
static int[] |
getFreeChildren(int nstates)
Creates a state (int array) where components are initialized as -1
|
static byte[] |
getFreeState(int ncomponents)
Creates a state (byte array) where components are initialized as -1
|
static int[] |
getIdentityChildren(int nstates)
Creates an identity node array (e.g.
|
static int[] |
toArray(List<Integer> list)
Converts a list of integers to an array
|
static byte[] |
toByteArray(int[] vector)
Converts an integer array to a byte array
|
static String |
toOpenString(byte[] vector) |
static String |
toString(BigInteger[] vector)
BigInteger array to string
|
static String |
toString(boolean[] vector)
Boolean array to string
|
static String |
toString(byte[] vector)
Byte array to string
|
static String |
toString(double[] vector)
Double array to string
|
static String |
toString(double[][] matrix)
Double matrix to string
|
static String |
toString(int[] vector)
Integer array to string
|
static String |
toString(int[][] matrix)
Integer matrix to string
|
static String |
toString(List<byte[]> list)
List of states to string
|
static String |
toString(long[] vector)
Long array to string
|
static String |
toString(String[] vector)
String array to string
|
public static int[] getFreeChildren(int nstates)
nstates - the number of componentspublic static byte[] getFreeState(int ncomponents)
ncomponents - the number of componentspublic static int[] getIdentityChildren(int nstates)
nstates - the number of componentspublic static int[] getChildrenWithSingleNode(int nstates,
int node)
nstates - number of componentsnode - the component to be initializedpublic static String toString(List<byte[]> list)
list - the list of states (byte arrays)public static String toString(byte[] vector)
vector - the byte arraypublic static String toOpenString(byte[] vector)
public static String toString(int[] vector)
vector - the integer arraypublic static String toString(long[] vector)
vector - the long arraypublic static String toString(BigInteger[] vector)
vector - the BigInteger arraypublic static String toString(double[] vector)
vector - the double arraypublic static String toString(String[] vector)
vector - the String arraypublic static String toString(boolean[] vector)
vector - the Boolean arraypublic static String toString(int[][] matrix)
matrix - the matrix of integerspublic static String toString(double[][] matrix)
matrix - the matrix of doublespublic static int[] toArray(List<Integer> list)
list - the list of integerspublic static byte[] toByteArray(int[] vector)
vector - the integer arrayCopyright © 2012-2017. All Rights Reserved.