コード例 #1
0
        /// <summary>
        /// Performs the initial setup of the AttributeSimilarityManager class.  This method
        /// must be called once before the Instance property can be used.
        /// </summary>
        /// <param name="_scope">The scope of the data that will be used by this class</param>
        public static void InitialSetup(string _scope)
        {
            // Validate the parameter
            if (string.IsNullOrEmpty(_scope))
            {
                throw new System.ArgumentNullException("_scope", "An invalid scope was provided");
            }

            lock (syncRoot)
            {
                // Ensure that this can only be called once
                if (instance == null)
                {
                    instance = new AttributeSimilarityManager(_scope);
                    instance.Initialize();
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Create a new instance of the SimilarityClustering class
        /// </summary>
        public SimilarityClustering()
        {
            this.scope        = GraphManager.Instance.DefaultGraphComponentsInstance.Scope;
            clusterHighlights = new ClusterHighlights(scope);

            // Get a reference to the GlobaleAttributeCollection
            globalAttributeCollection = GlobalAttributeCollection.GetInstance(scope);

            // Initialize the AttributeSimilarityManager and obtain a reference to it
            AttributeSimilarityManager.InitialSetup(scope);
            attributeSimilarityManager = AttributeSimilarityManager.Instance;

            // Initialize the background worker
            worker = new BackgroundWorker();
            worker.WorkerReportsProgress      = true;
            worker.WorkerSupportsCancellation = true;
            worker.DoWork             += new DoWorkEventHandler(DoWorkHandler);
            worker.ProgressChanged    += new ProgressChangedEventHandler(ProgressChangedHandler);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(RunWorkerCompletedHandler);
        }
コード例 #3
0
        /// <summary>
        /// Performs the initial setup of the AttributeSimilarityManager class.  This method
        /// must be called once before the Instance property can be used.
        /// </summary>
        /// <param name="_scope">The scope of the data that will be used by this class</param>
        public static void InitialSetup(string _scope)
        {
            // Validate the parameter
            if (string.IsNullOrEmpty(_scope))
                throw new System.ArgumentNullException("_scope", "An invalid scope was provided");

            lock (syncRoot)
            {
                // Ensure that this can only be called once
                if (instance == null)
                {
                    instance = new AttributeSimilarityManager(_scope);
                    instance.Initialize();
                }
            }
        }