Traversal statistics structure. More...
#include <OrientedBoxTreeTool.hpp>
Public Member Functions | |
const std::vector< unsigned > & | nodes_visited () const |
return counts of nodes visited, indexed by tree depth. the counts include both leaves and interior nodes More... | |
const std::vector< unsigned > & | leaves_visited () const |
return counts of tree leaves visited, indexed by tree depth More... | |
const std::vector< unsigned > & | traversals_ended () const |
return counts of traversals ended, indexed by tree depth More... | |
unsigned int | ray_tri_tests () const |
return total number of ray-triangle intersection tests performed in calls made with this TrvStats More... | |
void | reset () |
reset all counters on this structure More... | |
void | print (std::ostream &str) const |
print the contents of this structure to given stream More... | |
TrvStats () | |
Private Member Functions | |
void | increment (unsigned depth) |
void | increment_leaf (unsigned depth) |
void | end_traversal (unsigned depth) |
Private Attributes | |
std::vector< unsigned > | nodes_visited_count |
std::vector< unsigned > | leaves_visited_count |
std::vector< unsigned > | traversals_ended_count |
unsigned int | ray_tri_tests_count |
Friends | |
class | OrientedBoxTreeTool |
Traversal statistics structure.
Structure to accumulate statistics on traversal performance. Passed optionally to query functions, this structure contains the count of nodes visited at each level in a tree, and the count of traversals that ended at each level. One TrvStats structure can be used with multiple OBB trees or multiple queries, or used on only a single tree or a single query.
Note that these traversal statistics are not related to the stats() query below, which calculates static information about a tree. These statistics relate to a tree's dynamic behavior on particular operations.
Definition at line 151 of file OrientedBoxTreeTool.hpp.
|
inline |
Definition at line 181 of file OrientedBoxTreeTool.hpp.
|
private |
Definition at line 1695 of file OrientedBoxTreeTool.cpp.
Referenced by moab::OrientedBoxTreeTool::closest_to_location(), moab::OrientedBoxTreeTool::preorder_traverse(), and moab::OrientedBoxTreeTool::sphere_intersect_triangles().
|
private |
Definition at line 1677 of file OrientedBoxTreeTool.cpp.
Referenced by moab::OrientedBoxTreeTool::closest_to_location(), moab::OrientedBoxTreeTool::preorder_traverse(), and moab::OrientedBoxTreeTool::sphere_intersect_triangles().
|
private |
Definition at line 1689 of file OrientedBoxTreeTool.cpp.
Referenced by moab::OrientedBoxTreeTool::closest_to_location(), moab::OrientedBoxTreeTool::preorder_traverse(), and moab::OrientedBoxTreeTool::sphere_intersect_triangles().
|
inline |
return counts of tree leaves visited, indexed by tree depth
Definition at line 161 of file OrientedBoxTreeTool.hpp.
References leaves_visited_count.
|
inline |
return counts of nodes visited, indexed by tree depth. the counts include both leaves and interior nodes
Definition at line 156 of file OrientedBoxTreeTool.hpp.
References nodes_visited_count.
void moab::OrientedBoxTreeTool::TrvStats::print | ( | std::ostream & | str | ) | const |
print the contents of this structure to given stream
Definition at line 1702 of file OrientedBoxTreeTool.cpp.
|
inline |
return total number of ray-triangle intersection tests performed in calls made with this TrvStats
Definition at line 172 of file OrientedBoxTreeTool.hpp.
References ray_tri_tests_count.
void moab::OrientedBoxTreeTool::TrvStats::reset | ( | ) |
reset all counters on this structure
Definition at line 1669 of file OrientedBoxTreeTool.cpp.
References leaves_visited_count, nodes_visited_count, ray_tri_tests_count, and traversals_ended_count.
|
inline |
return counts of traversals ended, indexed by tree depth
Definition at line 166 of file OrientedBoxTreeTool.hpp.
References traversals_ended_count.
|
friend |
Definition at line 193 of file OrientedBoxTreeTool.hpp.
|
private |
Definition at line 185 of file OrientedBoxTreeTool.hpp.
Referenced by leaves_visited(), and reset().
|
private |
Definition at line 184 of file OrientedBoxTreeTool.hpp.
Referenced by nodes_visited(), and reset().
|
private |
Definition at line 187 of file OrientedBoxTreeTool.hpp.
Referenced by moab::OrientedBoxTreeTool::ray_intersect_sets(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), ray_tri_tests(), and reset().
|
private |
Definition at line 186 of file OrientedBoxTreeTool.hpp.
Referenced by reset(), and traversals_ended().