Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (Done != false)
            {
                hash ^= Done.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.Error)
            {
                hash ^= Error.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.Response)
            {
                hash ^= Response.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Reward != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reward);
            }
            if (Done != false)
            {
                hash ^= Done.GetHashCode();
            }
            if (MaxStepReached != false)
            {
                hash ^= MaxStepReached.GetHashCode();
            }
            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            hash ^= actionMask_.GetHashCode();
            hash ^= observations_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (hello_ != null)
            {
                hash ^= Hello.GetHashCode();
            }
            if (barrier_ != null)
            {
                hash ^= Barrier.GetHashCode();
            }
            if (failure_ != null)
            {
                hash ^= Failure.GetHashCode();
            }
            if (Done.Length != 0)
            {
                hash ^= Done.GetHashCode();
            }
            if (addr_ != null)
            {
                hash ^= Addr.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
 /// <summary>Serves as the default hash function. </summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = (Observation != null ? Observation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Reward.GetHashCode();
         hashCode = (hashCode * 397) ^ Done.GetHashCode();
         hashCode = (hashCode * 397) ^ (Information != null ? Information.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 5
0
        /// <summary>
        /// Returns a hash code for the current object.
        /// Uses a combination of the public properties to calculate the hash.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var result = Value != null?Value.GetHashCode() : 0;

                result = (result * 397) ^ IsSuccess.GetHashCode();
                result = (result * 397) ^ ResultCode.GetHashCode();
                result = (result * 397) ^ NodeOffline.GetHashCode();
                result = (result * 397) ^ Done.GetHashCode();
                result = (result * 397) ^ Continuation.GetHashCode();
                return(result);
            }
        }
Esempio n. 6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (CreatedBy.Length != 0)
            {
                hash ^= CreatedBy.GetHashCode();
            }
            if (modifiedAt_ != null)
            {
                hash ^= ModifiedAt.GetHashCode();
            }
            if (Done != false)
            {
                hash ^= Done.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.Error)
            {
                hash ^= Error.GetHashCode();
            }
            if (resultCase_ == ResultOneofCase.Response)
            {
                hash ^= Response.GetHashCode();
            }
            hash ^= (int)resultCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 7
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= stackedVectorObservation_.GetHashCode();
            hash ^= visualObservations_.GetHashCode();
            if (TextObservation.Length != 0)
            {
                hash ^= TextObservation.GetHashCode();
            }
            hash ^= storedVectorActions_.GetHashCode();
            if (StoredTextActions.Length != 0)
            {
                hash ^= StoredTextActions.GetHashCode();
            }
            hash ^= memories_.GetHashCode();
            if (Reward != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reward);
            }
            if (Done != false)
            {
                hash ^= Done.GetHashCode();
            }
            if (MaxStepReached != false)
            {
                hash ^= MaxStepReached.GetHashCode();
            }
            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            hash ^= actionMask_.GetHashCode();
            if (customObservation_ != null)
            {
                hash ^= CustomObservation.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }