# shrinkage::ProximalVector

Shrinkage for Rust · 0.3.0

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

```rust
pub trait ProximalVector: Clone + ElemDivAssign<f64> + DotSlice<f64> + SubScalarAssign<f64> + SumEntries<f64> + ScaledSubSlice<f64>
```

Owned CPU storage for a backend's product vectors. 

Matrix products and normalization remain in LazyMatrix. This capability supplies reusable buffers and bridges native vectors to the slice-based predictor and proximal capabilities. It does not represent device storage. 

LazyMatrix vectors with `VectorOwned<Owned = Self>`, mutable indexed access, and the normalization operations below implement this trait automatically. Indexed access may be strided; it does not require contiguous storage. 

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

## Methods

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

### `get`

```rust
fn get(&self, index: usize) -> f64
```

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

Read an entry in constant time. 

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

### `set`

```rust
fn set(&mut self, index: usize, value: f64)
```

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

Write an entry in constant time. 

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

### `zeros`

```rust
fn zeros(length: usize) -> Self
```

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

Allocate a zero vector of the requested length.
