27 #ifndef MPBLOCKS_KD2_INSERT_H_
28 #define MPBLOCKS_KD2_INSERT_H_
48 const IsLeafFn& isLeaf,
49 const LeafInsertFn& leafInsert,
53 const PointGetFn& pointGet
56 NodeRef parent = node;
58 while( !isLeaf( node ) )
62 node = child(node,which);
67 leafInsert(node,point);
86 const IsLeafFn& isLeaf,
87 const LeafInsertFn& leafInsert,
91 const PointGetFn& pointGet,
92 const HyperSetFn& hyperSet
95 NodeRef parent = node;
97 while( !isLeaf( node ) )
101 node = child(node,which);
102 hyperSet(cell,
other(which),i,value(node));
107 leafInsert(cell,node,point);
BinaryKey other(const BinaryKey &key)
void insert(NodeRef node, PointRef point, const IsLeafFn &isLeaf, const LeafInsertFn &leafInsert, const IdxFn &idx, const ValueFn &value, const ChildFn &child, const PointGetFn &pointGet)