protected override int FreezeImpl() { int code = base.FreezeImpl(); _fs.Freeze(); code = code * 31 + _fs.GetFrozenHashCode(); return(code); }
public override int GetHashCode() { int code = 23; code = code * 31 + _enqueueCount.GetHashCode(); if (_fs != null) { code = code * 31 + _fs.GetFrozenHashCode(); } return(_negatedFSs.Aggregate(code, (c, nfs) => c ^ nfs.GetFrozenHashCode())); }
protected override int FreezeImpl() { int code = 23; _shape.Freeze(); code = code * 31 + _shape.GetFrozenHashCode(); _realizationalFS.Freeze(); code = code * 31 + _realizationalFS.GetFrozenHashCode(); foreach (Word nonHead in _nonHeads) { nonHead.Freeze(); code = code * 31 + nonHead.GetFrozenHashCode(); } code = code * 31 + _stratum.GetHashCode(); code = code * 31 + (_rootAllomorph == null ? 0 : _rootAllomorph.GetHashCode()); code = code * 31 + _mrules.GetSequenceHashCode(); code = code * 31 + _isLastAppliedRuleFinal.GetHashCode(); return(code); }
public void Freeze() { if (IsFrozen) { return; } IsFrozen = true; _fs.Freeze(); if (_children != null) { _children.Freeze(); } _hashCode = 23; _hashCode = _hashCode * 31 + _fs.GetFrozenHashCode(); _hashCode = _hashCode * 31 + (_children == null ? 0 : _children.GetFrozenHashCode()); _hashCode = _hashCode * 31 + _optional.GetHashCode(); _hashCode = _hashCode * 31 + Range.GetHashCode(); }
public override int GetHashCode() { return(FeatureStruct.GetFrozenHashCode()); }