MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / LimitB

Function LimitB

jni/stasm/shapemod.cpp:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// "b" is the name used for the eigenvector weights in Cootes' papers.
14
15static void LimitB(
16 VEC& b, // io: eigvec weights
17 const VEC& eigvals, // in
18 double bmax) // in
19{
20 for (int i = 0; i < NSIZE(eigvals); i++)
21 {
22 const double limit = bmax * sqrt(eigvals(i));
23 b(i) = Clamp(b(i), -limit, limit);
24 }
25}
26
27// This implements Section 4.8 of CootesTaylor 2004
28// www.isbe.man.ac.uk/~bim/Mods/app_models.pdf.

Callers 1

ConformShapeToModFunction · 0.85

Calls 2

NSIZEFunction · 0.85
ClampFunction · 0.85

Tested by

no test coverage detected