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

📄 phylo_tree_node.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: phylo_tree_node.hpp,v $ * PRODUCTION Revision 1000.1  2004/06/01 19:52:57  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4 * PRODUCTION * =========================================================================== */#if !defined(AFX_PHYLO_TREE_NODE_HPP__2F61D68C_0454_4BD0_89F2_037863D53E27__INCLUDED_)#define AFX_PHYLO_TREE_NODE_HPP__2F61D68C_0454_4BD0_89F2_037863D53E27__INCLUDED_/*  $Id: phylo_tree_node.hpp,v 1000.1 2004/06/01 19:52:57 gouriano Exp $ * =========================================================================== * *                            PUBLIC DOMAIN NOTICE *               National Center for Biotechnology Information * *  This software/database is a "United States Government Work" under the *  terms of the United States Copyright Act.  It was written as part of *  the author's official duties as a United States Government employee and *  thus cannot be copyrighted.  This software/database is freely available *  to the public for use. The National Library of Medicine and the U.S. *  Government have not placed any restriction on its use or reproduction. * *  Although all reasonable efforts have been taken to ensure the accuracy *  and reliability of the software and data, the NLM and the U.S. *  Government do not and cannot warrant the performance or results that *  may be obtained by using this software or data. The NLM and the U.S. *  Government disclaim all warranties, express or implied, including *  warranties of performance, merchantability or fitness for any particular *  purpose. * *  Please cite the author in any work or product based on this material. * * =========================================================================== * * Authors:  Vladimir Tereshkov * * File Description: * */#include <corelib/ncbistd.hpp>#include <corelib/ncbiobj.hpp>#include <corelib/ncbi_tree.hpp>#include <serial/serialbase.hpp>#include <serial/stdtypes.hpp>BEGIN_NCBI_SCOPEclass CPhyloTreeNode : public CTreeNode<CPhyloTreeNode*>                       {private:    // primary node data    string  m_Label;    double  m_Distance;     // visualization data      int                    m_ID;    pair <double, double>  m_XY;        pair <int, int>        m_IDX;    double                 m_Alpha;    bool                   m_Selected;    // useful for visualization params    // = ( leaves of current node / leaves of parent node ) * annulus wedge of parent    // for root let it be 360 - which will make sense for radial tree    double                 m_AnnWedge;        void x_CountLeafs(CPhyloTreeNode * node, Int4 & lfCount);public:      CPhyloTreeNode();    CPhyloTreeNode(int id, string label, double dist);	virtual ~CPhyloTreeNode();    const string & GetLabel(void) const;    const double   GetDistance(void) const;    const double   GetDistFromRoot(void) const;        void SetLabel(string label);    void SetDistance(double dist);            pair <double, double>  & XY(void)   { return m_XY;  }    pair <int, int>        & IDX(void)  { return m_IDX; }      bool GetSelected(void)              { return m_Selected; }    void SetSelected(bool bSel)         { m_Selected = bSel; }    double GetAnnWedge(void)            { return m_AnnWedge;  }    void   SetAnnWedge(double wedge)    { m_AnnWedge = wedge; }    double GetAngle(void)               { return m_Alpha;  }    void   SetAngle(double angle)       { m_Alpha = angle; }    int    GetID(void)                  { return m_ID;     }    void   SetID(int id)                { m_ID = id;       }    // function counts amount of end-leafs in childs    Int4   CountLeafs(void);};END_NCBI_SCOPE/* * =========================================================================== * $Log: phylo_tree_node.hpp,v $ * Revision 1000.1  2004/06/01 19:52:57  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4 * * Revision 1.4  2004/04/28 19:27:27  tereshko * Added support for distances rendering * * Revision 1.3  2004/03/30 17:11:08  tereshko * Added support for events broadcasting * * Revision 1.2  2004/03/02 18:28:50  tereshko * Added support for calculating annual vertex weight * * Revision 1.1  2004/02/13 16:59:59  tereshko * Phylogenetic Tree Widget initial revision * * =========================================================================== */#endif // !defined(AFX_PHYLO_TREE_NODE_HPP__2F61D68C_0454_4BD0_89F2_037863D53E27__INCLUDED_) 

⌨️ 快捷键说明

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