Exemplo n.º 1
0
        /// <summary>
        /// Searches for the last NaN within the Layer.
        /// </summary>
        /// <param name="strType">Returns the Layer type for which a NaN was detected (if any).</param>
        /// <returns>If found, the name of the Blob in which a NaN was detected is returned, otherwise <i>null</i> is returned.</returns>
        public string DetectLastNaN(out string strType)
        {
            for (int i = m_rgBlobInfo.Count - 1; i >= 0; i--)
            {
                BlobDebugInformation <T> dbg = m_rgBlobInfo[i];
                string strBlobNan            = dbg.DetectLastNaN(out strType);

                if (strBlobNan != null)
                {
                    return(strBlobNan);
                }
            }

            strType = null;

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares this BlobDebugInformation to another one.
        /// </summary>
        /// <param name="dbg">Specifies the other BlobDebugInformation to compare to.</param>
        /// <returns>If the two BlobDebugInformation's are the same, <i>true</i> is returned, otherwise <i>false</i> is returned.</returns>
        public bool Compare(BlobDebugInformation <T> dbg)
        {
            if (dbg.Name != m_strName)
            {
                return(false);
            }

            if (dbg.Size != m_strSize)
            {
                return(false);
            }

            if (dbg.BlobLocation != m_location)
            {
                return(false);
            }

            if (dbg.BlobType != m_type)
            {
                return(false);
            }

            if (dbg.DataMinValue != m_dfDataMin)
            {
                return(false);
            }

            if (dbg.DataMaxValue != m_dfDataMax)
            {
                return(false);
            }

            if (dbg.DataNanCount != m_dfDataNanCount)
            {
                return(false);
            }

            if (dbg.DataInfCount != m_dfDiffInfCount)
            {
                return(false);
            }

            if (dbg.DiffMinValue != m_dfDiffMin)
            {
                return(false);
            }

            if (dbg.DiffMaxValue != m_dfDiffMax)
            {
                return(false);
            }

            if (dbg.DiffNanCount != m_dfDiffNanCount)
            {
                return(false);
            }

            if (dbg.DiffInfCount != m_dfDiffInfCount)
            {
                return(false);
            }

            return(true);
        }