public static class BestCandidateSampling.Cube extends Object
| Constructor and Description |
|---|
Cube()
Create a new instance of
BestCandidateSampling.Cube to configure and generate 'best candidate' sample positions
on the unit cube with each sample tried numCandidates number of times, and call the
given callback for each sample generate. |
| Modifier and Type | Method and Description |
|---|---|
BestCandidateSampling.Cube |
generate(Callback3d callback)
Generate 'best candidate' sample positions and call the given
callback for each generated sample. |
BestCandidateSampling.Cube |
generate(float[] xyzs)
Generate 'best candidate' sample positions and store the coordinates of all generated samples into the given
xyzs float array. |
BestCandidateSampling.Cube |
generate(FloatBuffer xyzs)
Generate 'best candidate' sample positions and store the coordinates of all generated samples into the given
xyzs FloatBuffer. |
BestCandidateSampling.Cube |
numCandidates(int numCandidates)
Set the number of candidates to try for each generated sample.
|
BestCandidateSampling.Cube |
numSamples(int numSamples)
Set the number of samples to generate.
|
BestCandidateSampling.Cube |
seed(long seed)
Set the seed to initialize the pseudo-random number generator with.
|
public Cube()
BestCandidateSampling.Cube to configure and generate 'best candidate' sample positions
on the unit cube with each sample tried numCandidates number of times, and call the
given callback for each sample generate.public BestCandidateSampling.Cube seed(long seed)
seed - the seed valuepublic BestCandidateSampling.Cube numSamples(int numSamples)
numSamples - the number of samplespublic BestCandidateSampling.Cube numCandidates(int numCandidates)
numCandidates - the number of candidates to trypublic BestCandidateSampling.Cube generate(float[] xyzs)
xyzs float array.
This method performs heap allocations, so should be used sparingly.
xyzs - will hold the x, y and z coordinates of all samples in the order XYZXYZXYZ....
This array must have a length of at least numSamplespublic BestCandidateSampling.Cube generate(FloatBuffer xyzs)
xyzs FloatBuffer.
The samples will be written starting at the current position of the FloatBuffer. The position of the FloatBuffer will not be modified.
This method performs heap allocations, so should be used sparingly.
xyzs - will hold the x, y and z coordinates of all samples in the order XYZXYZXYZ....
This FloatBuffer must have at least numSamples remaining elements.
The position of the buffer will not be modified by this methodpublic BestCandidateSampling.Cube generate(Callback3d callback)
callback for each generated sample.
This method performs heap allocations, so should be used sparingly.
callback - will be called with the coordinates of each generated sample positionCopyright © 2015–2019 JOML. All rights reserved.