question: @ Override public void addValue ( double data , double weight ) { if ( weight == 0 ) { return ; } data = round ( data ) ; int insertIndex = findNearestValue ( data ) ; if ( ( m_NumValues <= insertIndex ) || ( m_Values [ insertIndex ] != data ) ) { if ( m_NumValues < m_Values . length ) { int left = m_NumValues - insertIndex ; System . arraycopy ( m_Values , insertIndex , m_Values , insertIndex + 1 , left ) ; System . arraycopy ( m_Weights , insertIndex , m_Weights , insertIndex + 1 , left ) ; m_Values [ insertIndex ] = data ; m_Weights [ insertIndex ] = weight ; m_NumValues ++ ; } else { double [ ] newValues = new double [ m_Values . length * 2 ] ; double [ ] newWeights = new double [ m_Values . length * 2 ] ; int left = m_NumValues - insertIndex ; System . arraycopy ( m_Values , 0 , newValues , 0 , insertIndex ) ; System . arraycopy ( m_Weights , 0 , newWeights , 0 , insertIndex ) ; newValues [ insertIndex ] = data ; newWeights [ insertIndex ] = weight ; System . arraycopy ( m_Values , insertIndex , newValues , insertIndex + 1 , left ) ; System . arraycopy ( m_Weights , insertIndex , newWeights , insertIndex + 1 , left ) ; m_NumValues ++ ; m_Values = newValues ; m_Weights = newWeights ; } if ( weight != 1 ) { m_AllWeightsOne = false ; } } else { m_Weights [ insertIndex ] += weight ; m_AllWeightsOne = false ; } m_SumOfWeights += weight ; double range = m_Values [ m_NumValues - 1 ] - m_Values [ 0 ] ; if ( range > 0 ) { m_StandardDev = Math . max ( range / Math . sqrt ( m_SumOfWeights ) , m_Precision / ( 2 * 3 ) ) ; } }
target:  Add a new data value to the current estimator.