cc.redberry.core.tensor.random
Class RandomTensor
- java.lang.Object
-
- cc.redberry.core.tensor.random.RandomTensor
-
public final class RandomTensor extends java.lang.Object- Since:
- 1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classRandomTensor.Parametersstatic classRandomTensor.TensorType
-
Constructor Summary
Constructors 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddToNamespace(Tensor... tensors)voidclearNamespace()intgetInitialNamespaceSize()intgetNamespaceSize()org.apache.commons.math3.random.RandomGeneratorgetRandom()longgetSeed()int[]nextIndices(StructureOfIndices structureOfIndices)intnextInt(int n)NameDescriptornextNameDescriptor()int[]nextPermutation(int dimension)TensornextProduct(int minProductSize)TensornextProduct(int minProductSize, Indices indices)TensornextProductTree(int depth, int productSize, int sumSize, Indices indices)TensornextProductTree(int depth, RandomTensor.Parameters parameters, Indices indices)SimpleTensornextSimpleTensor()SimpleTensornextSimpleTensor(SimpleIndices indices)TensornextSum(int sumSize, int productSize, Indices indices)TensornextSum(RandomTensor.Parameters parameters, Indices indices)TensornextSumTree(int depth, int productSize, int sumSize, Indices indices)TensornextSumTree(int depth, RandomTensor.Parameters parameters, Indices indices)TensornextTensorTree(int depth, int productSize, int sumSize, Indices indices)TensornextTensorTree(int depth, RandomTensor.Parameters parameters, Indices indices)TensornextTensorTree(RandomTensor.TensorType head, int depth, int productSize, int sumSize, Indices indices)TensornextTensorTree(RandomTensor.TensorType head, int depth, RandomTensor.Parameters parameters, Indices indices)voidreset()voidreset(long seed)voidshuffle(int[] target)
-
-
-
Constructor Detail
-
RandomTensor
public RandomTensor()
Creates random with default values. Same asnew RandomTensor(2, 5, new int[]{0, 0, 0, 0}, new int[]{4, 0, 0, 0}, true)
-
RandomTensor
public RandomTensor(boolean generateNewDescriptors)
-
RandomTensor
public RandomTensor(int minDiffNDs, int maxDiffNDs, int[] minIndices, int[] maxIndices, boolean withSymmetries, boolean generateNewDescriptors, org.apache.commons.math3.random.RandomGenerator random)- Parameters:
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 generator
-
RandomTensor
public RandomTensor(int minDiffNDs, int maxDiffNDs, int[] minIndices, int[] maxIndices, boolean withSymmetries, boolean generateNewDescriptors, long seed)- Parameters:
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 seed
-
RandomTensor
public RandomTensor(int minDiffNDs, int maxDiffNDs, int[] minIndices, int[] maxIndices, boolean withSymmetries, boolean generateNewDescriptors)- Parameters:
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 used
-
-
Method Detail
-
getRandom
public org.apache.commons.math3.random.RandomGenerator getRandom()
-
clearNamespace
public void clearNamespace()
-
reset
public void reset()
-
reset
public void reset(long seed)
-
nextInt
public final int nextInt(int n)
-
getSeed
public long getSeed()
-
addToNamespace
public void addToNamespace(Tensor... tensors)
-
getInitialNamespaceSize
public int getInitialNamespaceSize()
-
getNamespaceSize
public int getNamespaceSize()
-
nextNameDescriptor
public NameDescriptor nextNameDescriptor()
-
nextSimpleTensor
public SimpleTensor nextSimpleTensor(SimpleIndices indices)
-
nextSimpleTensor
public SimpleTensor nextSimpleTensor()
-
nextProduct
public Tensor nextProduct(int minProductSize)
-
nextSum
public Tensor nextSum(RandomTensor.Parameters parameters, Indices indices)
-
nextTensorTree
public Tensor nextTensorTree(int depth, RandomTensor.Parameters parameters, Indices indices)
-
nextTensorTree
public Tensor nextTensorTree(RandomTensor.TensorType head, int depth, RandomTensor.Parameters parameters, Indices indices)
-
nextProductTree
public Tensor nextProductTree(int depth, RandomTensor.Parameters parameters, Indices indices)
-
nextSumTree
public Tensor nextSumTree(int depth, RandomTensor.Parameters parameters, Indices indices)
-
nextIndices
public int[] nextIndices(StructureOfIndices structureOfIndices)
-
nextPermutation
public int[] nextPermutation(int dimension)
-
shuffle
public final void shuffle(int[] target)
-
nextTensorTree
public Tensor nextTensorTree(int depth, int productSize, int sumSize, Indices indices)
-
nextTensorTree
public Tensor nextTensorTree(RandomTensor.TensorType head, int depth, int productSize, int sumSize, Indices indices)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG