/// Returns P * L of LU decomposition.
Returns P * L of LU decomposition.
Returns P * L of LU decomposition .
pub fn into_pl(mut self) -> ArrayBase<S, Ix2> {
        if self.pivots.len() < self.lu.nrows() {
            let next = self.pivots.len();
            self.pivots.extend(next..self.lu.nrows());
        }
        for i in (0..self.pivots.len()).rev() {
            let target = self.pivots[i];
            if i == target {
                continue;
            }
            self.pivots[i] = self.pivots[target];
            self.pivots[target] = i;
        }
        let mut pl = self
            .lu
            .slice_mut(s![.., ..cmp::min(self.lu.nrows(), self.lu.ncols())]);
        let mut dst = 0;
        let mut i = dst;
        loop {
            let src = self.pivots[dst];
            for k in 0..cmp::min(src, pl.ncols()) {
                pl[[dst, k]] = pl[[src, k]];
            }
            if src < pl.ncols() {
                pl[[dst, src]] = A::one();
            }
            for k in src + 1..pl.ncols() {
                pl[[dst, k]] = A::zero();
            }
            self.pivots[dst] = self.pivots.len();
            if self.pivots[src] == self.pivots.len() {
                dst = i + 1;
                while dst < self.pivots.len() && self.pivots[dst] == self.pivots.len() {
                    dst += 1;
                }
                if dst == self.pivots.len() {
                    break;
                }
                i = dst;
            } else {
                dst = src;
            }
        }
        self.lu
    }
pub fn into_pl ( mut self ) -> ArrayBase < S , Ix2 > { if self . pivots . len ( ) < self . lu . nrows ( ) { let next = self . pivots . len ( ) ; self . pivots . extend ( next .. self . lu . nrows ( ) ) ; } for i in ( 0 .. self . pivots . len ( ) ) . rev ( ) { let target = self . pivots [ i ] ; if i == target { continue ; } self . pivots [ i ] = self . pivots [ target ] ; self . pivots [ target ] = i ; } let mut pl = self . lu . slice_mut ( s ! [ cmp min ( self lu nrows ( ) self lu ncols ( ) ) ] ) ; let mut dst = 0 ; let mut i = dst ; loop { let src = self . pivots [ dst ] ; for k in 0 .. cmp :: min ( src , pl . ncols ( ) ) { pl [ [ dst , k ] ] = pl [ [ src , k ] ] ; } if src < pl . ncols ( ) { pl [ [ dst , src ] ] = A :: one ( ) ; } for k in src + 1 .. pl . ncols ( ) { pl [ [ dst , k ] ] = A :: zero ( ) ; } self . pivots [ dst ] = self . pivots . len ( ) ; if self . pivots [ src ] == self . pivots . len ( ) { dst = i + 1 ; while dst < self . pivots . len ( ) && self . pivots [ dst ] == self . pivots . len ( ) { dst += 1 ; } if dst == self . pivots . len ( ) { break ; } i = dst ; } else { dst = src ; } } self . lu }
Returns P * L of LU decomposition.
Returns P * L of LU decomposition .
mut self