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

            if (ParamSize != 0)
            {
                hash ^= ParamSize.GetHashCode();
            }
            if (quadraticMatrix_ != null)
            {
                hash ^= QuadraticMatrix.GetHashCode();
            }
            hash ^= bias_.GetHashCode();
            if (equalityMatrix_ != null)
            {
                hash ^= EqualityMatrix.GetHashCode();
            }
            hash ^= equalityValue_.GetHashCode();
            if (inequalityMatrix_ != null)
            {
                hash ^= InequalityMatrix.GetHashCode();
            }
            hash ^= inequalityValue_.GetHashCode();
            hash ^= inputMarker_.GetHashCode();
            hash ^= optimalParam_.GetHashCode();
            return(hash);
        }
Beispiel #2
0
 public void MergeFrom(QuadraticProgrammingProblem other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ParamSize != 0)
     {
         ParamSize = other.ParamSize;
     }
     if (other.quadraticMatrix_ != null)
     {
         if (quadraticMatrix_ == null)
         {
             quadraticMatrix_ = new global::Apollo.Planning.QPMatrix();
         }
         QuadraticMatrix.MergeFrom(other.QuadraticMatrix);
     }
     bias_.Add(other.bias_);
     if (other.equalityMatrix_ != null)
     {
         if (equalityMatrix_ == null)
         {
             equalityMatrix_ = new global::Apollo.Planning.QPMatrix();
         }
         EqualityMatrix.MergeFrom(other.EqualityMatrix);
     }
     equalityValue_.Add(other.equalityValue_);
     if (other.inequalityMatrix_ != null)
     {
         if (inequalityMatrix_ == null)
         {
             inequalityMatrix_ = new global::Apollo.Planning.QPMatrix();
         }
         InequalityMatrix.MergeFrom(other.InequalityMatrix);
     }
     inequalityValue_.Add(other.inequalityValue_);
     inputMarker_.Add(other.inputMarker_);
     optimalParam_.Add(other.optimalParam_);
 }