Fix out-of-date references in doc comments dev

Tue, 31 Dec 2024 08:49:10 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 31 Dec 2024 08:49:10 -0500
branch
dev
changeset 75
e9f4550cfa18
parent 74
2c76df38d02b
child 76
99ad55974e62

Fix out-of-date references in doc comments

src/bisection_tree/support.rs file | annotate | diff | comparison | revisions
src/instance.rs file | annotate | diff | comparison | revisions
src/mapping.rs file | annotate | diff | comparison | revisions
src/metaprogramming.rs file | annotate | diff | comparison | revisions
src/operator_arithmetic.rs file | annotate | diff | comparison | revisions
src/sets.rs file | annotate | diff | comparison | revisions
--- 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<F : Num, const N : usize> : 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<F, N>) -> 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`]`<F, Bounds<F>>`
-/// [`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<F : Float> : GlobalAnalysis<F, Bounds<F>> {
     /// Return lower and upper bounds for the values of of `self`.
@@ -102,7 +102,7 @@
 
 impl<F : Float, T : GlobalAnalysis<F, Bounds<F>>> Bounded<F> 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<T, F, const N : usize> {
     shift : Loc<F, N>,
@@ -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<T>(
-    /// The base [`Support`] or [`Apply`].
+    /// The base [`Support`] or [`Mapping`].
     pub T
 );
 
@@ -392,7 +392,7 @@
 : MulAssign<F> + DivAssign<F> + Neg<Output=Self> + 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<F, N>;
     /// An iterator over all the [`Support`]s of the generator.
     type AllDataIter<'a> : Iterator<Item=(Self::Id, Self::SupportType)> where Self : 'a;
--- 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<X, &'b X>;
 
 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<X : Space, D = <X as Space>::Decomp> : Sized where D : Decomposition<X> {
     /// Decomposes self according to `decomposer`.
     fn decompose<'b>(self) -> D::Decomposition<'b>
--- 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<Domain : Space> {
     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<X>
--- 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
--- 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<T, C : Constant> {
     /// The weight
     pub weight : C,
-    /// The base [`Support`] or [`Apply`] being weighted.
+    /// The base [`Mapping`] being weighted.
     pub base_fn : T,
 }
 
--- 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<U, F>`].
 #[derive(Clone,Copy,Debug,Serialize,Eq,PartialEq)]
 pub struct Halfspace<A, F> where A : Euclidean<F>, F : Float {
     pub orthogonal : A,

mercurial