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

📄 protsetupdate.cpp

📁 模糊聚類分析源碼。包含教學文件
💻 CPP
字号:
/*    Context       : Fuzzy Clustering Algorithms  Author        : Frank Hoeppner, see also AUTHORS file   Description   : implementation of class module ProtSetUpdate                    History       :      Comment       :     This file was generated automatically. DO NOT EDIT.  Copyright     : Copyright (C) 1999-2000 Frank Hoeppner    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*  The University of Applied Sciences Oldenburg/Ostfriesland/Wilhelmshaven  hereby disclaims all copyright interests in the program package `fc'   (tool package for fuzzy cluster analysis) written by Frank Hoeppner.    Prof. Haass, President of Vice, 2000-Mar-10*/#ifndef ProtSetUpdate_SOURCE#define ProtSetUpdate_SOURCE/* configuration include */#ifdef HAVE_CONFIG_H/*//FILETREE_IFDEF HAVE_CONFIG_H*/#include "config.h"/*//FILETREE_ENDIF*/#endif// necessary includes#include "ProtSetUpdate.hpp"// data// implementationtemplate < class ANALYSIS >ProtSetUpdate< ANALYSIS >::ProtSetUpdate  (  Algorithm<flat_analysis_type> *ap_clus_alg,  Algorithm<ANALYSIS> *ap_alg  )  : mp_succ_alg(ap_alg)  , mp_clus_alg(ap_clus_alg)  , mp_flat_alg(flat(flat_nop()))    {    }template < class ANALYSIS >ProtSetUpdate< ANALYSIS >::~ProtSetUpdate  (  )  {  FUNCLOG("~ProtSetUpdate");    delete mp_succ_alg;  }template < class ANALYSIS >voidProtSetUpdate< ANALYSIS >::operator()  (  ANALYSIS& a_analysis  )  {  FUNCLOG("ProtSetUpdate");      m_local_option = a_analysis.option();  (*mp_flat_alg)(a_analysis);  m_local_option.interim_output() = DEFAULT_OPTION_NOINTERIMOUT;  if (m_local_option.max_iterations()<=0)    m_local_option.max_iterations() = DEFAULT_OPTION_MAXITER; // full run  m_local_option.number_features() = mp_flat_alg->analysis().option().number_features();  if (m_local_option.data_depth()!=FC_DEPTH_ANY)     m_local_option.data_depth() -= 1;  if (m_local_option.prot_depth()!=FC_DEPTH_ANY)    m_local_option.prot_depth() -= 1;  int p(0);  for (      typename ANALYSIS::prot_iter i_prot(a_analysis.prototypes().begin());      i_prot != a_analysis.prototypes().end();      ++i_prot      )    {    flat_analysis_type flat_analysis(&m_local_option,&(mp_flat_alg->analysis().data()),&(*i_prot).hierarchy(),&m_flat_links);    m_local_option.number_prototypes() = (*i_prot).hierarchy().size();    adjust_set_size(m_flat_links,m_local_option.number_features()*      m_local_option.number_prototypes());    m_local_option.weight_factor() = Selector(SELECT_PMEM,p);    for (flat_analysis_type::data_iter i_data(flat_analysis.data().begin());      i_data != flat_analysis.data().end(); ++i_data)      {      (*i_data).recalc_weight_factor(m_local_option.weight_factor());      }    (*mp_clus_alg)(flat_analysis);    // write local analysis into trace stream; use different analysis name    // then the save tool divides them up correctly    if (m_local_option.interim_output()!=DEFAULT_OPTION_NOINTERIMOUT)      {      m_local_option.analysis_name()  = a_analysis.option().analysis_name();      m_local_option.analysis_name() += ".cluster";      m_local_option.analysis_name() += p;      run(ddlwrite(cout,flat_nop(),false),flat_analysis);      }    ++p;    }  (*mp_succ_alg)(a_analysis);    }// template instantiation#endif // ProtSetUpdate_SOURCE

⌨️ 快捷键说明

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