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); } }
public Weight(Edu.Stanford.Nlp.Parser.Shiftreduce.Weight other) { if (other.Size() == 0) { packed = null; return; } packed = ArrayUtils.Copy(other.packed); Condense(); }