예제 #1
0
        public override int GetHashCode()
        {
            var hash = 1;

            if (signatureInfo_ != null)
            {
                hash ^= SignatureInfo.GetHashCode();
            }
            if (HasBatchNum)
            {
                hash ^= BatchNum.GetHashCode();
            }
            if (HasBatchSize)
            {
                hash ^= BatchSize.GetHashCode();
            }
            if (HasSignature)
            {
                hash ^= Signature.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (algorithmCase_ == AlgorithmOneofCase.SelectedAlgorithm)
            {
                hash ^= SelectedAlgorithm.GetHashCode();
            }
            if (AlphaReal != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AlphaReal);
            }
            if (AlphaImag != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AlphaImag);
            }
            if (Beta != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Beta);
            }
            if (dotDimensionNumbers_ != null)
            {
                hash ^= DotDimensionNumbers.GetHashCode();
            }
            if (BatchSize != 0L)
            {
                hash ^= BatchSize.GetHashCode();
            }
            hash ^= (int)algorithmCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
        /// <summary>
        /// Returns the hashcode for this <see cref="InsertAllRequest"/>.
        /// </summary>
        /// <returns>The hashcode value.</returns>
        public override int GetHashCode()
        {
            // Make sure to return if it is already provided
            if (m_hashCode != null)
            {
                return(m_hashCode.Value);
            }

            // Get first the entity hash code
            var hashCode = string.Concat(Name, ".InsertAll").GetHashCode();

            // Get the qualifier <see cref="Field"/> objects
            if (Fields != null)
            {
                foreach (var field in Fields)
                {
                    hashCode += field.GetHashCode();
                }
            }

            // Get the batch size
            if (BatchSize > 0)
            {
                hashCode += BatchSize.GetHashCode();
            }

            // Add the hints
            if (!string.IsNullOrEmpty(Hints))
            {
                hashCode += Hints.GetHashCode();
            }

            // Set and return the hashcode
            return((m_hashCode = hashCode).Value);
        }
예제 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ResultLocation.GetHashCode();
         hashCode = (hashCode * 397) ^ Dimension.GetHashCode();
         hashCode = (hashCode * 397) ^ Layout.Item1.GetHashCode();
         hashCode = (hashCode * 397) ^ Layout.Item2.GetHashCode();
         hashCode = (hashCode * 397) ^ BatchSize.GetHashCode();
         hashCode = (hashCode * 397) ^ PlanDistanceIn.GetHashCode();
         hashCode = (hashCode * 397) ^ PlanDistanceOut.GetHashCode();
         hashCode = (hashCode * 397) ^ Size[0].GetHashCode();
         hashCode = (hashCode * 397) ^ ScaleForward.GetHashCode();
         hashCode = (hashCode * 397) ^ ScaleBackward.GetHashCode();
         if (Size.GetLength(0) > 1)
         {
             hashCode = (hashCode * 397) ^ Size[1].GetHashCode();
         }
         if (Size.GetLength(0) > 2)
         {
             hashCode = (hashCode * 397) ^ Size[2].GetHashCode();
         }
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasStartTimestamp)
            {
                hash ^= StartTimestamp.GetHashCode();
            }
            if (HasEndTimestamp)
            {
                hash ^= EndTimestamp.GetHashCode();
            }
            if (HasRegion)
            {
                hash ^= Region.GetHashCode();
            }
            if (HasBatchNum)
            {
                hash ^= BatchNum.GetHashCode();
            }
            if (HasBatchSize)
            {
                hash ^= BatchSize.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #6
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.startRow)
                {
                    hashcode = (hashcode * 397) + StartRow.GetHashCode();
                }
                if (__isset.stopRow)
                {
                    hashcode = (hashcode * 397) + StopRow.GetHashCode();
                }
                if (__isset.timestamp)
                {
                    hashcode = (hashcode * 397) + Timestamp.GetHashCode();
                }
                if (__isset.columns)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Columns);
                }
                if (__isset.caching)
                {
                    hashcode = (hashcode * 397) + Caching.GetHashCode();
                }
                if (__isset.filterString)
                {
                    hashcode = (hashcode * 397) + FilterString.GetHashCode();
                }
                if (__isset.batchSize)
                {
                    hashcode = (hashcode * 397) + BatchSize.GetHashCode();
                }
                if (__isset.sortColumns)
                {
                    hashcode = (hashcode * 397) + SortColumns.GetHashCode();
                }
                if (__isset.reversed)
                {
                    hashcode = (hashcode * 397) + Reversed.GetHashCode();
                }
                if (__isset.cacheBlocks)
                {
                    hashcode = (hashcode * 397) + CacheBlocks.GetHashCode();
                }
            }
            return(hashcode);
        }
