src/bisection_tree/btfn.rs

branch
dev
changeset 63
f7b87d84864d
parent 59
9226980e45a7
child 80
f802ddbabcfc
child 86
d5b0e496b72f
equal deleted inserted replaced
62:d8305c9b6fdf 63:f7b87d84864d
503 503
504 /// Helper trait for performing approximate minimisation using P2 elements. 504 /// Helper trait for performing approximate minimisation using P2 elements.
505 /// 505 ///
506 /// `U` is the domain, generally [`Loc`]`<F, N>`, and `F` the type of floating point numbers. 506 /// `U` is the domain, generally [`Loc`]`<F, N>`, and `F` the type of floating point numbers.
507 /// `Self` is generally a set of `U`, for example, [`Cube`]`<F, N>`. 507 /// `Self` is generally a set of `U`, for example, [`Cube`]`<F, N>`.
508 pub trait P2Minimise<U, F : Float> : Set<U> { 508 pub trait P2Minimise<U : Space, F : Float> : Set<U> {
509 /// Minimise `g` over the set presented by `Self`. 509 /// Minimise `g` over the set presented by `Self`.
510 /// 510 ///
511 /// The function returns `(x, v)` where `x` is the minimiser `v` an approximation of `g(x)`. 511 /// The function returns `(x, v)` where `x` is the minimiser `v` an approximation of `g(x)`.
512 fn p2_minimise<G : Fn(&U) -> F>(&self, g : G) -> (U, F); 512 fn p2_minimise<G : Fn(&U) -> F>(&self, g : G) -> (U, F);
513 513

mercurial