# shrinkage::ProximalDesign

Shrinkage for Rust · 0.3.0

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

```rust
pub trait ProximalDesign
```

A prepared CPU design oracle for proximal gradient. 

Products use the optimization-scale design. Each call operates on complete slices so runtime dispatch stays outside scalar loops. Concrete adapters retain LazyMatrix normalization, native product buffers, and column views. This solver capability does not replace LazyMatrix's matrix traits. 

<a id="associated-types"></a>

## Associated types

<a id="associated-type-Error"></a>

### `Error`

```rust
type Error;
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Backend failure type. 

<a id="methods"></a>

## Methods

<a id="method-forward"></a>

### `forward`

```rust
fn forward(
    &mut self,
    input: &[f64],
    output: &mut [f64]
) -> Result<(), FitError<<Self as ProximalDesign>::Error>>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Write the normalized forward product into reusable output storage. 

<a id="method-forward-documentation-errors"></a>

#### Errors

Reject mismatched dimensions and preserve backend failures. Output is unspecified after an error and must not be consumed. 

<a id="method-into_preprocessing"></a>

### `into_preprocessing`

```rust
fn into_preprocessing(self: Box<Self>) -> Preprocessing
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Consume the prepared design and retain its fitted normalization vectors. 

<a id="method-ncols"></a>

### `ncols`

```rust
fn ncols(&self) -> usize
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Number of coefficients. 

<a id="method-nrows"></a>

### `nrows`

```rust
fn nrows(&self) -> usize
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Number of observations. 

<a id="method-screening_design"></a>

### `screening_design`

```rust
fn screening_design(
    &mut self
) -> Option<&mut dyn ScreeningDesign<Error = <Self as ProximalDesign>::Error>>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Borrow optional normalized-column operations for safe screening. 

Product-only adapters can retain their existing implementation. The solver screens only when the design exposes this capability. 

<a id="method-transpose"></a>

### `transpose`

```rust
fn transpose(
    &mut self,
    input: &[f64],
    output: &mut [f64]
) -> Result<(), FitError<<Self as ProximalDesign>::Error>>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/design.rs>)

Write the normalized transposed product into reusable output storage. 

<a id="method-transpose-documentation-errors"></a>

#### Errors

Reject mismatched dimensions and preserve backend failures. Output is unspecified after an error and must not be consumed.
