14 this.wrappedDispatcher = wrappedDispatcher;
18 new System.InvalidOperationException(
19 "WrapperArtificialReadback must be given a dispatcher, which does not use stop condition."
26 new System.InvalidOperationException(
27 "WrapperArtificialReadback must be given a dispatcher, which does not use readback."
35 this.wrappedDispatcher.Dispose();
42 public virtual string name => $
"{this.wrappedDispatcher.name} + readback";
46 this.wrappedDispatcher.clusteringRTsAndBuffers;
51 this.wrappedDispatcher.UpdateClusterCenters(
52 clusteringTextures: clusteringTextures,
59 this.wrappedDispatcher.AttributeClustersKM(clusteringTextures: clusteringTextures);
66 return this.wrappedDispatcher.GetVariance();
71 for (
int i = 0; i < this.wrappedDispatcher.numIterations; i++)
73 this.wrappedDispatcher.SingleIteration(clusteringTextures);
76 this.wrappedDispatcher.clusteringRTsAndBuffers.GetClusterCenters().Dispose();
abstract bool doesReadback
override bool usesStopCondition
Call Allocate before using and Dispose after using.
Runs the clustering function from the wrapped dispatcher and performs one (useless) readback after ev...
WrapperArtificialReadback(ASimpleDispatcer wrappedDispatcher)
virtual void RunClustering(ClusteringTextures clusteringTextures)
bool doRandomizeEmptyClusters
DispatcherParameters abstractParameters
void AttributeClustersKM(ClusteringTextures clusteringTextures)
float? GetVariance()
Computes variance for the current cluster centers. Depending on this.useFullResTexRef uses either wor...
ClusteringRTsAndBuffers clusteringRTsAndBuffers
void UpdateClusterCenters(ClusteringTextures clusteringTextures, bool rejectOld)
Call Dispose after using.
Call Dispose after using.