public final class RandomTensor extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomTensor.Parameters |
static class |
RandomTensor.TensorType |
| Modifier and Type | Field and Description |
|---|---|
protected static int[] |
ALPHABETS_SIZES |
protected org.apache.commons.math3.random.RandomGenerator |
random |
protected long |
seed |
protected static byte[] |
TYPES |
protected static byte |
TYPES_COUNT |
| Constructor and Description |
|---|
RandomTensor()
Creates random with default values.
|
RandomTensor(boolean generateNewDescriptors) |
RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors) |
RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors,
long seed) |
RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors,
org.apache.commons.math3.random.RandomGenerator random) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToNamespace(Tensor... tensors) |
void |
clearNamespace() |
int |
getInitialNamespaceSize() |
int |
getNamespaceSize() |
org.apache.commons.math3.random.RandomGenerator |
getRandom() |
long |
getSeed() |
int[] |
nextIndices(StructureOfIndices structureOfIndices) |
int |
nextInt(int n) |
NameDescriptor |
nextNameDescriptor() |
int[] |
nextPermutation(int dimension) |
Tensor |
nextProduct(int minProductSize) |
Tensor |
nextProduct(int minProductSize,
Indices indices) |
Tensor |
nextProductTree(int depth,
int productSize,
int sumSize,
Indices indices) |
Tensor |
nextProductTree(int depth,
RandomTensor.Parameters parameters,
Indices indices) |
SimpleTensor |
nextSimpleTensor() |
SimpleTensor |
nextSimpleTensor(SimpleIndices indices) |
Tensor |
nextSum(int sumSize,
int productSize,
Indices indices) |
Tensor |
nextSum(RandomTensor.Parameters parameters,
Indices indices) |
Tensor |
nextSumTree(int depth,
int productSize,
int sumSize,
Indices indices) |
Tensor |
nextSumTree(int depth,
RandomTensor.Parameters parameters,
Indices indices) |
Tensor |
nextTensorTree(int depth,
int productSize,
int sumSize,
Indices indices) |
Tensor |
nextTensorTree(int depth,
RandomTensor.Parameters parameters,
Indices indices) |
Tensor |
nextTensorTree(RandomTensor.TensorType head,
int depth,
int productSize,
int sumSize,
Indices indices) |
protected Tensor |
nextTensorTree(RandomTensor.TensorType head,
int depth,
RandomTensor.Parameters parameters) |
Tensor |
nextTensorTree(RandomTensor.TensorType head,
int depth,
RandomTensor.Parameters parameters,
Indices indices) |
void |
reset() |
void |
reset(long seed) |
void |
shuffle(int[] target) |
protected final org.apache.commons.math3.random.RandomGenerator random
protected long seed
protected static final byte TYPES_COUNT
protected static final byte[] TYPES
protected static final int[] ALPHABETS_SIZES
public RandomTensor()
new RandomTensor(2, 5, new int[]{0, 0, 0, 0}, new int[]{4, 0,
0, 0}, true)public RandomTensor(boolean generateNewDescriptors)
public RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors,
org.apache.commons.math3.random.RandomGenerator random)
minDiffNDs - min number of different tensorsmaxDiffNDs - max number of different tensorsminIndices - min number of indices in each tensor.maxIndices - max number of indices in each tensor.withSymmetries - add symmetries to tensorsgenerateNewDescriptors - if false then only specified tensors will be usedrandom - random generatorpublic RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors,
long seed)
minDiffNDs - minimum number of different tensorsmaxDiffNDs - maximum number of different tensorsminIndices - minimum number of indices in each tensor.maxIndices - maximum number of indices in each tensor.withSymmetries - add symmetries to tensorsgenerateNewDescriptors - if false then only specified tensors will be usedseed - random seedpublic RandomTensor(int minDiffNDs,
int maxDiffNDs,
int[] minIndices,
int[] maxIndices,
boolean withSymmetries,
boolean generateNewDescriptors)
minDiffNDs - minimum number of different tensorsmaxDiffNDs - maximum number of different tensorsminIndices - minimum number of indices in each tensor.maxIndices - maximum number of indices in each tensor.withSymmetries - add symmetries to tensorsgenerateNewDescriptors - if false then only specified tensors will be usedpublic org.apache.commons.math3.random.RandomGenerator getRandom()
public void clearNamespace()
public void reset()
public void reset(long seed)
public final int nextInt(int n)
public long getSeed()
public void addToNamespace(Tensor... tensors)
public int getInitialNamespaceSize()
public int getNamespaceSize()
public NameDescriptor nextNameDescriptor()
public SimpleTensor nextSimpleTensor(SimpleIndices indices)
public SimpleTensor nextSimpleTensor()
public Tensor nextProduct(int minProductSize)
public Tensor nextSum(RandomTensor.Parameters parameters, Indices indices)
public Tensor nextTensorTree(int depth, RandomTensor.Parameters parameters, Indices indices)
public Tensor nextTensorTree(RandomTensor.TensorType head, int depth, RandomTensor.Parameters parameters, Indices indices)
protected Tensor nextTensorTree(RandomTensor.TensorType head, int depth, RandomTensor.Parameters parameters)
public Tensor nextProductTree(int depth, RandomTensor.Parameters parameters, Indices indices)
public Tensor nextSumTree(int depth, RandomTensor.Parameters parameters, Indices indices)
public int[] nextIndices(StructureOfIndices structureOfIndices)
public int[] nextPermutation(int dimension)
public final void shuffle(int[] target)
public Tensor nextTensorTree(int depth, int productSize, int sumSize, Indices indices)
public Tensor nextTensorTree(RandomTensor.TensorType head, int depth, int productSize, int sumSize, Indices indices)
Copyright © 2014. All Rights Reserved.