Gets the learning rate for the current iteration.
@param i The index of the current model parameter.
427049
private double getLearningRate(int i) {
        if (gradSumSquares[i] < 0) {
            throw new RuntimeException("Gradient sum of squares entry is < 0: " + gradSumSquares[i]);
        }
        double learningRate = prm.eta / (prm.constantAddend + Math.sqrt(gradSumSquares[i]));
        assert !Double.isNaN(learningRate);
        if (learningRate == Double.POSITIVE_INFINITY) {
            if (gradSumSquares[i] != 0.0) {
                log.warn("Gradient was non-zero but learningRate hit positive infinity: " + gradSumSquares[i]);
            }
            // Just return zero. The gradient is probably 0.0.
            return 0.0;
        }
        return learningRate;
    }
495176
public AnnotationSegment getSegmentList(int i) {
    if (MMAXAnnotation_Type.featOkTst && ((MMAXAnnotation_Type)jcasType).casFeat_segmentList == null)
      jcasType.jcas.throwFeatMissing("segmentList", "de.julielab.jules.types.mmax.MMAXAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((MMAXAnnotation_Type)jcasType).casFeatCode_segmentList), i);
    return (AnnotationSegment)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((MMAXAnnotation_Type)jcasType).casFeatCode_segmentList), i)));}
11932
public double getProbability(int i) {
    if (TopicDistribution_Type.featOkTst && ((TopicDistribution_Type)jcasType).casFeat_probability == null)
      jcasType.jcas.throwFeatMissing("probability", "ch.epfl.bbp.uima.types.TopicDistribution");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((TopicDistribution_Type)jcasType).casFeatCode_probability), i);
    return jcasType.ll_cas.ll_getDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((TopicDistribution_Type)jcasType).casFeatCode_probability), i);}
85539
public void putInt(int i) {
        _buffer[_offset++] = (byte) (i >>> 24);
        _buffer[_offset++] = (byte) (i >> 16);
        _buffer[_offset++] = (byte) (i >> 8);
        _buffer[_offset++] = (byte) i;
    }
1032625
public E get(int i) {
    if (i < 0 || i >= objects.size())
      throw new ArrayIndexOutOfBoundsException("Index " + i + 
                                               " outside the bounds [0," + 
                                               size() + ")");
    return objects.get(i);
  }
121377
public static double dArrayGet(double[] a, int i) {
        try {
            return a[i];
        } catch (Throwable t) {
            return a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)];
        }
    }
1229140
public final int get(int i) {
        if (fullWidth) {
            return array.get(i);
        }

        return unPack(array.get(getIndex(i)), getSubIndex(i));
    }
217137
final public void print(int i)
  {
    Writer out = this.out;
    if (out == null)
      return;
    
    if (i == 0x80000000) {
      print("-2147483648");
      return;
    }

    try {
      if (i < 0) {
        out.write('-');
        i = -i;
      } else if (i < 9) {
        out.write('0' + i);
        return;
      }

      int length = 0;
      int exp = 10;

      if (i >= 1000000000)
        length = 9;
      else {
        for (; i >= exp; length++)
          exp = 10 * exp;
      }

      int j = 31;
    
      while (i > 0) {
        _tempCharBuffer[--j] = (char) ((i % 10) + '0');
        i /= 10;
      }

      out.write(_tempCharBuffer, j, 31 - j);
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
54250
public void setInitialLearningRate(double initialLearningRate)
    {
        if(Double.isInfinite(initialLearningRate) || Double.isNaN(initialLearningRate) || initialLearningRate <= 0)
            throw new ArithmeticException("Learning rate must be a positive constant, not " + initialLearningRate);
        this.initialLearningRate = initialLearningRate;
    }
1111804
def current_changed(self, i):
        
        m = self.model()
        ri = self.rootModelIndex()
        index = m.index(i, 0, ri)
        self.new_root.emit(index)
643610
public int bitrate(int i){
    if(i>=links)
      return (-1);
    if(!seekable&&i!=0)
      return (bitrate(0));
    if(i<0){
      long bits=0;
      for(int j=0; j<links; j++){
        bits+=(offsets[j+1]-dataoffsets[j])*8;
      }
      return ((int)Math.rint(bits/time_total(-1)));
    }
    else{
      if(seekable){
        // return the actual bitrate
        return ((int)Math.rint((offsets[i+1]-dataoffsets[i])*8/time_total(i)));
      }
      else{
        // return nominal if set
        if(vi[i].bitrate_nominal>0){
          return vi[i].bitrate_nominal;
        }
        else{
          if(vi[i].bitrate_upper>0){
            if(vi[i].bitrate_lower>0){
              return (vi[i].bitrate_upper+vi[i].bitrate_lower)/2;
            }
            else{
              return vi[i].bitrate_upper;
            }
          }
          return (-1);
        }
      }
    }
  }
675703
public Stoichiometry getComponent(int i) {
		return new Stoichiometry(Collections.singletonList(orderedClusters.get(i)),this.strategy,false);
	}
989857
public int prevSetBit(final int i) {
    int x = i >> 6; // signed i / 64
    long w = bitmap.get(x);
    w <<= 64 - i - 1;
    if (w != 0) {
      return i - Long.numberOfLeadingZeros(w);
    }
    for (--x; x >= 0; --x) {
      long X = bitmap.get(x);
      if (X != 0) {
        return x * 64 + 63 - Long.numberOfLeadingZeros(X);
      }
    }
    return -1;
  }
839836
public void println(double i) {
        if (Logging.core_logger() != null)
            Logging.core_logger().log(level, String.valueOf(i));
    }
759384
def get_learning_rate(self, iter):
        '''
        
        '''

        return self.init_lr * (self.gamma ** (iter // self.iter_interval))
561923
public Annotation getValue(int i) {
    if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null)
      jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i);
    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value), i)));}
287298
public Section getSubSection(int i){
		if( sections.size() > i ) return sections.get(i);
		else return null;
	}