protected static KLU_symbolic klu_alloc_symbolic(int n, int[] Ap, int[] Ai, KLU_common Common)
	{
		KLU_symbolic Symbolic ;
		int[] P, Q, R ;
		double[] Lnz ;
		int nz, i, j, p, pend ;

		if (Common == null)
		{
			return (null) ;
		}
		Common.status = KLU_OK ;

		/* A is n-by-n, with n > 0.  Ap [0] = 0 and nz = Ap [n] >= 0 required.
		 * Ap [j] <= Ap [j+1] must hold for all j = 0 to n-1.  Row indices in Ai
		 * must be in the range 0 to n-1, and no duplicate entries can be present.
		 * The list of row indices in each column of A need not be sorted.
		 */

		if (n <= 0 || Ap == null || Ai == null)
		{
			/* Ap and Ai must be present, and n must be > 0 */
			Common.status = KLU_INVALID ;
			return (null) ;
		}

		nz = Ap [n] ;
		if (Ap [0] != 0 || nz < 0)
		{
			/* nz must be >= 0 and Ap [0] must equal zero */
			Common.status = KLU_INVALID ;
			return (null) ;
		}

		for (j = 0 ; j < n ; j++)
		{
			if (Ap [j] > Ap [j+1])
			{
				/* column pointers must be non-decreasing */
				Common.status = KLU_INVALID ;
				return (null) ;
			}
		}
		P = klu_malloc_int (n, Common) ;
		if (Common.status < KLU_OK)
		{
			/* out of memory */
			Common.status = KLU_OUT_OF_MEMORY ;
			return (null) ;
		}
		for (i = 0 ; i < n ; i++)
		{
			P [i] = EMPTY ;
		}
		for (j = 0 ; j < n ; j++)
		{
			pend = Ap [j+1] ;
			for (p = Ap [j] ; p < pend ; p++)
			{
				i = Ai [p] ;
				if (i < 0 || i >= n || P [i] == j)
				{
					/* row index out of range, or duplicate entry */
					//klu_free (P, n, Integer.class, Common) ;
					P = null;
					Common.status = KLU_INVALID ;
					return (null) ;
				}
				/* flag row i as appearing in column j */
				P [i] = j ;
			}
		}

		/* ---------------------------------------------------------------------- */
		/* allocate the Symbolic object */
		/* ---------------------------------------------------------------------- */

		try {
			//Symbolic = klu_malloc (KLU_symbolic.class, 1, Common) ;
			Symbolic = new KLU_symbolic();
		} catch (OutOfMemoryError e) {
			/* out of memory */
			//klu_free (P, n, sizeof (int), Common) ;
			P = null;
			Common.status = KLU_OUT_OF_MEMORY ;
			return (null) ;
		}

		Q = klu_malloc_int(n, Common) ;
		R = klu_malloc_int (n+1, Common) ;
		Lnz = klu_malloc_dbl (n, Common) ;

		Symbolic.n = n ;
		Symbolic.nz = nz ;
		Symbolic.P = P ;
		Symbolic.Q = Q ;
		Symbolic.R = R ;
		Symbolic.Lnz = Lnz ;

		if (Common.status < KLU_OK)
		{
			/* out of memory */
			//klu_free_symbolic (Symbolic, Common) ;
			Symbolic = null;
			Common.status = KLU_OUT_OF_MEMORY ;
			return (null) ;
		}

		return (Symbolic) ;
	}
protected static KLU_symbolic klu_alloc_symbolic ( int n , int [ ] Ap , int [ ] Ai , KLU_common Common ) { KLU_symbolic Symbolic ; int [ ] P , Q , R ; double [ ] Lnz ; int nz , i , j , p , pend ; if ( Common == null ) { return ( null ) ; } Common . status = KLU_OK ; if ( n <= 0 || Ap == null || Ai == null ) { Common . status = KLU_INVALID ; return ( null ) ; } nz = Ap [ n ] ; if ( Ap [ 0 ] != 0 || nz < 0 ) { Common . status = KLU_INVALID ; return ( null ) ; } for ( j = 0 ; j < n ; j ++ ) { if ( Ap [ j ] > Ap [ j + 1 ] ) { Common . status = KLU_INVALID ; return ( null ) ; } } P = klu_malloc_int ( n , Common ) ; if ( Common . status < KLU_OK ) { Common . status = KLU_OUT_OF_MEMORY ; return ( null ) ; } for ( i = 0 ; i < n ; i ++ ) { P [ i ] = EMPTY ; } for ( j = 0 ; j < n ; j ++ ) { pend = Ap [ j + 1 ] ; for ( p = Ap [ j ] ; p < pend ; p ++ ) { i = Ai [ p ] ; if ( i < 0 || i >= n || P [ i ] == j ) { P = null ; Common . status = KLU_INVALID ; return ( null ) ; } P [ i ] = j ; } } try { Symbolic = new KLU_symbolic ( ) ; } catch ( OutOfMemoryError e ) { P = null ; Common . status = KLU_OUT_OF_MEMORY ; return ( null ) ; } Q = klu_malloc_int ( n , Common ) ; R = klu_malloc_int ( n + 1 , Common ) ; Lnz = klu_malloc_dbl ( n , Common ) ; Symbolic . n = n ; Symbolic . nz = nz ; Symbolic . P = P ; Symbolic . Q = Q ; Symbolic . R = R ; Symbolic . Lnz = Lnz ; if ( Common . status < KLU_OK ) { Symbolic = null ; Common . status = KLU_OUT_OF_MEMORY ; return ( null ) ; } return ( Symbolic ) ; }
Allocate Symbolic object, and check input matrix.  Not user callable.

@param n
@param Ap
@param Ai
@param Common
@return