Example #1
0
        /// <summary>
        /// Returns the number of inhomogeneous polynomial coefficients for a given dimensionality and rank, including all coefficients of lesser rank.
        /// </summary>
        /// <param name="nDims"><see cref="Poly.Ndims"/>.</param>
        /// <param name="rank"><see cref="Poly.Rank"/>.</param>
        public static int Ncoeff(int nDims, int rank)
        {
            return(Static.Pascal(nDims, rank));

            //				0	1	2	3	4	5	6	7	8	9
            //							Rank of Tensor
            //	0			1	1	1	1	1	1	1	1	1	1
            //	1			1	2	3	4	5	6	7	8	9	10
            //	2	Ndims	1	3	6	10	15	21	28	36	45	55
            //	3	of		1	4	10	20	35	56	84	120	165	220
            //	4	Space	1	5	15	35	70	126	210	330	495	715
            //	5			1	6	21	56	126	252	462	924	1716
        }
Example #2
0
 /// <summary>
 /// Returns the number of inhomogeneous polynomial coefficients for a given dimensionality and rank, not including coefficients of lesser rank.
 /// </summary>
 /// <param name="nDims"><see cref="Poly.Ndims"/>.</param>
 /// <param name="rank"><see cref="Poly.Rank"/>.</param>
 public static int NcoeffAtRank(int nDims, int rank)
 {
     return(Static.Pascal(nDims - 1, rank));
 }