src/particlefactory/ChRandomShapeCreator.h
void Setup()
		{
			if (family_probability.size() ==0) 
				return;
			// normalize if integral of atomic probabilities not unitary
			double scale = 1.0/sum;
			for (unsigned int i= 0; i< family_probability.size(); ++i)
			{
				family_probability[i] *= scale;
				cumulative_probability[i]*= scale;
			}
		}
/// Call this when you finished adding samples via AddSample()
Call this when you finished adding samples via AddSample()
Call this when you finished adding samples via AddSample ()
void Setup()
		{
			if (family_probability.size() ==0) 
				return;
			double scale = 1.0/sum;
			for (unsigned int i= 0; i< family_probability.size(); ++i)
			{
				family_probability[i] *= scale;
				cumulative_probability[i]*= scale;
			}
		}
void Setup ( ) { if ( family_probability . size ( ) == 0 ) return ; double scale = 1.0 / sum ; for ( unsigned int i = 0 ; i < family_probability . size ( ) ; ++ i ) { family_probability [ i ] *= scale ; cumulative_probability [ i ] *= scale ; } }
Call this when you finished adding samples via AddSample()
Call this when you finished adding samples via AddSample ()
// normalize if integral of atomic probabilities not unitary