13 #include "ACDCTraits.h" 17 struct ACDCGenCellInfo;
48 template <
typename RndType>
76 inline void smooth(
double frac);
88 inline double doMaxInt(
double rescale = 1.0);
94 inline double maxInt()
const;
101 inline void splitme(
double lo,
double newDiv,
double up,
DimType newDim);
106 inline void g(
double newG);
111 inline double g()
const;
116 inline double v()
const;
128 inline double div()
const;
144 inline int nBins()
const;
149 inline int depth()
const;
159 vector<ACDCGenCellInfo> & v)
const;
245 typedef vector<ACDCGenCellInfo>::size_type
Index;
282 #include "ACDCGenCell.icc" double div() const
Return the point of division in the dim() direction.
int depth() const
Return the maximum depth of this sub-tree.
double v() const
Return the volume of this cell.
Index iup
The index of the upper sub-cells in the vector in which the corresponding cell was inserted...
ACDCGenCell * lower() const
Return the lower sub-cell.
ACDCGenCell * generate(DVector &lo, DVector &up, RndType *rnd)
Choose a cell recursively according to their relative overestimated integrals.
double theG
If the cell has not been split this is the overestimated maximum function value in this cell...
double g
The overestimated maximum function value of this cell.
DimType theSplitDimension
The direction in which it has been split.
This is a class describing cells to the outside world to be used for debugging purposes.
vector< ACDCGenCellInfo >::size_type Index
the integer used for indices.
ACDCGenCell & operator=(const ACDCGenCell &)
Assignment is private and not implemented.
long getIndex(const ACDCGenCell *c) const
Get the index of the given cell.
ACDCGenCell * theLower
Pointers to the lower sub-cell.
double maxInt() const
Return the last calculated the overestimated integral for this cell.
ACDCGenCell()
Default constructor is private and not implemented.
DVector up
The upper-right corner of the corresponding cell.
ACDCGenCell * theUpper
Pointers to the upper sub-cell.
int nBins() const
Return the number of cells in this sub-tree which have not been split.
DVector lo
The lower-left corner of the corresponding cell.
~ACDCGenCell()
The destuctor will also delete all child cells.
double theDivision
The point of division in the dim() direction.
ACDCGenCell * upper() const
Return the upper sub-cell.
short DimType
The integer type used to represent the dimension of the a functions to be sampled-.
double doMaxInt(double rescale=1.0)
Recalculate (recursively) the overestimated integral for this cell (and of the sub-cells) and return ...
void extract(DVector &lo, DVector &up, vector< ACDCGenCellInfo > &v) const
Append ACDCGenCellInfo objects describing this subtree to a given vector.
vector< double > DVector
A vector of doubles.
is the main config header file for ACDCGen.
bool isSplit() const
Returns true if this cell has been split.
void smooth(double frac)
Smooth out the levels.
DimType dim() const
Return the direction in which it has been split.
ACDCGenCell * getCell(DVector &lo, const DVector &x, DVector &up)
Find a cell.
double theV
The volume of this cell.
Index ilo
The index of the lower sub-cell in the vector in which the corresponding cell was inserted...
The namespace in which all ACDCGen classes are defined.
double v
The volume of the corresponding cell.
void splitme(double lo, double newDiv, double up, DimType newDim)
Split this cell into two.
double g() const
Return the overestimated maximum function value in this cell.
ACDCGenCell is the class representing a generation cell in ACDCGen.