return (null); /* check inputs */ n = A.n; S = new Dcss(); /* allocate result S */
/** * Ordering and symbolic analysis for a Cholesky factorization. * * @param order * ordering option (0 or 1) * @param A * column-compressed matrix * @return symbolic analysis for Cholesky, null on error */ public static Dcss cs_schol(int order, Dcs A) { int n, c[], post[], P[]; Dcs C; Dcss S; if (!Dcs_util.CS_CSC(A)) return (null); /* check inputs */ n = A.n; S = new Dcss(); /* allocate result S */ P = Dcs_amd.cs_amd(order, A); /* P = amd(A+A'), or natural */ S.pinv = Dcs_pinv.cs_pinv(P, n); /* find inverse permutation */ if (order != 0 && S.pinv == null) return null; C = Dcs_symperm.cs_symperm(A, S.pinv, false); /* C = spones(triu(A(P,P))) */ S.parent = Dcs_etree.cs_etree(C, false); /* find etree of C */ post = Dcs_post.cs_post(S.parent, n); /* postorder the etree */ c = Dcs_counts.cs_counts(C, S.parent, post, false); /* find column counts of chol(C) */ S.cp = new int[n + 1]; /* allocate result S.cp */ S.unz = S.lnz = Dcs_cumsum.cs_cumsum(S.cp, c, n); /* find column pointers for L */ return ((S.lnz >= 0) ? S : null); } }
/** * Returns a copy of the symbolic Cholesky analysis object * * @return symbolic Cholesky analysis */ public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }
/** * Returns a copy of the symbolic QR analysis object * * @return symbolic QR analysis */ public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }
/** * Returns a copy of the symbolic Cholesky analysis object * * @return symbolic Cholesky analysis */ public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }
/** * Returns a copy of the symbolic QR analysis object * * @return symbolic QR analysis */ public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }
public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }
public Dcss getSymbolicAnalysis() { Dcss S2 = new Dcss(); S2.cp = S.cp != null ? S.cp.clone() : null; S2.leftmost = S.leftmost != null ? S.leftmost.clone() : null; S2.lnz = S.lnz; S2.m2 = S.m2; S2.parent = S.parent != null ? S.parent.clone() : null; S2.pinv = S.pinv != null ? S.pinv.clone() : null; S2.q = S.q != null ? S.q.clone() : null; S2.unz = S.unz; return S2; }