# HG changeset patch # User Tuomo Valkonen # Date 1735652950 18000 # Node ID e9f4550cfa18cfaa65471d459b242de28976853b # Parent 2c76df38d02bd183115848faed612742d69083d8 Fix out-of-date references in doc comments diff -r 2c76df38d02b -r e9f4550cfa18 src/bisection_tree/support.rs --- a/src/bisection_tree/support.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/bisection_tree/support.rs Tue Dec 31 08:49:10 2024 -0500 @@ -1,6 +1,6 @@ /*! -Traits for representing the support of a [`Apply`], and analysing the mapping on a [`Cube`]. +Traits for representing the support of a [`Mapping`], and analysing the mapping on a [`Cube`]. */ use serde::Serialize; use std::ops::{MulAssign,DivAssign,Neg}; @@ -15,9 +15,9 @@ use crate::norms::{Norm, L1, L2, Linfinity}; pub use crate::operator_arithmetic::{Weighted, Constant}; -/// A trait for working with the supports of [`Apply`]s. +/// A trait for working with the supports of [`Mapping`]s. /// -/// Apply is not a super-trait to allow more general use. +/// `Mapping` is not a super-trait to allow more general use. pub trait Support : Sized + Sync + Send + 'static { /// Return a cube containing the support of the function represented by `self`. /// @@ -52,7 +52,7 @@ } } -/// Trait for globally analysing a property `A` of a [`Apply`]. +/// Trait for globally analysing a property `A` of a [`Mapping`]. /// /// Typically `A` is an [`Aggregator`][super::aggregator::Aggregator] such as /// [`Bounds`][super::aggregator::Bounds]. @@ -73,7 +73,7 @@ // } // } -/// Trait for locally analysing a property `A` of a [`Apply`] (implementing [`Support`]) +/// Trait for locally analysing a property `A` of a [`Mapping`] (implementing [`Support`]) /// within a [`Cube`]. /// /// Typically `A` is an [`Aggregator`][super::aggregator::Aggregator] such as @@ -87,10 +87,10 @@ fn local_analysis(&self, cube : &Cube) -> A; } -/// Trait for determining the upper and lower bounds of an float-valued [`Apply`]. +/// Trait for determining the upper and lower bounds of an float-valued [`Mapping`]. /// /// This is a blanket-implemented alias for [`GlobalAnalysis`]`>` -/// [`Apply`] is not a supertrait to allow flexibility in the implementation of either +/// [`Mapping`] is not a supertrait to allow flexibility in the implementation of either /// reference or non-reference arguments. pub trait Bounded : GlobalAnalysis> { /// Return lower and upper bounds for the values of of `self`. @@ -102,7 +102,7 @@ impl>> Bounded for T { } -/// Shift of [`Support`] and [`Apply`]; output of [`Support::shift`]. +/// Shift of [`Support`] and [`Mapping`]; output of [`Support::shift`]. #[derive(Copy,Clone,Debug,Serialize)] // Serialize! but not implemented by Loc. pub struct Shift { shift : Loc, @@ -283,12 +283,12 @@ impl_weighted_norm!(L1 L2 Linfinity); -/// Normalisation of [`Support`] and [`Apply`] to L¹ norm 1. +/// Normalisation of [`Support`] and [`Mapping`] to L¹ norm 1. /// /// Currently only scalar-valued functions are supported. #[derive(Copy, Clone, Debug, Serialize, PartialEq)] pub struct Normalised( - /// The base [`Support`] or [`Apply`]. + /// The base [`Support`] or [`Mapping`]. pub T ); @@ -392,7 +392,7 @@ : MulAssign + DivAssign + Neg + Clone + Sync + Send + 'static { /// The identification type type Id : 'static + Copy; - /// The type of the [`Support`] (often also a [`Apply`]). + /// The type of the [`Support`] (often also a [`Mapping`]). type SupportType : 'static + Support; /// An iterator over all the [`Support`]s of the generator. type AllDataIter<'a> : Iterator where Self : 'a; diff -r 2c76df38d02b -r e9f4550cfa18 src/instance.rs --- a/src/instance.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/instance.rs Tue Dec 31 08:49:10 2024 -0500 @@ -8,7 +8,7 @@ Borrowed(B), } -/// A very basic implementation of [`Cow`] without a [`Clone`] trait dependency. +/// A very basic implementation of [`std::borrow::Cow`] without a [`Clone`] trait dependency. pub type MyCow<'b, X> = EitherDecomp; impl<'b, X> std::ops::Deref for MyCow<'b, X> { @@ -89,8 +89,6 @@ /// Helper trait for functions to work with either owned values or references to either the /// “principal type” `X` or types some present a subset of `X`. In the latter sense, this /// generalises [`std::borrow::ToOwned`], [`std::borrow::Borrow`], and [`std::borrow::Cow`]. -/// This type also includes iteratation facilities when `X` is a [`Collection`], to avoid -/// the possibly costly conversion of such subset types into `X`. pub trait Instance::Decomp> : Sized where D : Decomposition { /// Decomposes self according to `decomposer`. fn decompose<'b>(self) -> D::Decomposition<'b> diff -r 2c76df38d02b -r e9f4550cfa18 src/mapping.rs --- a/src/mapping.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/mapping.rs Tue Dec 31 08:49:10 2024 -0500 @@ -8,10 +8,9 @@ use crate::loc::Loc; pub use crate::instance::{Instance, Decomposition, BasicDecomposition, Space}; use crate::norms::{Norm, NormExponent}; +use crate::operator_arithmetic::{Weighted, Constant}; -/// A mapping from `Domain` to `Codomain`. -/// -/// This is automatically implemented when the relevant [`Apply`] are implemented. +/// A mapping from `Domain` to `Self::Codomain`. pub trait Mapping { type Codomain : Space; @@ -128,7 +127,7 @@ } -/// Container for the differential [`Mapping`] of a [`Differentiable`] mapping. +/// Container for the differential [`Mapping`] of a [`DifferentiableMapping`]. pub struct Differential<'a, X, G : Clone> { g : Cow<'a, G>, _space : PhantomData diff -r 2c76df38d02b -r e9f4550cfa18 src/metaprogramming.rs --- a/src/metaprogramming.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/metaprogramming.rs Tue Dec 31 08:49:10 2024 -0500 @@ -3,8 +3,7 @@ */ /// Reference `x` if so indicated by the first parameter. -/// Typically to be used from another macro. See the implementation of -/// [power][crate::vectorspace::powerspace] and [product spaces][crate::vectorspace::productspace]. +/// Typically to be used from another macro. /// /// ```ignore /// maybe_ref!(ref, V) // ➡ &V @@ -27,8 +26,7 @@ /// Annotate `x` with a lifetime if the first parameter -/// Typically to be used from another macro. See the implementation of -/// [power][crate::vectorspace::powerspace] and [product spaces][crate::vectorspace::productspace]. +/// Typically to be used from another macro. /// /// ```ignore /// maybe_ref!(ref, &'a V) // ➡ &'a V diff -r 2c76df38d02b -r e9f4550cfa18 src/operator_arithmetic.rs --- a/src/operator_arithmetic.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/operator_arithmetic.rs Tue Dec 31 08:49:10 2024 -0500 @@ -21,13 +21,12 @@ fn value(&self) -> F { *self } } -/// Weighting of a [`Support`] and [`Apply`] by scalar multiplication; -/// output of [`Support::weigh`]. +/// Weighting of a [`Mapping`] by scalar multiplication. #[derive(Copy,Clone,Debug,Serialize)] pub struct Weighted { /// The weight pub weight : C, - /// The base [`Support`] or [`Apply`] being weighted. + /// The base [`Mapping`] being weighted. pub base_fn : T, } diff -r 2c76df38d02b -r e9f4550cfa18 src/sets.rs --- a/src/sets.rs Mon Dec 30 11:00:12 2024 -0500 +++ b/src/sets.rs Tue Dec 31 08:49:10 2024 -0500 @@ -62,9 +62,6 @@ /// /// The halfspace is $H = \\{ t v + a \mid a^⊤ v = 0 \\}$, where $v$ is the orthogonal /// vector and $t$ the offset. -/// -/// `U` is the element type, `F` the floating point number type, and `A` the type of the -/// orthogonal (dual) vectors. They need implement [`Dot`]. #[derive(Clone,Copy,Debug,Serialize,Eq,PartialEq)] pub struct Halfspace where A : Euclidean, F : Float { pub orthogonal : A,