예제 #7
0
파일: File.cs 프로젝트: shuetam/Proto
        public override int GetHashCode()
        {
            int hash = 1;

            if (Engine.Length != 0)
            {
                hash ^= Engine.GetHashCode();
            }
            if (Normalization.Length != 0)
            {
                hash ^= Normalization.GetHashCode();
            }
            if (NInput != 0)
            {
                hash ^= NInput.GetHashCode();
            }
            if (NOutput != 0)
            {
                hash ^= NOutput.GetHashCode();
            }
            if (LearningRate != 0D)
            {
                hash ^= LearningRate.GetHashCode();
            }
            if (BatchSize != 0)
            {
                hash ^= BatchSize.GetHashCode();
            }
            if (EpochSize != 0)
            {
                hash ^= EpochSize.GetHashCode();
            }
            if (Optimizer.Length != 0)
            {
                hash ^= Optimizer.GetHashCode();
            }
            if (LossFunc.Length != 0)
            {
                hash ^= LossFunc.GetHashCode();
            }
            hash ^= maxV_.GetHashCode();
            hash ^= minV_.GetHashCode();
            hash ^= meanV_.GetHashCode();
            hash ^= stdV_.GetHashCode();
            hash ^= layers_.GetHashCode();
            return(hash);
        }
예제 #8
0
        /// <summary>
        /// Returns the hashcode for this <see cref="MergeAllRequest"/>.
        /// </summary>
        /// <returns>The hashcode value.</returns>
        public override int GetHashCode()
        {
            // Make sure to return if it is already provided
            if (this.hashCode != null)
            {
                return(this.hashCode.Value);
            }

            // Get first the entity hash code
            var hashCode = string.Concat(Name, ".MergeAll").GetHashCode();

            // Get the qualifier <see cref="Field"/> objects
            if (Fields != null)
            {
                foreach (var field in Fields)
                {
                    hashCode += field.GetHashCode();
                }
            }

            // Get the qualifier <see cref="Field"/> objects
            if (Qualifiers != null) // Much faster than Qualifiers?.<Methods|Properties>
            {
                foreach (var field in Qualifiers)
                {
                    hashCode += field.GetHashCode();
                }
            }

            // Get the batch size
            if (BatchSize > 0)
            {
                hashCode += BatchSize.GetHashCode();
            }

            // Add the hints
            if (!string.IsNullOrWhiteSpace(Hints))
            {
                hashCode += Hints.GetHashCode();
            }

            // Set and return the hashcode
            return((this.hashCode = hashCode).Value);
        }
예제 #9
0
        /// <summary>
        /// Returns the hashcode for this <see cref="UpdateAllRequest"/>.
        /// </summary>
        /// <returns>The hashcode value.</returns>
        public override int GetHashCode()
        {
            // Make sure to return if it is already provided
            if (this.hashCode != null)
            {
                return(this.hashCode.Value);
            }

            // Get first the entity hash code
            var hashCode = HashCode.Combine(Name, ".UpdateAll");

            // Get the fields
            if (Fields != null)
            {
                foreach (var field in Fields)
                {
                    hashCode += field.GetHashCode();
                }
            }

            // Get the qualifier <see cref="Field"/> objects
            if (Fields != null)
            {
                foreach (var field in Qualifiers)
                {
                    hashCode += field.GetHashCode();
                }
            }

            // Get the batch size
            if (BatchSize > 0)
            {
                hashCode += BatchSize.GetHashCode();
            }

            // Add the hints
            if (!string.IsNullOrWhiteSpace(Hints))
            {
                hashCode += Hints.GetHashCode();
            }

            // Set and return the hashcode
            return((this.hashCode = hashCode).Value);
        }
예제 #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (InputMappings != null ? InputMappings.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Database != null ? Database.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TableName != null ? TableName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Result != null ? Result.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CheckConstraints.GetHashCode();
         hashCode = (hashCode * 397) ^ FireTriggers.GetHashCode();
         hashCode = (hashCode * 397) ^ UseInternalTransaction.GetHashCode();
         hashCode = (hashCode * 397) ^ KeepIdentity.GetHashCode();
         hashCode = (hashCode * 397) ^ KeepTableLock.GetHashCode();
         hashCode = (hashCode * 397) ^ (Timeout != null ? Timeout.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BatchSize != null ? BatchSize.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IgnoreBlankRows.GetHashCode();
         return(hashCode);
     }
 }
