COPASI API  4.16.103
CBitPatternTreeNode.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/elementaryFluxModes/CBitPatternTreeNode.h,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2010/01/29 21:59:25 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 #ifndef COPASI_CBitPatternTreeNode
15 #define COPASI_CBitPatternTreeNode
16 
17 #include <list>
18 
21 
22 class CStepMatrixColumn;
23 
25 {
26  // Operations
27 private:
29 
30 public:
32 
33  CBitPatternTreeNode(const size_t & index,
34  const std::vector< CStepMatrixColumn * > & patterns);
35 
36  virtual ~CBitPatternTreeNode(void);
37 
38  const CStepMatrixColumn * getStepMatrixColumn() const;
39 
40  inline bool hasSuperset(const CZeroSet & set) const
41  {
42  if (mIgnoreCheck || *mpZeroSet >= set)
43  {
44  if (mpStepMatrixColumn != NULL)
45  {
46  return true;
47  }
48 
49  if (mpUnsetChild->hasSuperset(set))
50  {
51  return true;
52  }
53 
54  if (mpSetChild->hasSuperset(set))
55  {
56  return true;
57  }
58  }
59 
60  return false;
61  }
62 
63  inline const CZeroSet & getZeroSet() const
64  {
65  return *mpZeroSet;
66  }
67 
68  inline const CBitPatternTreeNode * getUnsetChild() const
69  {
70  return mpUnsetChild;
71  }
72 
73  inline const CBitPatternTreeNode * getSetChild() const
74  {
75  return mpSetChild;
76  }
77 
78  size_t getChildrenCount() const;
79 
80 private:
81  void splitPatterns(const std::vector< CStepMatrixColumn * > & patterns);
82 
83  size_t nextAvailableIndex() const;
84 
85  // Attributes
86 private:
87  size_t mIndex;
88 
90 
92 
94 
96 
98 };
99 
100 #endif // COPASI_CBitPatternTreeNode
const CStepMatrixColumn * getStepMatrixColumn() const
const CBitPatternTreeNode * getUnsetChild() const
CBitPatternTreeNode * mpUnsetChild
size_t nextAvailableIndex() const
const CBitPatternTreeNode * getSetChild() const
virtual ~CBitPatternTreeNode(void)
CStepMatrixColumn * mpStepMatrixColumn
bool hasSuperset(const CZeroSet &set) const
const CZeroSet & getZeroSet() const
CBitPatternTreeNode * mpSetChild
size_t getChildrenCount() const
void splitPatterns(const std::vector< CStepMatrixColumn * > &patterns)