MCPcopy Create free account
hub / github.com/chengwei0427/Lidar_IMU_Localization / validnum

Method validnum

include/ikd-Tree/ikd_Tree.cpp:140–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139template <typename PointType>
140int KD_TREE<PointType>::validnum()
141{
142 int s = 0;
143 if (Rebuild_Ptr == nullptr || *Rebuild_Ptr != Root_Node)
144 {
145 if (Root_Node != nullptr)
146 return (Root_Node->TreeSize - Root_Node->invalid_point_num);
147 else
148 return 0;
149 }
150 else
151 {
152 if (!pthread_mutex_trylock(&working_flag_mutex))
153 {
154 s = Root_Node->TreeSize - Root_Node->invalid_point_num;
155 pthread_mutex_unlock(&working_flag_mutex);
156 return s;
157 }
158 else
159 {
160 return -1;
161 }
162 }
163}
164
165template <typename PointType>
166void KD_TREE<PointType>::root_alpha(float &alpha_bal, float &alpha_del)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected