MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / evaluate

Method evaluate

splashsurf_lib/src/kernel.rs:104–107  ·  view source on GitHub ↗

Evaluates the cubic spline kernel at the radial distance `r`

(&self, r: R)

Source from the content-addressed store, hash-verified

102
103 /// Evaluates the cubic spline kernel at the radial distance `r`
104 fn evaluate(&self, r: R) -> R {
105 let q = (r + r) / self.compact_support_radius;
106 self.normalization * Self::cubic_function(q)
107 }
108
109 /// Evaluates the gradient of the cubic spline kernel at the position `x`
110 fn evaluate_gradient(&self, x: Vector3<R>) -> Vector3<R> {

Calls 3

to_usizeMethod · 0.80
minMethod · 0.45
lenMethod · 0.45

Tested by 4

test_discrete_kernelFunction · 0.36