Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity)
            {
                hash ^= NegSqDistSimilarity.GetHashCode();
            }
            if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity)
            {
                hash ^= IouSimilarity.GetHashCode();
            }
            if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity)
            {
                hash ^= IoaSimilarity.GetHashCode();
            }
            if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity)
            {
                hash ^= ThresholdedIouSimilarity.GetHashCode();
            }
            hash ^= (int)regionSimilarityCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #2
0
        public void MergeFrom(RegionSimilarityCalculator other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.RegionSimilarityCase)
            {
            case RegionSimilarityOneofCase.NegSqDistSimilarity:
                if (NegSqDistSimilarity == null)
                {
                    NegSqDistSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity();
                }
                NegSqDistSimilarity.MergeFrom(other.NegSqDistSimilarity);
                break;

            case RegionSimilarityOneofCase.IouSimilarity:
                if (IouSimilarity == null)
                {
                    IouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity();
                }
                IouSimilarity.MergeFrom(other.IouSimilarity);
                break;

            case RegionSimilarityOneofCase.IoaSimilarity:
                if (IoaSimilarity == null)
                {
                    IoaSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity();
                }
                IoaSimilarity.MergeFrom(other.IoaSimilarity);
                break;

            case RegionSimilarityOneofCase.ThresholdedIouSimilarity:
                if (ThresholdedIouSimilarity == null)
                {
                    ThresholdedIouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity();
                }
                ThresholdedIouSimilarity.MergeFrom(other.ThresholdedIouSimilarity);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }