public synchronized void add ( double x ) { final double oldA = a ; a += ( x - a ) / ++ size ; q += ( x - a ) * ( x - oldA ) ; min = Math . min ( min , x ) ; max = Math . max ( max , x ) ; }
Adds a value to the stream .