A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/bio__tree__forest_8hpp_source.html below:

NCBI C++ ToolKit: include/algo/phy_tree/bio_tree_forest.hpp Source File

1 #ifndef ALGO_PHY_TREE___BIO_TREE_FOREST__HPP 2 #define ALGO_PHY_TREE___BIO_TREE_FOREST__HPP 54 template

<

class

BioTree>

94  const string

& feature_value);

101  const string

& feature_name,

102  const string

& feature_value);

149 template

<

class

BioTree>

154 template

<

class

BioTree>

156

: m_FeatureDict(btr.m_FeatureDict)

157

, m_NodeIdCounter(btr.m_NodeIdCounter)

158

, m_Forest(btr.m_Forest)

162 template

<

class

BioTree>

168 template

<

class

BioTree>

178 template

<

class

BioTree>

184  typename

std::vector<BioTree*>::const_iterator iter;

185  for

(iter=m_Forest.begin(); iter!=m_Forest.end() && (

n

==

NULL

); ++iter) {

186  n

= (*iter)->FindNode(node_id);

192 template

<

class

BioTree>

195  typename

std::vector<BioTree*>::iterator iter;

196

iter = std::find(m_Forest.begin(), m_Forest.end(),

t

);

198  if

(iter == m_Forest.end())

199

m_Forest.push_back(

t

);

202 template

<

class

BioTree>

205  typename

std::vector<BioTree*>::iterator iter;

206

iter = std::find(m_Forest.begin(), m_Forest.end(),

t

);

208  _ASSERT

(iter != m_Forest.end());

210

m_Forest.erase(iter);

213 template

<

class

BioTree>

216  typename

std::vector<BioTree*>::iterator iter;

217

iter = std::find(m_Forest.begin(), m_Forest.end(),

t

);

219  _ASSERT

(iter != m_Forest.end());

221

m_Forest.erase(iter);

226 template

<

class

BioTree>

229  const string

& feature_value)

232  bool

id_found = m_FeatureDict.HasFeature(feature_id);

234

node->GetValue().features.SetFeature(feature_id, feature_value);

241 template

<

class

BioTree>

243  const string

& feature_name,

244  const string

& feature_value)

248

= m_FeatureDict.GetId(feature_name);

251

feature_id = m_FeatureDict.Register(feature_name);

255

AddFeature(node, feature_id, feature_value);

258 template

<

class

BioTree>

262

node->GetValue().uid = uid;

265 template

<

class

BioTree>

274

ret = parent_node->AddNode(node_value);

280 template

<

class

BioTree>

283

m_FeatureDict.Clear();

286  ITERATE

(

typename

std::vector<BioTree*>, iter, m_Forest) {

Things for representing and manipulating bio trees.

CBioTreeForest< CBioTreeDynamic > CBioTreeForestDynamic

Bio tree without static elements.

Set of BioTree objects managed as a single forest.

const CBioTreeFeatureDictionary & GetFeatureDict() const

Return feature dictionary.

void AddTree(BioTree *t)

Add a new tree to the set of managed BioTrees.

void AddFeature(TBioTreeNode *node, TBioTreeFeatureId feature_id, const string &feature_value)

Add feature to the tree node Function controls that the feature is registered in the feature dictiona...

void SetTreeNode(TBioTreeNode *node)

Assign new top level tree node.

TBioTreeNodeId m_NodeIdCounter

CBioTreeForest< BioTree > & operator=(const CBioTreeForest< BioTree > &btr)

void Clear()

Clear the bio tree.

void RemoveTree(BioTree *t)

Remove a tree from the forest, but do not delete it.

TBioTree::TBioNodeType TBioNodeType

const TBioTreeNode * FindNode(TBioTreeNodeId node_id) const

Finds node by id.

void SetNodeId(TBioTreeNode *node)

Assign new unique node id to the node.

std::vector< BioTree * > GetTrees() const

Return a copy of the forest vector for direct access to the trees.

std::vector< BioTree * > TBioTreeVec

virtual TBioTreeNodeId GetNodeId(const TBioTreeNode &node)

Get new unique node id (for cases when node id depends on the node's content.

void DeleteTree(BioTree *t)

Remove and delete a tree from the forest.

CBioTreeFeatureDictionary & GetFeatureDict()

Return feature dictionary.

TBioTree::TBioTreeNode TBioTreeNode

Biotree node (forms the tree hierarchy)

CBioTreeFeatureDictionary m_FeatureDict

virtual TBioTreeNodeId GetNodeId()

Get new unique node id.

virtual ~CBioTreeForest()

TBioTreeNode * AddNode(const TBioNodeType &node_value, TBioTreeNodeId parent_id)

Add node to the tree (node location is defined by the parent id.

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

Fun TreeDepthFirstTraverse(TTreeNode &tree_node, Fun func)

Depth-first tree traversal algorithm.

unsigned int TBioTreeNodeId

Tree node id. Every node has its unique id in the tree.

unsigned int TBioTreeFeatureId

Feature Id.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4