Helios++
Helios software for LiDAR simulations
AxisSAHKDTreeFactory.h
1 #pragma once
2 
3 #include <SAHKDTreeFactory.h>
4 
19 private:
20  // *** SERIALIZATION *** //
21  // *********************** //
22  friend class boost::serialization::access;
31  template <typename Archive>
32  void serialize(Archive &ar, unsigned int const version){
33  boost::serialization::void_cast_register<
36  >();
37  ar &boost::serialization::base_object<SAHKDTreeFactory>(*this);
38  }
39 
40 public:
41  // *** CONSTRUCTION / DESTRUCTION *** //
42  // ************************************ //
48  size_t const lossNodes=21,
49  double const ci=1,
50  double const cl=1,
51  double const co=1
52  );
53  virtual ~AxisSAHKDTreeFactory() = default;
54 
55  // *** CLONE *** //
56  // *************** //
60  KDTreeFactory * clone() const override;
64  void _clone(KDTreeFactory *kdtf) const override;
65 
66  // *** BUILDING METHODS *** //
67  // ************************** //
73  void defineSplit(
74  KDTreeNode *node,
75  KDTreeNode *parent,
76  vector<Primitive *> &primitives,
77  int const depth
78  ) const override;
79 
80 };
Class providing building methods for k-dimensional trees with surface area heuristic and greedy selec...
Definition: AxisSAHKDTreeFactory.h:14
double co
Cost-weight for testing an object for intersection.
Definition: SAHKDTreeFactory.h:181
void defineSplit(KDTreeNode *node, KDTreeNode *parent, vector< Primitive * > &primitives, int const depth) const override
Extend SAHKDTreeFactory::defineSplit to handle greedy search of best split axis.
Definition: AxisSAHKDTreeFactory.cpp:29
double ci
Cost-weight for traversing interior nodes.
Definition: SAHKDTreeFactory.h:171
void _clone(KDTreeFactory *kdtf) const override
Assign attributes from AxisSAHKDTreeFactory to its clone.
Definition: AxisSAHKDTreeFactory.cpp:23
void serialize(Archive &ar, unsigned int const version)
Serialize an axis surface area heuristic KDTree factory to a stream of bytes.
Definition: AxisSAHKDTreeFactory.h:32
AxisSAHKDTreeFactory(size_t const lossNodes=21, double const ci=1, double const cl=1, double const co=1)
Axis surface area heuristic KDTree factory default constructor.
Definition: AxisSAHKDTreeFactory.cpp:5
KDTreeFactory * clone() const override
Definition: AxisSAHKDTreeFactory.cpp:15
size_t lossNodes
How many loss nodes must be computed when optimizing the loss function to determine the best split p...
Definition: SAHKDTreeFactory.h:166
double cl
Cost-weight for traversing leaf nodes.
Definition: SAHKDTreeFactory.h:176
Class that must be extended by any class which provides factory methods for k-dimensional trees....
Definition: KDTreeFactory.h:22
Class representing a KDTree node.
Definition: KDTreeNode.h:9
Class providing building methods for k-dimensional trees with surface area heuristic (SAH)
Definition: SAHKDTreeFactory.h:126
double co
Cost-weight for testing an object for intersection.
Definition: SAHKDTreeFactory.h:181
double ci
Cost-weight for traversing interior nodes.
Definition: SAHKDTreeFactory.h:171
size_t lossNodes
How many loss nodes must be computed when optimizing the loss function to determine the best split p...
Definition: SAHKDTreeFactory.h:166
double cl
Cost-weight for traversing leaf nodes.
Definition: SAHKDTreeFactory.h:176