mod proposal

module proposal

Target-free descriptor increments for catalog exploration and exploitation.

Functions

fn attraction_differential(current: &Array1<f64>, anchor: &Array1<f64>, left: &Array1<f64>, right: &Array1<f64>, scale: f64, attraction: f64, maximum_norm: f64) -> Result<CombinedProposal, ProposalError>

Add bounded attraction to an explicit D27 differential increment.

fn catalog_differential<R: Rng + ?Sized>(catalog: &[Array1<f64>], scale: f64, rng: &mut R) -> Result<DifferentialProposal, ProposalError>

Draw p_b and p_c independently with replacement and return D27.

fn farthest_hole<R: Rng + ?Sized>(current: &Array1<f64>, catalog: &[Array1<f64>], samples: usize, rng: &mut R) -> Result<HoleProposal, ProposalError>

Select a seeded unit-sphere candidate farthest from the occupied cloud.

fn pullback_increment(jacobian: ArrayView2<f64>, increment: ArrayView1<f64>, weights: ArrayView1<f64>, reference_coordinates: Option<ArrayView1<f64>>, constraints: &PullbackConstraints, config: PullbackConfig) -> Result<PullbackResult, ProposalError>

Apply D21 while retaining its structured failure at the proposal boundary.

Enums

enum ProposalError

Invalid catalog geometry or proposal parameter.

EmptyCatalog

At least one descriptor is required.

DescriptorDimension

Descriptor vectors must be nonempty and share one dimension.

expected: usize

Required descriptor dimension.

actual: usize

Supplied descriptor dimension.

InvalidDescriptor

Descriptor vectors must contain finite, nonzero values where normalized.

InvalidDifferentialScale

D27 requires a finite scale in (0, 1].

InvalidAttraction

Attraction weight must be finite and nonnegative.

InvalidIncrementBound

Descriptor-increment bound must be finite and nonnegative.

ZeroHoleSamples

Farthest-hole search requires at least one sampled candidate.

Pullback(PullbackError)

D21 rejected or could not solve the Cartesian pullback.

Structs and Unions

struct CombinedProposal

Explicit attraction-plus-differential descriptor increment.

Implementations

impl CombinedProposal

Functions

fn clipped(&self) -> bool

Whether the explicit descriptor-space bound shortened the sum.

fn increment(&self) -> &Array1<f64>

Bounded sum of attraction and differential terms.

struct DifferentialProposal

One D27 increment and the independent catalog draws that produced it.

Implementations

impl DifferentialProposal

Functions

fn increment(&self) -> &Array1<f64>

Requested centered descriptor increment F (p_b - p_c).

fn left_index(&self) -> usize

Index of p_b in the admissible catalog distribution.

fn right_index(&self) -> usize

Index of p_c in the admissible catalog distribution.

struct HoleProposal

Seeded farthest-hole target and its descriptor increment.

Implementations

impl HoleProposal

Functions

fn increment(&self) -> &Array1<f64>

Descriptor increment from the current point to the sampled hole.

fn nearest_catalog_distance(&self) -> f64

Distance from the target to its nearest normalized catalog entry.

fn target(&self) -> &Array1<f64>

Unit-sphere candidate maximizing sampled nearest-catalog distance.