예제 #11
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Enabled != false)
            {
                hash ^= Enabled.GetHashCode();
            }
            if (SessionSamplingFraction != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SessionSamplingFraction);
            }
            if (MaxBufferSizeKb != 0)
            {
                hash ^= MaxBufferSizeKb.GetHashCode();
            }
            if (BatchSize != 0)
            {
                hash ^= BatchSize.GetHashCode();
            }
            if (UpdateIntervalMs != 0L)
            {
                hash ^= UpdateIntervalMs.GetHashCode();
            }
            if (FrameRateSampleIntervalMs != 0L)
            {
                hash ^= FrameRateSampleIntervalMs.GetHashCode();
            }
            if (FrameRateSamplePeriodMs != 0L)
            {
                hash ^= FrameRateSamplePeriodMs.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BatchSize != 0)
            {
                hash ^= BatchSize.GetHashCode();
            }
            if (NumVisualizations != 0)
            {
                hash ^= NumVisualizations.GetHashCode();
            }
            if (NumExamples != 0)
            {
                hash ^= NumExamples.GetHashCode();
            }
            if (EvalIntervalSecs != 0)
            {
                hash ^= EvalIntervalSecs.GetHashCode();
            }
            if (MaxEvals != 0)
            {
                hash ^= MaxEvals.GetHashCode();
            }
            if (SaveGraph != false)
            {
                hash ^= SaveGraph.GetHashCode();
            }
            if (VisualizationExportDir.Length != 0)
            {
                hash ^= VisualizationExportDir.GetHashCode();
            }
            if (EvalMaster.Length != 0)
            {
                hash ^= EvalMaster.GetHashCode();
            }
            hash ^= metricsSet_.GetHashCode();
            if (ExportPath.Length != 0)
            {
                hash ^= ExportPath.GetHashCode();
            }
            if (IgnoreGroundtruth != false)
            {
                hash ^= IgnoreGroundtruth.GetHashCode();
            }
            if (UseMovingAverages != false)
            {
                hash ^= UseMovingAverages.GetHashCode();
            }
            if (EvalInstanceMasks != false)
            {
                hash ^= EvalInstanceMasks.GetHashCode();
            }
            if (MinScoreThreshold != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinScoreThreshold);
            }
            if (MaxNumBoxesToVisualize != 0)
            {
                hash ^= MaxNumBoxesToVisualize.GetHashCode();
            }
            if (SkipScores != false)
            {
                hash ^= SkipScores.GetHashCode();
            }
            if (SkipLabels != false)
            {
                hash ^= SkipLabels.GetHashCode();
            }
            if (VisualizeGroundtruthBoxes != false)
            {
                hash ^= VisualizeGroundtruthBoxes.GetHashCode();
            }
            if (GroundtruthBoxVisualizationColor.Length != 0)
            {
                hash ^= GroundtruthBoxVisualizationColor.GetHashCode();
            }
            if (KeepImageIdForVisualizationExport != false)
            {
                hash ^= KeepImageIdForVisualizationExport.GetHashCode();
            }
            if (RetainOriginalImages != false)
            {
                hash ^= RetainOriginalImages.GetHashCode();
            }
            if (IncludeMetricsPerCategory != false)
            {
                hash ^= IncludeMetricsPerCategory.GetHashCode();
            }
            if (RecallLowerBound != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RecallLowerBound);
            }
            if (RecallUpperBound != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RecallUpperBound);
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (MessageProperties != null)
         {
             hashCode = hashCode * 59 + MessageProperties.GetHashCode();
         }
         if (MessageBoxSizeLimit != null)
         {
             hashCode = hashCode * 59 + MessageBoxSizeLimit.GetHashCode();
         }
         if (MessageCountLimit != null)
         {
             hashCode = hashCode * 59 + MessageCountLimit.GetHashCode();
         }
         if (NotifyFailure != null)
         {
             hashCode = hashCode * 59 + NotifyFailure.GetHashCode();
         }
         if (FailureMessageFrom != null)
         {
             hashCode = hashCode * 59 + FailureMessageFrom.GetHashCode();
         }
         if (FailureTemplatePath != null)
         {
             hashCode = hashCode * 59 + FailureTemplatePath.GetHashCode();
         }
         if (MaxRetries != null)
         {
             hashCode = hashCode * 59 + MaxRetries.GetHashCode();
         }
         if (MinWaitBetweenRetries != null)
         {
             hashCode = hashCode * 59 + MinWaitBetweenRetries.GetHashCode();
         }
         if (CountUpdatePoolSize != null)
         {
             hashCode = hashCode * 59 + CountUpdatePoolSize.GetHashCode();
         }
         if (InboxPath != null)
         {
             hashCode = hashCode * 59 + InboxPath.GetHashCode();
         }
         if (SentitemsPath != null)
         {
             hashCode = hashCode * 59 + SentitemsPath.GetHashCode();
         }
         if (SupportAttachments != null)
         {
             hashCode = hashCode * 59 + SupportAttachments.GetHashCode();
         }
         if (SupportGroupMessaging != null)
         {
             hashCode = hashCode * 59 + SupportGroupMessaging.GetHashCode();
         }
         if (MaxTotalRecipients != null)
         {
             hashCode = hashCode * 59 + MaxTotalRecipients.GetHashCode();
         }
         if (BatchSize != null)
         {
             hashCode = hashCode * 59 + BatchSize.GetHashCode();
         }
         if (MaxTotalAttachmentSize != null)
         {
             hashCode = hashCode * 59 + MaxTotalAttachmentSize.GetHashCode();
         }
         if (AttachmentTypeBlacklist != null)
         {
             hashCode = hashCode * 59 + AttachmentTypeBlacklist.GetHashCode();
         }
         if (AllowedAttachmentTypes != null)
         {
             hashCode = hashCode * 59 + AllowedAttachmentTypes.GetHashCode();
         }
         if (ServiceSelector != null)
         {
             hashCode = hashCode * 59 + ServiceSelector.GetHashCode();
         }
         if (FieldWhitelist != null)
         {
             hashCode = hashCode * 59 + FieldWhitelist.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #14
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BatchSize != 0)
            {
                hash ^= BatchSize.GetHashCode();
            }
            hash ^= dataAugmentationOptions_.GetHashCode();
            if (SyncReplicas != false)
            {
                hash ^= SyncReplicas.GetHashCode();
            }
            if (KeepCheckpointEveryNHours != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(KeepCheckpointEveryNHours);
            }
            if (optimizer_ != null)
            {
                hash ^= Optimizer.GetHashCode();
            }
            if (GradientClippingByNorm != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(GradientClippingByNorm);
            }
            if (FineTuneCheckpoint.Length != 0)
            {
                hash ^= FineTuneCheckpoint.GetHashCode();
            }
            if (FineTuneCheckpointType.Length != 0)
            {
                hash ^= FineTuneCheckpointType.GetHashCode();
            }
            if (FromDetectionCheckpoint != false)
            {
                hash ^= FromDetectionCheckpoint.GetHashCode();
            }
            if (LoadAllDetectionCheckpointVars != false)
            {
                hash ^= LoadAllDetectionCheckpointVars.GetHashCode();
            }
            if (NumSteps != 0)
            {
                hash ^= NumSteps.GetHashCode();
            }
            if (StartupDelaySteps != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(StartupDelaySteps);
            }
            if (BiasGradMultiplier != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BiasGradMultiplier);
            }
            hash ^= updateTrainableVariables_.GetHashCode();
            hash ^= freezeVariables_.GetHashCode();
            if (ReplicasToAggregate != 0)
            {
                hash ^= ReplicasToAggregate.GetHashCode();
            }
            if (BatchQueueCapacity != 0)
            {
                hash ^= BatchQueueCapacity.GetHashCode();
            }
            if (NumBatchQueueThreads != 0)
            {
                hash ^= NumBatchQueueThreads.GetHashCode();
            }
            if (PrefetchQueueCapacity != 0)
            {
                hash ^= PrefetchQueueCapacity.GetHashCode();
            }
            if (MergeMultipleLabelBoxes != false)
            {
                hash ^= MergeMultipleLabelBoxes.GetHashCode();
            }
            if (UseMulticlassScores != false)
            {
                hash ^= UseMulticlassScores.GetHashCode();
            }
            if (AddRegularizationLoss != false)
            {
                hash ^= AddRegularizationLoss.GetHashCode();
            }
            if (MaxNumberOfBoxes != 0)
            {
                hash ^= MaxNumberOfBoxes.GetHashCode();
            }
            if (UnpadGroundtruthTensors != false)
            {
                hash ^= UnpadGroundtruthTensors.GetHashCode();
            }
            if (RetainOriginalImages != false)
            {
                hash ^= RetainOriginalImages.GetHashCode();
            }
            if (UseBfloat16 != false)
            {
                hash ^= UseBfloat16.GetHashCode();
            }
            if (SummarizeGradients != false)
            {
                hash ^= SummarizeGradients.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }