/** * Calculate Cumulative Cauchy distribution function. * * @return the probability that a stochastic variable x is less than X * @author Klaus Meffert * @since 1.1 */ public double nextCauchy() { return 0.5 + Math.atan((m_rn.nextDouble() - m_location) / m_scale) / Math.PI; }
/** * When deserializing, initialize the seed because otherwise we could get duplicate evolution * results when doing distributed computing! * * @param a_inputStream the ObjectInputStream provided for deserialzation * @throws IOException * @throws ClassNotFoundException * @author Klaus Meffert * @since 3.01 */ private void readObject(ObjectInputStream a_inputStream) throws IOException, ClassNotFoundException { // always perform the default de-serialization first a_inputStream.defaultReadObject(); m_rn.setSeed(System.currentTimeMillis()); }