MCPcopy Create free account
hub / github.com/LAStools/LAStools / getsym

Method getsym

LASzip/unused/rangemodel.cpp:219–239  ·  view source on GitHub ↗

find out symbol for a given cumulative frequency */ lt_f cumulative frequency */

Source from the content-addressed store, hash-verified

217/* find out symbol for a given cumulative frequency */
218/* lt_f cumulative frequency */
219U32 RangeModel::getsym(U32 lt_f)
220{
221 U32 lo, hi;
222 U16 *tmp;
223 tmp = search+(lt_f>>searchshift);
224 lo = *tmp;
225 hi = *(tmp+1) + 1;
226 while (lo+1 < hi )
227 {
228 I32 mid = (lo+hi)>>1;
229 if (lt_f < cf[mid])
230 {
231 hi = mid;
232 }
233 else
234 {
235 lo = mid;
236 }
237 }
238 return lo;
239}
240
241/* update model */
242/* sym symbol that occurred (must be <n from init) */

Callers 1

decodeSymbolMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected