⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 marketbasedanalysisdatabase.cs

📁 一个经典的apriori算法(c#实现)
💻 CS
📖 第 1 页 / 共 4 页
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.0.3705.209
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by xsd, Version=1.0.3705.209.
// 

	/// <summary>
	/// The VISUAL_BASIC_DATA_MINING_NET namespace contains namespaces and classes used by this assembly.
	/// </summary>
namespace VISUAL_BASIC_DATA_MINING_NET 
{
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
	/// <summary>
	/// 
	/// </summary>
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class Data : DataSet {
        
        private TransactionTableDataTable tableTransactionTable;
        
        private ItemsetTableDataTable tableItemsetTable;
        
        private SubsetTableDataTable tableSubsetTable;
        
        private RulesTableDataTable tableRulesTable;
        
        public Data() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }

		
		/// <summary>
		/// Modified to set the auto increment property of the TransactionID column in the Transaction table to on or off.
		/// </summary>
		public Data(bool autoIncrementTransactionTable) 
		{
			this.InitClass(autoIncrementTransactionTable);
			System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.										CollectionChangeEventHandler(this.SchemaChanged);
			this.Tables.CollectionChanged += schemaChangedHandler;
			this.Relations.CollectionChanged += schemaChangedHandler;
		}

        
        protected Data(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["TransactionTable"] != null)) {
                    this.Tables.Add(new TransactionTableDataTable(ds.Tables["TransactionTable"]));
                }
                if ((ds.Tables["ItemsetTable"] != null)) {
                    this.Tables.Add(new ItemsetTableDataTable(ds.Tables["ItemsetTable"]));
                }
                if ((ds.Tables["SubsetTable"] != null)) {
                    this.Tables.Add(new SubsetTableDataTable(ds.Tables["SubsetTable"]));
                }
                if ((ds.Tables["RulesTable"] != null)) {
                    this.Tables.Add(new RulesTableDataTable(ds.Tables["RulesTable"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public TransactionTableDataTable TransactionTable {
            get {
                return this.tableTransactionTable;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ItemsetTableDataTable ItemsetTable {
            get {
                return this.tableItemsetTable;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SubsetTableDataTable SubsetTable {
            get {
                return this.tableSubsetTable;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public RulesTableDataTable RulesTable {
            get {
                return this.tableRulesTable;
            }
        }
        
        public override DataSet Clone() {
            Data cln = ((Data)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["TransactionTable"] != null)) {
                this.Tables.Add(new TransactionTableDataTable(ds.Tables["TransactionTable"]));
            }
            if ((ds.Tables["ItemsetTable"] != null)) {
                this.Tables.Add(new ItemsetTableDataTable(ds.Tables["ItemsetTable"]));
            }
            if ((ds.Tables["SubsetTable"] != null)) {
                this.Tables.Add(new SubsetTableDataTable(ds.Tables["SubsetTable"]));
            }
            if ((ds.Tables["RulesTable"] != null)) {
                this.Tables.Add(new RulesTableDataTable(ds.Tables["RulesTable"]));
            }
            this.DataSetName = ds.DataSetName;
            this.Prefix = ds.Prefix;
            this.Namespace = ds.Namespace;
            this.Locale = ds.Locale;
            this.CaseSensitive = ds.CaseSensitive;
            this.EnforceConstraints = ds.EnforceConstraints;
            this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
            this.InitVars();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableTransactionTable = ((TransactionTableDataTable)(this.Tables["TransactionTable"]));
            if ((this.tableTransactionTable != null)) {
                this.tableTransactionTable.InitVars();
            }
            this.tableItemsetTable = ((ItemsetTableDataTable)(this.Tables["ItemsetTable"]));
            if ((this.tableItemsetTable != null)) {
                this.tableItemsetTable.InitVars();
            }
            this.tableSubsetTable = ((SubsetTableDataTable)(this.Tables["SubsetTable"]));
            if ((this.tableSubsetTable != null)) {
                this.tableSubsetTable.InitVars();
            }
            this.tableRulesTable = ((RulesTableDataTable)(this.Tables["RulesTable"]));
            if ((this.tableRulesTable != null)) {
                this.tableRulesTable.InitVars();
            }
        }

        
        private void InitClass() {
            this.DataSetName = "Data";
            this.Prefix = "";
            this.Namespace = "";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableTransactionTable = new TransactionTableDataTable();
            this.Tables.Add(this.tableTransactionTable);
            this.tableItemsetTable = new ItemsetTableDataTable();
            this.Tables.Add(this.tableItemsetTable);
            this.tableSubsetTable = new SubsetTableDataTable();
            this.Tables.Add(this.tableSubsetTable);
            this.tableRulesTable = new RulesTableDataTable();
            this.Tables.Add(this.tableRulesTable);
        }

		
		/// <summary>
		/// Modified to set the auto increment property of the TransactionID column in the Transaction table to on or off.
		/// </summary>
		private void InitClass(bool autoIncrementTransactionTable) 
		{
			this.DataSetName = "Data";
			this.Prefix = "";
			this.Namespace = "";
			this.Locale = new System.Globalization.CultureInfo("en-US");
			this.CaseSensitive = false;
			this.EnforceConstraints = true;
			this.tableTransactionTable = new TransactionTableDataTable(autoIncrementTransactionTable);
			this.Tables.Add(this.tableTransactionTable);
			this.tableItemsetTable = new ItemsetTableDataTable();
			this.Tables.Add(this.tableItemsetTable);
			this.tableSubsetTable = new SubsetTableDataTable();
			this.Tables.Add(this.tableSubsetTable);
			this.tableRulesTable = new RulesTableDataTable();
			this.Tables.Add(this.tableRulesTable);
		}
        
        private bool ShouldSerializeTransactionTable() {
            return false;
        }
        
        private bool ShouldSerializeItemsetTable() {
            return false;
        }
        
        private bool ShouldSerializeSubsetTable() {
            return false;
        }
        
        private bool ShouldSerializeRulesTable() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void TransactionTableRowChangeEventHandler(object sender, TransactionTableRowChangeEvent e);
        
        public delegate void ItemsetTableRowChangeEventHandler(object sender, ItemsetTableRowChangeEvent e);
        
        public delegate void SubsetTableRowChangeEventHandler(object sender, SubsetTableRowChangeEvent e);
        
        public delegate void RulesTableRowChangeEventHandler(object sender, RulesTableRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TransactionTableDataTable : DataTable, System.Collections.IEnumerable {
            
            protected DataColumn columnTransactionID;
            
            protected DataColumn columnTransactions;
            
            internal TransactionTableDataTable() : 
                    base("TransactionTable") {
                this.InitClass();
            }

			/// <summary>
			/// Modified to set the auto increment property of the TransactionID column in the Transaction table to on or off.
			/// </summary>
			internal TransactionTableDataTable(bool autoIncrement) : 
				base("TransactionTable")
			{
				this.InitClass(autoIncrement);
			}			
            
            internal TransactionTableDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn TransactionIDColumn {
                get {
                    return this.columnTransactionID;
                }
            }
            
            internal DataColumn TransactionsColumn {
                get {
                    return this.columnTransactions;
                }
            }
            
            public TransactionTableRow this[int index] {
                get {
                    return ((TransactionTableRow)(this.Rows[index]));
                }
            }
            
            public event TransactionTableRowChangeEventHandler TransactionTableRowChanged;
            
            public event TransactionTableRowChangeEventHandler TransactionTableRowChanging;
            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -