Class GPUSobelGradientsPhero
java.lang.Object
turtlekit.pheromone.DataGrid<Float>
turtlekit.pheromone.AbstractPheromoneGrid<Float>
turtlekit.cuda.CudaPheromone
turtlekit.cuda.GPUSobelGradientsPhero
- All Implemented Interfaces:
CudaObject
,Pheromone<Float>
-
Field Summary
Fields inherited from class turtlekit.cuda.CudaPheromone
diffusionToTmpKernel, diffusionUpdateKernel, diffusionUpdateThenEvaporationKernel, evaporationKernel, kernelConfiguration, tmpDeviceDataGridPtr
Fields inherited from class turtlekit.pheromone.AbstractPheromoneGrid
neighborsIndexes
-
Constructor Summary
ConstructorsConstructorDescriptionGPUSobelGradientsPhero
(String name, TKEnvironment<?> env, float evapCoeff, float diffCoeff) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the diffusion update and evaporation processes at once.void
int
getMaxDirection
(int i, int j) Returns the direction with the maximum valueint
getMinDirection
(int i, int j) Returns the direction with the minimum valueMethods inherited from class turtlekit.cuda.CudaPheromone
diffuseValuesToTmpGridKernel, evaporationKernel, get, getKernelConfiguration, getMaxDirectionNoRandom, getMaxDirectionRandomWhenEquals, getMinDirectionNoRandom, getMinDirectionRandomWhenEquals, getValues, incValue, incValue, initKernels, set, toString, updateMaxValue, updateValuesFromTmpGridKernel
Methods inherited from class turtlekit.pheromone.AbstractPheromoneGrid
getColorModel, getDiffusionCoefficient, getEvaporationCoefficient, getLogMaxValue, getMaxEncounteredValue, getNeighborsIndexes, normeValue, prng, setColorModel, setDiffusionCoefficient, setEvaporationCoefficient, setLogMaxValue, setMaxEncounteredValue
Methods inherited from class turtlekit.pheromone.DataGrid
get, get1DIndex, getHeight, getName, getWidth, set
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface turtlekit.cuda.CudaObject
createDefaultKernelConfiguration, createDeviceDataGrid, createKernel, freeCudaMemory, getCudaEngine, getHeight, getHeightPointer, getPointerToFloat, getPointerToFloat, getPointerToInt, getUnifiedBufferBetweenPointer, getWidth, getWidthPointer
Methods inherited from interface turtlekit.pheromone.Pheromone
applyDynamics, diffusion, diffusionAndEvaporation, evaporation, get, get1DIndex, getColorModel, getDiffusionCoefficient, getEvaporationCoefficient, getHeight, getLogMaxValue, getMaxEncounteredValue, getName, getValueColor, getValueIntensity, getWidth, set, setColorModel, setDiffusionCoefficient, setEvaporationCoefficient, setMaxEncounteredValue
-
Constructor Details
-
GPUSobelGradientsPhero
-
-
Method Details
-
diffusionAndEvaporationUpdateKernel
public void diffusionAndEvaporationUpdateKernel()Description copied from interface:Pheromone
Apply the diffusion update and evaporation processes at once. This method is called after thePheromone.diffuseValuesToTmpGridKernel()
method in thePheromone.diffusionAndEvaporation()
method.- Specified by:
diffusionAndEvaporationUpdateKernel
in interfacePheromone<Float>
- Overrides:
diffusionAndEvaporationUpdateKernel
in classCudaPheromone
-
getMaxDirection
public int getMaxDirection(int i, int j) Description copied from interface:Pheromone
Returns the direction with the maximum value- Specified by:
getMaxDirection
in interfacePheromone<Float>
- Overrides:
getMaxDirection
in classCudaPheromone
- Parameters:
i
- x coordinatej
- y coordinate- Returns:
- the direction with the maximum value
-
getMinDirection
public int getMinDirection(int i, int j) Description copied from interface:Pheromone
Returns the direction with the minimum value- Specified by:
getMinDirection
in interfacePheromone<Float>
- Overrides:
getMinDirection
in classCudaPheromone
- Parameters:
i
- x coordinatej
- y coordinate- Returns:
- the direction with the minimum value
-
freeMemory
public void freeMemory()- Specified by:
freeMemory
in interfaceCudaObject
- Overrides:
freeMemory
in classCudaPheromone
-