Пример #1
0
        /// <summary>
        /// Copy another DatasetDesciptor into this one.
        /// </summary>
        /// <param name="ds">Specifies the DatasetDesciptor to copy.</param>
        public void Copy(DatasetDescriptor ds)
        {
            base.Copy(ds);

            m_gymType = ds.m_gymType;

            if (ds.m_srcTest != null)
            {
                m_srcTest = new SourceDescriptor(ds.m_srcTest);
            }
            else
            {
                m_srcTest = null;
            }

            if (ds.m_srcTrain != null)
            {
                m_srcTrain = new SourceDescriptor(ds.m_srcTrain);
            }
            else
            {
                m_srcTrain = null;
            }

            if (ds.m_groupDataset != null)
            {
                m_groupDataset = new GroupDescriptor(ds.m_groupDataset);
            }
            else
            {
                m_groupDataset = null;
            }

            if (ds.m_groupModel != null)
            {
                m_groupModel = new GroupDescriptor(ds.m_groupModel);
            }
            else
            {
                m_groupModel = null;
            }

            m_colParameters = new descriptors.ParameterDescriptorCollection();
            foreach (ParameterDescriptor p in ds.m_colParameters)
            {
                m_colParameters.Add(new ParameterDescriptor(p));
            }

            m_strCreatorName = ds.m_strCreatorName;
            m_strDescription = ds.m_strDescription;
        }
Пример #2
0
        /// <summary>
        /// The DatasetDescriptor constructor.
        /// </summary>
        /// <param name="nID">Specifies the database ID of the item.</param>
        /// <param name="strName">Specifies the name of the item.</param>
        /// <param name="grpModel">Specifies the group of the model.</param>
        /// <param name="grpDs">Specifies the group of the dataset.</param>
        /// <param name="srcTrain">Specifies the data source for training.</param>
        /// <param name="srcTest">Specifies the data source for testing.</param>
        /// <param name="strCreatorName">Specifies the dataset creator name.</param>
        /// <param name="strDescription">Specifies a description of the dataset.</param>
        /// <param name="strOwner">Specifies the identifier of the item's owner.</param>
        /// <param name="gymType">Optionally, specifies the gym type to use if any (default = NONE).</param>
        public DatasetDescriptor(int nID, string strName, GroupDescriptor grpModel, GroupDescriptor grpDs, SourceDescriptor srcTrain, SourceDescriptor srcTest, string strCreatorName, string strDescription, string strOwner = null, GYM_TYPE gymType = GYM_TYPE.NONE)
            : base(nID, strName, strOwner)
        {
            m_gymType = gymType;

            if (grpModel != null)
            {
                m_groupModel = new descriptors.GroupDescriptor(grpModel);
            }
            else
            {
                m_groupModel = new descriptors.GroupDescriptor(0, null, null);
            }

            if (grpDs != null)
            {
                m_groupDataset = new descriptors.GroupDescriptor(grpDs);
            }
            else
            {
                m_groupDataset = new descriptors.GroupDescriptor(0, null, null);
            }

            if (srcTest != null)
            {
                m_srcTest = new SourceDescriptor(srcTest);
            }

            if (srcTrain != null)
            {
                m_srcTrain = new SourceDescriptor(srcTrain);
            }

            m_strDescription = strDescription;
            m_strCreatorName = strCreatorName;
        }