Skip to main content

setup_a

Function setup_a 

Source
pub fn setup_a<const NU: usize, const NV: usize, const NC: usize>(
    b_mat: &MatA<NV, NU>,
    wv: &VecN<NV>,
    wu: &mut VecN<NU>,
    theta: f32,
    cond_bound: f32,
) -> (MatA<NC, NU>, f32)
where Const<NC>: DimName + DimMin<Const<NU>, Output = Const<NU>>, Const<NU>: DimName, Const<NV>: DimName, DefaultAllocator: Allocator<Const<NC>, Const<NU>> + Allocator<Const<NC>, Const<NC>> + Allocator<Const<NU>, Const<NU>> + Allocator<Const<NC>> + Allocator<Const<NU>> + Allocator<Const<NV>>,
Expand description

Convert WLS control allocation to a least-squares problem min ||Au - b||.

wu is normalized in-place by its minimum value (matching the C code). Returns (A, gamma).