public Structuring BuildStructuring() { if (ConsensusFunction == null || ConsensusFunction.Set == null || ConsensusFunction.Structurings == null) { throw new NullReferenceException(); } Structuring result = ConsensusFunction.BuildStructuring(); Structuring = result; return(result); }
private void RunFinish(Structuring aStructuring, ConsensusFunction aConsensusFunction) { try { ConsensusFunction _EnsembleAlg = aConsensusFunction; Structuring _structuring = aStructuring; if (_structuring != null) { TimeSpan ts = _EnsembleAlg.Time; string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); PartitionInfo _partInfo = new PartitionInfo() { AlgorithmName = this.tb_SelectEnsembleAlg.Text, ConsensusFunction = _EnsembleAlg, Partition = _structuring, AlgorithmType = AlgorithmType.Ensemble, Time = elapsedTime, ElementCount = aConsensusFunction.ReductionElementCount, SearchSpace = ReductionFunction.BellNumber(aConsensusFunction.ReductionElementCount), Index = -1 }; this.uctrl_ListClusterAlgVisualizerEnsemble.AddPartitionInfo(_partInfo); this.tb_output.Text = _EnsembleAlg.Output; if (NewStructuringEventHandler != null) { NewStructuringEventHandler(this, new NewStructuringEventArgs(_partInfo)); } } } catch (Exception _ex) { GeneralTools.Tools.WriteToLog(_ex); } }
private Structuring RunMethod(ConsensusFunction aConsensusFunction) { try { aConsensusFunction.IContainerProgressBar = IContainerProgressBar; //return aConsensusFunction.BuildStructuring(); return aConsensusFunction.BuildStructuringWithReduction(); } catch (Exception _ex) { GeneralTools.Tools.WriteToLog(_ex); return null; } }