예제 #1
0
 public virtual void AddScaled(Edu.Stanford.Nlp.Parser.Shiftreduce.Weight other, float scale)
 {
     for (int i = 0; i < other.Size(); ++i)
     {
         int   index = other.UnpackIndex(i);
         float score = other.UnpackScore(i);
         UpdateWeight(index, score * scale);
     }
 }
예제 #2
0
 public Weight(Edu.Stanford.Nlp.Parser.Shiftreduce.Weight other)
 {
     if (other.Size() == 0)
     {
         packed = null;
         return;
     }
     packed = ArrayUtils.Copy(other.packed);
     Condense();
 }