/// <summary>
        ///   Creates a new Cholesky decomposition directly from
        ///   an already computed left triangular matrix <c>L</c>.
        /// </summary>
        /// <param name="leftTriangular">The left triangular matrix from a Cholesky decomposition.</param>
        ///
        public static JaggedCholeskyDecompositionF FromLeftTriangularMatrix(Single[][] leftTriangular)
        {
            var chol = new JaggedCholeskyDecompositionF();

            chol.n = leftTriangular.Length;
            chol.L = leftTriangular;
            chol.positiveDefinite = true;
            chol.robust           = false;
            chol.D = Vector.Ones <Single>(chol.n);
            return(chol);
        }
 /// <summary>
 ///   Creates a new object that is a copy of the current instance.
 /// </summary>
 /// <returns>
 ///   A new object that is a copy of this instance.
 /// </returns>
 /// 
 public object Clone()
 {
     var clone = new JaggedCholeskyDecompositionF();
     clone.L = L.MemberwiseClone();
     clone.D = (float[])D.Clone();
     clone.destroyed = destroyed;
     clone.dimension = dimension;
     clone.undefined = undefined;
     clone.robust = robust;
     clone.positiveDefinite = positiveDefinite;
     return clone;
 }
        /// <summary>
        ///   Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        ///   A new object that is a copy of this instance.
        /// </returns>
        ///
        public object Clone()
        {
            var clone = new JaggedCholeskyDecompositionF();

            clone.L                = L.MemberwiseClone();
            clone.D                = (Single[])D.Clone();
            clone.destroyed        = destroyed;
            clone.n                = n;
            clone.undefined        = undefined;
            clone.robust           = robust;
            clone.positiveDefinite = positiveDefinite;
            return(clone);
        }
        /// <summary>
        ///   Creates a new Cholesky decomposition directly from
        ///   an already computed left triangular matrix <c>L</c>.
        /// </summary>
        /// <param name="leftTriangular">The left triangular matrix from a Cholesky decomposition.</param>
        /// 
        public static JaggedCholeskyDecompositionF FromLeftTriangularMatrix(float[][] leftTriangular)
        {
            var chol = new JaggedCholeskyDecompositionF();
            chol.dimension = leftTriangular.Length;
            chol.L = leftTriangular;
            chol.positiveDefinite = true;
            chol.robust = false;
            chol.D = new float[chol.dimension];
            for (int i = 0; i < chol.D.Length; i++)
                chol.D[i] = 1;

            return chol;
        }