Tue, 20 Feb 2024 12:33:16 -0500
Logarithmic logging base correction
5 | 1 | /*! |
2 | Base types for simple (finite) element models. | |
3 | */ | |
0 | 4 | |
5 | 5 | /// A local function model that can be evaluated for value and differential. |
0 | 6 | pub trait LocalModel<Domain, Codomain> { |
7 | /// Get the value of the model at `x` | |
8 | fn value(&self, x : &Domain) -> Codomain; | |
9 | /// Get the differential of the model at `x` | |
10 | fn differential(&self, x : &Domain) -> Domain; | |
11 | } | |
12 | ||
13 | /// A real local model is a minimisable [`LocalModel`]. | |
14 | pub trait RealLocalModel<S, Domain, Codomain> : LocalModel<Domain, Codomain> { | |
15 | /// Find a (minimum, minimiser) pair for he model within `el`, which is | |
16 | /// typically a simplex subset of `Domain`. | |
17 | fn minimise(&self, el : &S) -> (Domain, Codomain); | |
18 | } |