Struct hrbf::Hrbf[][src]

pub struct Hrbf<T, K> where
    T: Real,
    K: Kernel<T>, 
{ /* fields omitted */ }
Expand description

An HRBF potential field.

The field and its first and second derivatives can be queried at any 3D position. Additionally this field can be reset with a different set of points and normals using one of the fit, fit_to_points, offset_fit, or offset_fit_to_points methods. Some advanced functionality is also exposed (see individual methods for details).

Implementations

Returns a reference to the vector of site locations used by this HRBF.

(Advanced) Returns a reference to the vector of 4D weight vectors, which determine the global HRBF potential.

These are the unknowns computed during fitting. Each 4D vector has the structure [aⱼ; bⱼ] per site j where a is a scalar weighing the contribution from the kernel at site j and b is a 3D vector weighin the contribution from the kernel gradient at site j to the total HRBF potential.

Fit the current HRBF to the sites, with which this HRBF was built.

Normals dictate the direction of the HRBF gradient at the specified sites. Return a mutable reference to Self if successful.

Fit the current HRBF to the given data.

Return a mutable reference to Self if successful. NOTE: Currently, points must be the same size as sites.

Fit the current HRBF to the sites, with which this HRBF was built, offset by the given offsets.

The resulting HRBF field is equal to offsets at the sites. and has a gradient equal to normals. Return a mutable reference to Self if successful.

Fit the current HRBF to the given data.

The resulting HRBF field is equal to offsets at the provided points and has a gradient equal to normals. Return a mutable reference to Self if successful. NOTE: Currently, points must be the same size as sites.

Evaluate the HRBF at point p.

Gradient of the HRBF function at point p.

Compute the Hessian of the HRBF function.

(Advanced) Recall that the HRBF fit is done as

∑ⱼ ⎡  𝜙(𝑥ᵢ - 𝑥ⱼ)  ∇𝜙(𝑥ᵢ - 𝑥ⱼ)'⎤ ⎡ 𝛼ⱼ⎤ = ⎡ 0 ⎤
   ⎣ ∇𝜙(𝑥ᵢ - 𝑥ⱼ) ∇∇𝜙(𝑥ᵢ - 𝑥ⱼ) ⎦ ⎣ 𝛽ⱼ⎦   ⎣ 𝑛ᵢ⎦

for every HRBF site i, where the sum runs over HRBF sites j where 𝜙(𝑥) = 𝜑(||𝑥||) for one of the basis kernels we define in kernel If we rewrite the equation above as

∑ⱼ Aⱼ(𝑥ᵢ)bⱼ = rᵢ

this function returns the matrix Aⱼ(p).

This is the symmetric 4x4 matrix block that is used to fit the HRBF coefficients. This is equivalent to stacking the vector from eval_block on top of the 3x4 matrix returned by grad_block. This function is more efficient than evaluating eval_block and grad_block. This is [g ∇g]' = [𝜙 (∇𝜙)'; ∇𝜙 ∇(∇𝜙)'] in MATLAB notation.

(Advanced) Using the same notation as above, this function returns the matrix ∇(Aⱼ(p)b)'

Sum of hess_fit_prod_block evaluated at all sites.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.