orthopolynom/0000755000176000001440000000000012103654120013045 5ustar ripleyusersorthopolynom/MD50000644000176000001440000002520212103654120013356 0ustar ripleyusers49d353d170e4bef2c09ee41718ec8ff3 *DESCRIPTION 5222fbcb3db2a54466c62ae7803c9576 *NAMESPACE 563c13427f35c13c2f0386b0a30f1b9e *R/chebyshev.c.inner.products.R 38f9f1dfbba1af8272df0015a04f6632 *R/chebyshev.c.polynomials.R 86baae12482cf8cb184dc1a40c6ded0f *R/chebyshev.c.recurrences.R 86cfbc3868eaf6c5360c093da4386c6f *R/chebyshev.c.weight.R 896478adb15faa2d04b8d5a0e9d9f166 *R/chebyshev.s.inner.products.R 6af9fe7792c8a3723a0a368111cf3395 *R/chebyshev.s.polynomials.R 502c7530cdf02c29f218a89299067e93 *R/chebyshev.s.recurrences.R c8967c8038ce2c685ca25c30cbc3edeb *R/chebyshev.s.weight.R 0a3439aa463700a9d7ac6a67a8993e0b *R/chebyshev.t.inner.products.R 6253e7140de51681956e7d53a36a598d *R/chebyshev.t.polynomials.R 36f576ba134f776688f1f758b14dd01e *R/chebyshev.t.recurrences.R baaeebf11ab74696f22d7fa4ee78d6af *R/chebyshev.t.weight.R f590263c29d5559abd958c10cb304569 *R/chebyshev.u.inner.products.R 9f1b404cfb1b0152e583d25ae69ecdc8 *R/chebyshev.u.polynomials.R e1b96e1ed766398358984f6af669c4b7 *R/chebyshev.u.recurrences.R e558a83f3c933a213891795f7f7e6e36 *R/chebyshev.u.weight.R 7a8e9321d5b8ac6e43502b3a634e6a7f *R/gegenbauer.inner.products.R 5754cac2fa7e88fea74b67f61729c8f0 *R/gegenbauer.polynomials.R c793a8b33891b288d2d6d5baa2eaa6d7 *R/gegenbauer.recurrences.R 79a5a0e8b274dbf4361166c65e59322d *R/gegenbauer.weight.R 07a22fe16bb97d7538864b8f00adae5d *R/ghermite.h.inner.products.R 50fd91a1fb63c1607f98f2f78253211f *R/ghermite.h.polynomials.R 2de0fad337c510643248538c7d8b0f52 *R/ghermite.h.recurrences.R 7f6d288e4d0edaa47edffd0927d073eb *R/ghermite.h.weight.R 6406e8ff2a4194224e27390726b5e109 *R/glaguerre.inner.products.R 20f98218d732634133bab746b7f35ff5 *R/glaguerre.polynomials.R a3824d8c7179dcf8d6380a273c08277b *R/glaguerre.recurrences.R cb0d6f01a36e27ad79cd9ef8ef203706 *R/glaguerre.weight.R e3f3aaeb09bd7ba49ba1a8775cd084d4 *R/hermite.h.inner.products.R 72a0e30b9b4943e986e02b6d939fa8c9 *R/hermite.h.polynomials.R edf1860ddbab1ee993dc2ab3abbf6d92 *R/hermite.h.recurrences.R 9e35bfa41268e69468953732c9ffa96d *R/hermite.h.weight.R 9f732997aaf65a2e776ae6819a947edf *R/hermite.he.inner.products.R 8984238be516820f13bfea08ab4cc61a *R/hermite.he.polynomials.R 0c33dcef110415abb679bb98dbad8089 *R/hermite.he.recurrences.R 96e0e13049ba50880155aeb18d195616 *R/hermite.he.weight.R 746cd9b30dc20e562e03f31add6aaadb *R/jacobi.g.inner.products.R a09496425f4b88dfc6fa54b0e105bd9c *R/jacobi.g.polynomials.R 1351f08472305d759472228c5e08b71b *R/jacobi.g.recurrences.R 326502c282f53d93660a05f7e1b24c8d *R/jacobi.g.weight.R bf1e0ff49490bd96febccd73ae987181 *R/jacobi.matrices.R 52545881a8e6178cd5a0c4fd0ac8a93f *R/jacobi.p.inner.products.R 6f9a1d936f05fafb7ead0610528f14ed *R/jacobi.p.polynomials.R f13c018f1e5c8664be65a4a9d3319916 *R/jacobi.p.recurrences.R a47f565020d99d02deac6d96694e2823 *R/jacobi.p.weight.R 359997772378eb912a1f4b1d35c7f0f4 *R/laguerre.inner.products.R 985c9ad77c14719423c0569f33e2713b *R/laguerre.polynomials.R 31475d1f30da51049e266c7787631a85 *R/laguerre.recurrences.R 043c29944af846a763053ec3227dd268 *R/laguerre.weight.R ce5d8fc0bf328e2e7afd0b89fc435c1e *R/legendre.inner.products.R 993cf16991ccd10307072ff5528649f3 *R/legendre.polynomials.R 514455ac0cd2d94d9a14b9d6a71393bc *R/legendre.recurrences.R dcc63cad9859bde6107360b2c5f96f67 *R/legendre.weight.R 5db2e231104029eb62e757fda6e09937 *R/lpochhammer.R 2d767e756a6a8491ccd1601dfc018f01 *R/monic.polynomial.recurrences.R 9210eff337459e0ab0572b11071e6e9c *R/monic.polynomials.R 107605b6ac08642972e99da2132164ff *R/orthogonal.polynomials.R 61a8ada86585fc96a889ae9f521cc5af *R/orthonormal.polynomials.R 3fb0f0383d3583ed1ecdb34c4551b3a2 *R/pochhammer.R 6b7b1d798703cf4ebf49033f0d860c58 *R/polynomial.coefficients.R ce5d3ea2be93a8ad1aaea4981387030d *R/polynomial.derivatives.R 4221f1598de58d5659826cb57d29dcd7 *R/polynomial.functions.R b6b717b07f471e7ee270dca9d72c1407 *R/polynomial.integrals.R 6891968fb3922cc43f8d607a835714dd *R/polynomial.orders.R 6ba3663d9941f723c0e397c28b99566b *R/polynomial.powers.R 9b91d09d9327834e77bd83bc0c2b2a17 *R/polynomial.roots.R 99cf582a7a7679ab436c9ff8e4c44908 *R/polynomial.values.R 1c5e7715755b3386d9afc957b2abda8b *R/scaleX.R 18ae71be10ac7af3a6fc31c99def6690 *R/schebyshev.t.inner.products.R 925a4a4170237de0359a8fe91645fdc3 *R/schebyshev.t.polynomials.R 569351f9688cec59b9dabf97ac4bd102 *R/schebyshev.t.recurrences.R c16e4308bdfb2a87f2285fb2f0c6e491 *R/schebyshev.t.weight.R 4127040e68e3ec2f92ff0a8c89911bbe *R/schebyshev.u.inner.products.R ec82dd0efeb741f1750a6dc3417af978 *R/schebyshev.u.polynomials.R e85f7a7640f5d424be28baf426b17e0a *R/schebyshev.u.recurrences.R a8b0be38ed99574de0224e813d358df5 *R/schebyshev.u.weight.R 9697fbaecb015b2665c20a410853cc1a *R/slegendre.inner.products.R 76a75976f17fe4c0c1462b8fb4f239af *R/slegendre.polynomials.R 5d9ad60f48edcb27a7b2a8f792100887 *R/slegendre.recurrences.R 4b67800004110da4d97a5bcf1d747446 *R/slegendre.weight.R fd82d5422a0a5f80e7880126806b84a8 *R/spherical.inner.products.R 0b1bf106f8d60017166a9017a7e6d761 *R/spherical.polynomials.R 68599d2784cf459609ffd19c7f5ea0cc *R/spherical.recurrences.R 3bcbb96635b25ff20b4939d9ac58f958 *R/spherical.weight.R a0848d4d642bcb6459e9198f3adad8a4 *R/ultraspherical.inner.products.R 1581766c0ca77dd7c08750b5a5949ee9 *R/ultraspherical.polynomials.R 372fbb012ca0266bed752855cdd8e9d8 *R/ultraspherical.recurrences.R 069d2c8718537334491145e08839a9a9 *R/ultraspherical.weight.R 61ac6f0db5d61acae582c01e9b4a355d *man/chebyshev.c.inner.products.Rd 9be63762041ac011ee4ca8f7f95bb54a *man/chebyshev.c.polynomials.Rd 1b687e5e956198c3c24db3518ab9b41d *man/chebyshev.c.recurrences.Rd 96102456e71bb127feba11505afeb14e *man/chebyshev.c.weight.Rd 9ce3f8b2f0e6fdc9149f957cf689ea05 *man/chebyshev.s.inner.products.Rd af32e59826fcd4b78fb4dff697c130da *man/chebyshev.s.polynomials.Rd fc05b85c4ea599ba272a9db79c4c27a5 *man/chebyshev.s.recurrences.Rd 584100a6405f5ebea810ab01eca6d3c2 *man/chebyshev.s.weight.Rd fee062445f0ccb69095e381f1d740484 *man/chebyshev.t.inner.products.Rd 18a6f10c3aef0f1169717d28a2a493f5 *man/chebyshev.t.polynomials.Rd 9edc843f5bc4f1d7ec6017892653b8be *man/chebyshev.t.recurrences.Rd 54c9fe15fc1822bf40c7c1d7f3b92a40 *man/chebyshev.t.weight.Rd d3fb02b24c2f62b8038d3ebcbb4f6fb9 *man/chebyshev.u.inner.products.Rd 19ea20f0aa04934ca34a589dff35ec13 *man/chebyshev.u.polynomials.Rd 72fe41559d703aeada9dc681edbd8c88 *man/chebyshev.u.recurrences.Rd 01ec49457f7639eef7d305335892fa71 *man/chebyshev.u.weight.Rd 50b78e1229b4b08a00f5303d7abf6f1e *man/gegenbauer.inner.products.Rd 0993f99c1100242831e603fec3f8768f *man/gegenbauer.polynomials.Rd e7638dd094fe1590c5fe7683e0e6f603 *man/gegenbauer.recurrences.Rd d2c5e74568feaf11411788e18773dada *man/gegenbauer.weight.Rd 2744a1a78be4e5d2f20da62f8c659b36 *man/ghermite.h.inner.products.Rd 682aed93f918e5e4c5edacb04fb34862 *man/ghermite.h.polynomials.Rd 21705a2483a63d18ceca6a086d707b5a *man/ghermite.h.recurrences.Rd 3b696833852f4b6d11939ab5177008be *man/ghermite.h.weight.Rd 145b86447251aac51b6f3c43f42c0591 *man/glaguerre.inner.products.Rd 318fbab956c231c66895151f2186c909 *man/glaguerre.polynomials.Rd 84362891dd04397e7bff5d0f1e1d1177 *man/glaguerre.recurrences.Rd 7462cf40552860a35558e69d5c3f7fe6 *man/glaguerre.weight.Rd f4b2d2d6ffbd97816bfa803b1e1c6223 *man/hermite.h.inner.products.Rd a24e811168af59aad872ff59d84095aa *man/hermite.h.polynomials.Rd 710cd996e80c822ade73a5297ede1269 *man/hermite.h.recurrences.Rd 0df6293932fe648ac6a2c05ab2ed810a *man/hermite.h.weight.Rd ddd0e515e374afe436338df087958547 *man/hermite.he.inner.products.Rd fbef51cbcf1cc14a5f139ed76d54dd78 *man/hermite.he.polynomials.Rd 15918c25059e8bad10abbde93467ae0e *man/hermite.he.recurrences.Rd c8e362a6b0ac5f74505708f29f42e5db *man/hermite.he.weight.Rd 8a48d1e220dca5a09a124777869e43c9 *man/jacobi.g.inner.products.Rd d671cce4f2d5197e249888bc730652cc *man/jacobi.g.polynomials.Rd 14c0e9b6e3fb110f61275bdfdb8b4823 *man/jacobi.g.recurrences.Rd 5d0f4b1afe0d0652880d4bd20d4944c9 *man/jacobi.g.weight.Rd 03585cd10fc66d9f0c82dd0ecdb80afe *man/jacobi.matrices.Rd 8eb792149d68b22689a29688301e4d23 *man/jacobi.p.inner.products.Rd 456bb2889fe63cb8012ac5515493a5a2 *man/jacobi.p.polynomials.Rd 929cec3d0307a34e46f7fb8df539caf0 *man/jacobi.p.recurrences.Rd 1ba7919476e6d3c23c8dd0e6cb6c88d9 *man/jacobi.p.weight.Rd adbd1fde03e22b67dd5ff7d1001b69ee *man/laguerre.inner.products.Rd 73e6471e4ef224d6c2b69578e46de757 *man/laguerre.polynomials.Rd 9cc9958b13c60bdce9bd04517b4afe72 *man/laguerre.recurrences.Rd e1fc66202524330b0b99b63cba31b3ad *man/laguerre.weight.Rd 6008a3a87244efff1c44b2dadfffccb9 *man/legendre.inner.products.Rd 2077fc11159283a2319bd96c5f2cb368 *man/legendre.polynomials.Rd 2856be388bd507809a61b158fc4ff76f *man/legendre.recurrences.Rd edb36f583c6fb8388e242fbfd2824e17 *man/legendre.weight.Rd 4a2e8a7d6127bb485d6c949331283fae *man/lpochhammer.Rd 876c82a8b86766152bc5cc3e3ad7857b *man/monic.polynomial.recurrences.Rd 0d7057d34fb5e55d3fda76ec5be1b093 *man/monic.polynomials.Rd 1f0f591d19fb41df245ef742ca0ed288 *man/orthogonal.polynomials.Rd ebe716921df370cca777cd123adc7531 *man/orthonormal.polynomials.Rd ddea51eb51c98f04028a9ef1269a2d38 *man/pochhammer.Rd 36024b9b5730bc17866dd11197c58a76 *man/polynomial.coefficients.Rd 444c5aac1f1a793c3e326201144e589f *man/polynomial.derivatives.Rd a45479da7d8f150f026720bf2631ce00 *man/polynomial.functions.Rd dd59e7f9e10bfb40f79b0bfb00074512 *man/polynomial.integrals.Rd 1746f41c1f4bfa2cd4456242d9d442a7 *man/polynomial.orders.Rd e32e1fdeb8c50ca3a803026725394622 *man/polynomial.powers.Rd 2e4e65580c13d06c0d5eaebaf51caa1a *man/polynomial.roots.Rd d5d6df1cc71f4054d2b2c346a2198817 *man/polynomial.values.Rd 5b5bf85a4623c4af4e22ae5b62aae909 *man/scaleX.Rd 5eeedaf441dce79ad21eb947b2befc13 *man/schebyshev.t.inner.products.Rd 94b62d6355aed55230f7a8861068cf60 *man/schebyshev.t.polynomials.Rd e6a3283255e1b47f540f2330dd28a1e4 *man/schebyshev.t.recurrences.Rd 7bc3d8b2128cbec73082b6ed7f2e8fa8 *man/schebyshev.t.weight.Rd cce15895aecb2ec7ab8c8bf9d1a7d078 *man/schebyshev.u.inner.products.Rd 49a0ba31419b9c0dd421730280026028 *man/schebyshev.u.polynomials.Rd fbde48f817235d36205d689ca8cb59bb *man/schebyshev.u.recurrences.Rd 1b7d3b845e315593b48a689e90944b51 *man/schebyshev.u.weight.Rd 476d21339b2ac90075bb607c3961d4f7 *man/slegendre.inner.products.Rd 67ace12b660e4937179fbd977034dd42 *man/slegendre.polynomials.Rd c9dbc1332ff79ccbf1e5a9eda303ff2d *man/slegendre.recurrences.Rd 07d46b089e4f6170f96045573f366a73 *man/slegendre.weight.Rd 3b3e920f71ca6bfdaf3b8eacfb6160d5 *man/spherical.inner.products.Rd 47eadbc976277362a466485138d1f7e7 *man/spherical.polynomials.Rd bf23387fdbd8f51662f92111d649ae84 *man/spherical.recurrences.Rd 33cbd51b77b1ea0e8a9601a265bab08e *man/spherical.weight.Rd 08e66e50e0279b8b1de9412383621681 *man/ultraspherical.inner.products.Rd 12ab5f3e33097bb331f19436bec84f54 *man/ultraspherical.polynomials.Rd 836455772bc32dc7b86822ccf2b5bec5 *man/ultraspherical.recurrences.Rd 1e9ef904f7d43cb9c233298822b81d7d *man/ultraspherical.weight.Rd orthopolynom/R/0000755000176000001440000000000012103551444013253 5ustar ripleyusersorthopolynom/R/ultraspherical.weight.R0000644000176000001440000000070112103551444017704 0ustar ripleyusersultraspherical.weight <- function( x, alpha ) { ### ### This function returns the value of the weight function ### for the ultraspherical polynomial, Ck( alpha, x ) ### ### Parameters ### x = the function argument ### alpha = the polynomial parameter ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { log.y <- ( alpha - 0.5 ) * log( 1 - x[i] * x[i] ) y[i] <- exp( log.y ) } return( y ) } orthopolynom/R/ultraspherical.recurrences.R0000644000176000001440000000102312103551444020733 0ustar ripleyusersultraspherical.recurrences <- function( n, alpha, normalized=FALSE ) { ### ### This function returns a data frame with n+1 and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k ultraspherical polynomials, Ck(alpha,x), ### and for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = a boolean value. If true, recurrences are for normalized polynomials ### return( gegenbauer.recurrences( n, alpha, normalized ) ) } orthopolynom/R/ultraspherical.polynomials.R0000644000176000001440000000063012103551444020764 0ustar ripleyusersultraspherical.polynomials <- function( n , alpha, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k ultraspherical polynomials, Ck(alpha,x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### require( polynom ) polynomials <- gegenbauer.polynomials( n, alpha, normalized ) return( polynomials ) } orthopolynom/R/ultraspherical.inner.products.R0000644000176000001440000000062712103551444021401 0ustar ripleyusersultraspherical.inner.products <- function( n, alpha ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k ultraspherical polynomial ### with itself (i.e. norm squared) for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### return( gegenbauer.inner.products( n, alpha ) ) } orthopolynom/R/spherical.weight.R0000644000176000001440000000052112103551444016634 0ustar ripleyusersspherical.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the spherical polynomial, Pk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < +1 ) ) y[i] <- 1 } return( y ) } orthopolynom/R/spherical.recurrences.R0000644000176000001440000000076212103551444017674 0ustar ripleyusersspherical.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k spherical polynomial, Pk(x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### return( legendre.recurrences( n, normalized ) ) } orthopolynom/R/spherical.polynomials.R0000644000176000001440000000064512103551444017722 0ustar ripleyusersspherical.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Spherical polynomials, Pk(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### require( polynom ) return ( legendre.polynomials( n, normalized ) ) } orthopolynom/R/spherical.inner.products.R0000644000176000001440000000054612103551444020331 0ustar ripleyusersspherical.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Spherical polynomial, Pk(x), ### with itself (i.e. the norm squared) for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### return ( legendre.inner.products( n ) ) } orthopolynom/R/slegendre.weight.R0000644000176000001440000000052612103551444016637 0ustar ripleyusersslegendre.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the shifted Legendre polynomial, Pk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > 0 ) && ( x[i] < 1 ) ) y[i] <- 1 } return( y ) } orthopolynom/R/slegendre.recurrences.R0000644000176000001440000000273712103551444017676 0ustar ripleyusersslegendre.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k shifted Legendre polynomial, Pk(x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not an integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- - sqrt( ( 2 * j + 3 ) * ( 2 * j + 1 ) ) r[k,"e"] <- 2 * sqrt( ( 2 * j + 3 ) * ( 2 * j + 1 ) ) if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- j * sqrt( ( 2 * j + 3 ) / ( 2 * j - 1 ) ) } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- -( 2 * j + 1 ) r[k,"e"] <- 4 * j + 2 r[k,"f"] <- j j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/slegendre.polynomials.R0000644000176000001440000000125212103551444017713 0ustar ripleyusersslegendre.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k shifted Legendre polynomials Pk(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- slegendre.recurrences( n, normalized ) if ( normalized ) { h.0 <- 1 p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/slegendre.inner.products.R0000644000176000001440000000115712103551444020326 0ustar ripleyusersslegendre.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k shifted Legendre polynomial, ### Pstar-k(x), with itself( i.e. the norm squared) for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( 0, n + 1 ) j <- 1 for ( k in 0:n ) { inner.products[j] <- 1 / ( 2 * k + 1 ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/schebyshev.u.weight.R0000644000176000001440000000060712103551444017275 0ustar ripleyusersschebyshev.u.weight <- function ( x ) { ### ### This function returns the value of the weight function ### for the shifted Chebyshev polynomial of the second kind, Uk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > 0 ) && ( x[i] < 1 ) ) y[i] <- sqrt( x[i] - x[i] * x[i] ) } return( y ) } orthopolynom/R/schebyshev.u.recurrences.R0000644000176000001440000000242212103551444020323 0ustar ripleyusersschebyshev.u.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k shifted Chebyshev polynomial of the second kind, Uk(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- -2 r[k,"e"] <- 4 if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- 1 } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( -2, np1 ) r$e <- rep( 4, np1 ) r$f <- rep( 1, np1 ) return( r ) } return( NULL ) } orthopolynom/R/schebyshev.u.polynomials.R0000644000176000001440000000131112103551444020345 0ustar ripleyusersschebyshev.u.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k shifted Chebyshev polynomials of the second kind, Uk(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- schebyshev.u.recurrences( n, normalized ) if ( normalized ) { h.0 <- pi / 8 p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/schebyshev.u.inner.products.R0000644000176000001440000000106512103551444020762 0ustar ripleyusersschebyshev.u.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k shifted Chebyshev polynomial ### of the second kind, Ustar-k(x), with itself (i.e. the norm squared) ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( pi / 8, n + 1 ) return( inner.products ) } orthopolynom/R/schebyshev.t.weight.R0000644000176000001440000000061012103551444017266 0ustar ripleyusersschebyshev.t.weight <- function ( x ) { ### ### This function returns the value of the weight function ### for the shifted Chebyshev polynomial of the first kind, Tk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > 0 ) && ( x[i] < 1 ) ) y[i] <- 1 / sqrt( x[i] - x[i] * x[i] ) } return( y ) }orthopolynom/R/schebyshev.t.recurrences.R0000644000176000001440000000310012103551444020314 0ustar ripleyusersschebyshev.t.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k shifted Chebyshev polynomial of the first kind, Tk(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 if ( j == 0 ) { r[k,"d"] <- - sqrt( 2 ) r[k,"e"] <- 2 * sqrt( 2 ) r[k,"f"] <- 0 } else { r[k,"d"] <- -2 r[k,"e"] <- 4 if ( j == 1 ) { r[k,"f"] <- sqrt( 2 ) } else { r[k,"f"] <- 1 } } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( -2, np1 ) r[1,"d"] <- -1 r$e <- rep( 4, np1 ) r[1,"e"] <- 2 r$f <- rep( 1, np1 ) return( r ) } return( NULL ) } orthopolynom/R/schebyshev.t.polynomials.R0000644000176000001440000000133412103551444020351 0ustar ripleyusersschebyshev.t.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k shifted Chebyshev polynomials of the first kind, Tk(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### require( polynom ) recurrences <- schebyshev.t.recurrences( n, normalized ) if ( normalized ) { h.0 <- pi p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/schebyshev.t.inner.products.R0000644000176000001440000000130112103551444020752 0ustar ripleyusersschebyshev.t.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k shifted Chebyshev polynomial ### of the first kind, Tstar-k(x), with itself (i.e. the norm squared) ### for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( 0, n + 1 ) j <- 1 for ( k in 0:n) { if ( k == 0 ) { inner.products[j] <- pi } else { inner.products[j] <- pi / 2 } j <- j + 1 } return( inner.products ) } orthopolynom/R/scaleX.R0000644000176000001440000000575212103551444014626 0ustar ripleyusersscaleX <- function ( x, a=min( x, na.rm=TRUE ), b=max( x, na.rm=TRUE ), u, v ) { ### ### This function returns the values in the vector x that have been mapped ### from the interval [a,b] to the interval [u,v] ### ### Parameters ### x = a numerical vector of values to be mapped ### na.rm = a boolean value that determines what to do with missing values ### a = a numerical value for the lower bound of the domain interval (default is min(x) ) ### b = a numerical value for the upper bound of the domain interval (default is max(x) ) ### u = a numerical value for the lower bound of the target interval ### v = a numerical value for the upper bound of the target interval ### ### ### parameter validation section ### if ( missing( x ) ) stop( "x is missing" ) if ( !is.numeric( x ) ) stop( "x does not contain numerical values" ) if ( !is.vector( x ) ) stop( "x is not a vector" ) if ( !is.numeric( a ) || !is.vector( a ) ) stop( "domain lower bound parameter a must be a numeric value" ) if ( length( a ) > 1 ) stop( "domain lower bound parameter a is not a scalar value" ) if ( !is.numeric( b ) || !is.vector( b ) ) stop( "domain upper bound parameter b must be a numeric value" ) if ( length( b ) > 1 ) stop( "domain upper bound parameter b is not a scalar value" ) if ( a > b ) stop( "domain lower bound a is greater than upper bound b" ) if ( missing( u ) ) stop( "target lower bound parameter u is missing" ) if ( missing( v ) ) stop ( "target upper bound parameter v is missing" ) if ( !is.numeric( u ) || !is.vector( u ) ) stop( "lower bound u must be a numeric value" ) if ( length( u ) > 1 ) stop( "target lower bound parameter u is not a scalar value" ) if ( !is.numeric( v ) || !is.vector( v ) ) stop( "upper bound v must be a numeric value" ) if ( length( v ) > 1 ) stop( "target upper bound parameter v is not a scalar value" ) if ( u > v ) stop( "target lower bound u is greater than upper bound v" ) ### ### default result ### result <- NULL ### ### the target [-Inf,Inf] is unchanged ### if ( ( u == -Inf ) && ( v == Inf ) ) result <- x ### ### the semi-infinite target interval [-Inf,v] is a shift ### if ( ( u == -Inf ) && is.finite( v ) ) result <- x + v - b ### ### the semi-infinite target interval [u,Inf] is a shift ### if ( is.finite( u ) || v == Inf ) result <- x + u - a ### ### the finite target interval requires a shift and scaling ### if ( is.finite( u ) && is.finite( v ) ) result <- u + ((v - u) * (x - a) / (b - a)) ### ### attach the interval attributes to the result ### attr( result, "a" ) <- a attr( result, "b" ) <- b attr( result, "u" ) <- u attr( result, "v" ) <- v return( result ) } orthopolynom/R/polynomial.values.R0000644000176000001440000000111412103551444017054 0ustar ripleyuserspolynomial.values <- function( polynomials, x ) { ### ### This function returns a list with n+1 elements ### containing the values of the order k polynomials ### for orders k=0,1,...,n and for the given argument x ### ### Parameters ### polynomials = a list of polynomial objects ### x = the argument which can be any numeric object ### require( polynom ) n <- length( polynomials ) values <- as.list( rep( NULL, n ) ) j <- 1 while ( j <= n ) { values[[j]] <- predict( polynomials[[j]], x ) j <- j + 1 } return( values ) } orthopolynom/R/polynomial.roots.R0000644000176000001440000000117112103551444016726 0ustar ripleyuserspolynomial.roots <- function( m.r ) { ### ### This function returns a list with n elements ### containing the roots of the order k polynomials ### for orders k=1,...,n using a data frame with ### the monic polynomial recurrence parameters a and b ### ### Parameter ### m.r = monic recurrence data frame with parameters a and b ### matrices <- jacobi.matrices( m.r ) n <- length( matrices ) eigen.list <- lapply( matrices, eigen ) roots <- as.list( rep( NULL, n+1 ) ) j <- 1 while ( j <= n ) { roots[[j+1]] <- eigen.list[[j]]$values j <- j + 1 } return( roots ) } orthopolynom/R/polynomial.powers.R0000644000176000001440000000163212103551444017101 0ustar ripleyuserspolynomial.powers <- function( polynomials ) { ### ### This function returns a list of vectors that define linear combinations ### of the given polynomials equal to powers of the polynomial argument. ### ### Parameters: ### polynomials = a list of polynomial objects in increase polynomial order ### require( polynom ) coefficients <- polynomial.coefficients( polynomials ) np1 <- length( polynomials ) powers <- as.list( rep( NULL, np1 ) ) lambda.matrix <- matrix( 0, nrow=np1, ncol=np1 ) for ( j in 1:np1 ) { lambda <- coefficients[[j]] for ( k in 1:j ) { lambda.matrix[j,k] <- lambda[k] } } alpha.matrix <- solve( lambda.matrix ) for ( j in 1:np1 ) { alpha <- rep( 0, j ) for ( k in 1:j ) { alpha[k] <- alpha.matrix[j,k] } powers[[j]] <- alpha } return( powers ) } orthopolynom/R/polynomial.orders.R0000644000176000001440000000100312103551444017050 0ustar ripleyuserspolynomial.orders <- function( polynomials ) { # ### This function returns a vector with n elements ### containing the orders of the polynomials in the list ### ### Parameter ### polynomials = a list of polynomial objects ### require( polynom ) n <- length( polynomials ) orders <- rep( 0, n ) j <- 1 while ( j <= n ) { coefficients <- as.vector( polynomials[[j]] ) orders[j] <- length( coefficients ) - 1 j <- j + 1 } return ( orders ) } orthopolynom/R/polynomial.integrals.R0000644000176000001440000000101712103551444017547 0ustar ripleyuserspolynomial.integrals <- function( polynomials ) { ### ### This function returns a list with n+1 elements ### containing the integral of the order k polynomials ### for orders k=0,1,...,n from zero to x ### ### Parameter ### polynomials = a list of polynomial objects ### require( polynom ) n <- length( polynomials ) integrals <- as.list( rep( NULL, n ) ) j <- 1 while ( j <= n ) { integrals[[j]] <- integral( polynomials[[j]] ) j <- j + 1 } return( integrals ) } orthopolynom/R/polynomial.functions.R0000644000176000001440000000073612103551444017576 0ustar ripleyuserspolynomial.functions <- function( polynomials, ... ) { ### ### this function returns a list of functions one for each of the ### polynomials in the arguments ### ### Parameters ### polynomials = a list of polynomial objects ### ... = further arguments to be passed to or from methods ### functions <- list() n <- length( polynomials ) for ( j in 1:n ) { functions[[j]] <- as.function( polynomials[[j]], ... ) } return( functions ) } orthopolynom/R/polynomial.derivatives.R0000644000176000001440000000101012103551444020075 0ustar ripleyuserspolynomial.derivatives <- function( polynomials ) { ### ### This function returns a list with n+1 elements ### containing the derivatives of the order k polynomials ### for orders k=0,1,...,n ### ### Parameter ### polynomials = a list of polynomial objects ### require( polynom ) n <- length( polynomials ) derivatives <- as.list( rep( NULL, n ) ) j <- 1 while ( j <= n ) { derivatives[[j]] <- deriv( polynomials[[j]] ) j <- j + 1 } return( derivatives ) } orthopolynom/R/polynomial.coefficients.R0000644000176000001440000000077112103551444020226 0ustar ripleyuserspolynomial.coefficients <- function( polynomials ) { # ### This function returns a list with n elements ### containing the vector of coefficients for the polynomials ### ### Parameter ### polynomials = a list of polynomial objects ### require( polynom ) n <- length( polynomials ) coefficients <- as.list( rep( NULL, n ) ) j <- 1 while ( j <= n ) { coefficients[[j]] <- as.vector( polynomials[[j]] ) j <- j + 1 } return ( coefficients ) } orthopolynom/R/pochhammer.R0000644000176000001440000000074212103551444015524 0ustar ripleyuserspochhammer <- function( z, n ) { ### ### This function returns the value of Pochhammer's symbol ### calculated as ( z ) * ( z + 1 ) * ... * ( z + n - 1 ) ### ### Parameters ### z = the argument of the symbol ### n = integer number of terms in the product ### if ( n < 0 ) stop( "n is negative" ) else if ( n == 0 ) return ( 1 ) else { result <- 1 for ( i in 1:n ) { result <- result * ( z + i - 1 ) } return ( result ) } return ( NULL ) } orthopolynom/R/orthonormal.polynomials.R0000644000176000001440000000213412103551444020307 0ustar ripleyusersorthonormal.polynomials <- function( recurrences, p.0 ) { ### ### This function returns a list with n+1 elements ### containing the order orthonormal polynomials for orders k=0,1,...,n ### ### Parameter ### recurrences = a data frame containing the parameters c, d, e and f ### p.0 = a polynomial object for the order 0 orthonormal polynomial ### require( polynom ) np1 <- nrow( recurrences ) n <- np1 - 1 c <- recurrences$c d <- recurrences$d e <- recurrences$e f <- recurrences$f polynomials <- as.list( rep( NULL, np1 ) ) polynomials[[1]] <- p.0 j <- 0 while ( j < n ) { cj <- c[j+1] dj <- d[j+1] ej <- e[j+1] fj <- f[j+1] monomial <- polynomial( c( dj, ej ) ) if ( j == 0 ) { p.jp1 <- ( monomial * p.0 ) / cj } else { p.jm1 <- polynomials[[j]] p.j <- polynomials[[j+1]] p.jp1 <- ( monomial * p.j - fj * p.jm1 ) / cj } polynomials[[j+2]] <- p.jp1 j <- j + 1 } return( polynomials ) } orthopolynom/R/orthogonal.polynomials.R0000644000176000001440000000205612103551444020122 0ustar ripleyusersorthogonal.polynomials <- function( recurrences ) { ### ### This function returns a list with n+1 elements ### containing the order orthogonal polynomials for orders k=0,1,...,n ### ### Parameter ### recurrences = a data frame containing the parameters c, d, e and f ### require( polynom ) np1 <- nrow( recurrences ) n <- np1 - 1 c <- recurrences$c d <- recurrences$d e <- recurrences$e f <- recurrences$f polynomials <- as.list( rep( NULL, np1 ) ) p.0 <- polynomial( c(1) ) polynomials[[1]] <- p.0 j <- 0 while ( j < n ) { cj <- c[j+1] dj <- d[j+1] ej <- e[j+1] fj <- f[j+1] monomial <- polynomial( c( dj, ej ) ) if ( j == 0 ) { p.jp1 <- ( monomial * p.0 ) / cj } else { p.jm1 <- polynomials[[j]] p.j <- polynomials[[j+1]] p.jp1 <- ( monomial * p.j - fj * p.jm1 ) / cj } polynomials[[j+2]] <- p.jp1 j <- j + 1 } return( polynomials ) } orthopolynom/R/monic.polynomials.R0000644000176000001440000000151312103551444017050 0ustar ripleyusersmonic.polynomials <- function( monic.recurrences ) { ### ### This function returns a list with n+1 elements ### containing the order k monic polynomials for orders k=0,1,...,n ### ### Parameter ### monic.recurrences = a data frame containing the parameters a and b ### require( polynom ) np1 <- nrow( monic.recurrences ) n <- np1 - 1 polynomials <- as.list( rep( NULL, np1 ) ) p.0 <- polynomial( c(1) ) polynomials[[1]] <- p.0 a <- monic.recurrences$a b <- monic.recurrences$b j <- 0 while( j < n ) { aj <- a[j+1] bj <- b[j+1] monomial <- polynomial( c( -aj, 1 ) ) if ( j == 0 ) { p.jp1 <- monomial } else { p.jm1 <- polynomials[[j]] p.j <- polynomials[[j+1]] p.jp1 <- monomial * p.j - bj * p.jm1 } polynomials[[j+2]] <- p.jp1 j <- j + 1 } return( polynomials ) } orthopolynom/R/monic.polynomial.recurrences.R0000644000176000001440000000223112103551444021202 0ustar ripleyusersmonic.polynomial.recurrences <- function( recurrences ) { ### ### This function returns a data frame with parameters ### required to construct monic orthogonal polynomials ### based on the standard recurrence relation for ### the non-monic polynomials ### ### Parameter ### recurrences = the data frame of recurrence parameters c, d, e and f ### np1 <- nrow( recurrences ) n <- np1 - 1 monic.recurrences <- data.frame( matrix( nrow=np1, ncol=2 ) ) names( monic.recurrences ) <- c( "a", "b" ) c <- recurrences$c d <- recurrences$d e <- recurrences$e f <- recurrences$f j <- 0 k <- 1 while( j <= n ) { if ( e[k] == 0 ) monic.recurrences[k,"a"] <- 0 else monic.recurrences[k,"a"] <- - ( d[k] / e[k] ) if ( j == 0 ) monic.recurrences[k,"b"] <- 0 else { if ( e[k-1] == 0 || e[k] == 0 ) monic.recurrences[k,"b"] <- 0 else monic.recurrences[k,"b"] <- ( c[k-1] * f[k] ) / ( e[k-1] * e[k] ) } j <- j + 1 k <- k + 1 } return( monic.recurrences ) } orthopolynom/R/lpochhammer.R0000644000176000001440000000055512103551444015702 0ustar ripleyuserslpochhammer <- function( z, n ) { ### ### This function returns the logarithm of Pochhammer's symbol ### ### Parameters ### z = the argument of the symbol ### n = integer number of terms in the symbol ### if ( n < 0 ) stop( "n is negative" ) else if ( n == 0 ) return ( 1 ) else return ( lgamma( z + n ) - lgamma( z ) ) return ( NULL ) } orthopolynom/R/legendre.weight.R0000644000176000001440000000051712103551444016454 0ustar ripleyuserslegendre.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Legendre polynomial, Pk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < +1 ) ) y[i] <- 1 } return( y ) } orthopolynom/R/legendre.recurrences.R0000644000176000001440000000263512103551444017510 0ustar ripleyuserslegendre.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Legendre polynomial, Pk(x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not an integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 0 r[k,"e"] <- sqrt( ( 2 * j + 1 ) * ( 2 * j + 3 ) ) if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- j * sqrt( ( 2 * j + 3 ) / ( 2 * j - 1 ) ) } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 0 r[k,"e"] <- 2 * j + 1 r[k,"f"] <- j j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/legendre.polynomials.R0000644000176000001440000000124312103551444017530 0ustar ripleyuserslegendre.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Legendre polynomials Pk(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- legendre.recurrences( n, normalized ) if ( normalized ) { h.0 <- 2 p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/legendre.inner.products.R0000644000176000001440000000113712103551444020141 0ustar ripleyuserslegendre.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Legendre polynomial, Pk(x), ### with itself (i.e. the norm squared) for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( 0, n + 1 ) j <- 1 for ( k in 0:n ) { inner.products[j] <- 2 / ( 2 * k + 1 ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/laguerre.weight.R0000644000176000001440000000047612103551444016501 0ustar ripleyuserslaguerre.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Laguerre polynomial, Lk( x ) ### ### Parameter ### x = function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( x[i] > 0 ) y[i] <- exp(-x[i]) } return( y ) } orthopolynom/R/laguerre.recurrences.R0000644000176000001440000000076512103551444017533 0ustar ripleyuserslaguerre.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Laguerre polynomials, Lk(x), ### and for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = a boolean value. If true, recurrences are for normalized polynomials ### return( glaguerre.recurrences( n, 0, normalized ) ) } orthopolynom/R/laguerre.polynomials.R0000644000176000001440000000055312103551444017554 0ustar ripleyuserslaguerre.polynomials <- function( n , normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Laguerre polynomials, Lk(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### polynomials <- glaguerre.polynomials( n, 0, normalized ) return( polynomials ) } orthopolynom/R/laguerre.inner.products.R0000644000176000001440000000054512103551444020164 0ustar ripleyuserslaguerre.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of order k Laguerre polynomials, Lk(x), ### with itself (i.e. the norm squared) for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### return( glaguerre.inner.products( n, 0 ) ) } orthopolynom/R/jacobi.p.weight.R0000644000176000001440000000142612103551444016354 0ustar ripleyusersjacobi.p.weight <- function( x, alpha, beta ) { ### ### This function returns the value of the weight function ### for the Jacobi polynomial, Pk( alpha, beta, x ) ### ### Parameters ### x = the function argument ### alpha = the first polynomial parameter ### beta = the second polynomial parameter ### if ( alpha < -1 ) stop( "argument alpha is less than -1" ) if ( beta < -1 ) stop( "argument beta is less than =1" ) if ( ( abs( alpha ) < 1e-6 ) & ( abs( beta ) < 1e-6 ) ) return( legendre.weight( x ) ) n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < +1 ) ) { y[i] <- ( ( 1 - x[i] ) ^ alpha ) * ( ( 1 + x[i] ) ^ beta ) } } return ( y ) } orthopolynom/R/jacobi.p.recurrences.R0000644000176000001440000000753612103551444017415 0ustar ripleyusersjacobi.p.recurrences <- function( n, alpha, beta, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coeffieicnts c, d, e and f of the recurrence relations ### for the order k Jacobi polynomial, Pk(alpha,beta,x), ### and for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### alpha = first polynomial parameter ### beta = second polynomial parameter ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( ( abs( alpha ) < 1e-6 ) & ( abs( beta ) < 1e-6 ) ) return( legendre.recurrences( n, normalized ) ) if ( abs( alpha - beta ) < 1e-6 ) { alpha.prime <- alpha + 0.5 return( gegenbauer.recurrences( n, alpha.prime, normalized ) ) } if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( alpha <= -1 ) stop( "alpha less than or equal to -1" ) if ( beta <= -1 ) stop( "beta less than or equal to -1" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 ab <- alpha + beta ab.zero <- abs( alpha + beta ) < 1e-6 aabb <- alpha * alpha - beta * beta if ( normalized ) { norms <- sqrt( jacobi.p.inner.products( n+1, alpha, beta ) ) while ( j <= n ) { c <- 2 * ( j + 1 ) * ( j + ab + 1 ) * ( 2 * j + ab ) d <- ( 2 * j + ab + 1 ) * aabb e <- pochhammer( 2 * j + ab, 3 ) f <- 2 * ( j + alpha ) * ( j + beta ) * ( 2 * j + ab + 2 ) if ( ab.zero && j == 0 ) { c <- 1 d <- alpha e <- 1 f <- 0 } if ( j == 0 ) { rho.j <- sqrt( ( ab + 3 ) / ( ( alpha + 1 ) * ( beta + 1 ) ) ) } else { num <- ( j + 1 ) * ( 2 * j + ab + 3 ) * ( j + ab + 1 ) den <- ( j + alpha + 1 ) * ( j + beta + 1 ) * ( 2 * j + ab + 1 ) rho.j <- sqrt( num / den ) } # rho.j <- norms[k] / norms[k+1] r[k,"c"] <- c r[k,"d"] <- d * rho.j r[k,"e"] <- e * rho.j if ( j == 0 ) { rho.jm1 <- 0 } else { if ( j == 1 ) { num <- 2 * ( ab + 5 ) * ( ab + 2 ) den <- (alpha + 1 ) * ( alpha + 2 ) * ( beta + 1 ) * ( beta + 2 ) rho.jm1 <- sqrt( num / den ) } else { num <- j * ( j + 1 ) * ( 2 * j + ab + 3 ) * gamma( j + ab + 2 ) den <- ( 2 * j + ab - 1 ) * gamma( j + ab ) * ( j + alpha + 1 ) * ( j + beta + 1 ) * ( j + alpha ) * ( j + beta ) rho.jm1 <- sqrt( num / den ) } } # rho.jm1 <- norms[k-1] / norms[k+1] r[k,"f"] <- f * rho.jm1 j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { c <- 2 * ( j + 1 ) * ( j + ab + 1 ) * ( 2 * j + ab ) d <- ( 2 * j + ab + 1 ) * aabb e <- pochhammer( 2 * j + ab, 3 ) f <- 2 * ( j + alpha ) * ( j + beta ) * ( 2 * j + ab + 2 ) if ( ab.zero && j == 0) { c <- 1 d <- alpha e <- 1 f <- 0 } r[k,"c"] <- c r[k,"d"] <- d r[k,"e"] <- e r[k,"f"] <- f j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/jacobi.p.polynomials.R0000644000176000001440000000232612103551444017433 0ustar ripleyusersjacobi.p.polynomials <- function( n, alpha, beta, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Jacobi polynomials Pk(a,b,x) ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### alpha = first polynomial parameter ### beta = second polynomial parameter ### normalized = boolean value. if true, the polynomials are normalized ### if ( ( abs( alpha ) < 1e-6 ) & ( abs( beta ) < 1e-6 ) ) return( legendre.polynomials( n, normalized ) ) if ( abs( alpha - beta ) < 1e-6 ) { alpha.prime <- alpha + 0.5 return( gegenbauer.polynomials( n, alpha.prime, normalized ) ) } recurrences <- jacobi.p.recurrences( n, alpha, beta, normalized ) if ( normalized ) { ap1 <- alpha + 1 bp1 <- beta + 1 abp1 <- alpha + beta + 1 abp2 <- alpha + beta + 2 h.0 <- ( 2 ^ abp1 ) * gamma( ap1 ) * gamma( bp1 ) / gamma( abp2 ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/jacobi.p.inner.products.R0000644000176000001440000000246612103551444020047 0ustar ripleyusersjacobi.p.inner.products <- function( n, alpha, beta ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Jacobi polynomial ### Pk(alpha,beta,x) for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### a = first parameter ### b = second parameter ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( alpha <= -1 ) stop( "alpha less than or equal to -1" ) if ( beta <= -1 ) stop( "beta less than or equal to -1" ) if ( ( abs( alpha ) < 1e-6 ) & ( abs( beta ) < 1e-6 ) ) return( legendre.inner.products( n ) ) if ( abs( alpha - beta ) < 1e-6 ) { alpha.prime <- alpha + 0.5 return( gegenbauer.inner.products( n, alpha.prime ) ) } ab <- alpha + beta abp1 <- alpha + beta + 1 ap1 <- alpha + 1 bp1 <- beta + 1 coef <- 2 ^ abp1 inner.products <- rep( 1, n + 1 ) j <- 1 for ( k in 0:n ) { num <- coef * gamma( k + ap1 ) * gamma( k + bp1 ) den <- ( 2 * k + abp1 ) * factorial( k ) * gamma( k + abp1 ) inner.products[j] <- num / den j <- j + 1 } return( inner.products ) } orthopolynom/R/jacobi.matrices.R0000644000176000001440000000121612103551444016433 0ustar ripleyusersjacobi.matrices <- function( r ) { ### ### This function returns a list of n real symmetric matrices ### which are the principal minors of the n by n Jacobi matrix ### derived from the the monic recurrence parameters, a and b. ### ### Parameter ### r = a data frame containing the parameters a and b ### a <- r$a sqrt.b <- sqrt( r$b ) np1 <- nrow( r ) n <- np1 - 1 A <- diag( a[1:n] ) for ( i in 2:n ) { A[i,i-1] <- sqrt.b[i] A[i-1,i] <- sqrt.b[i] } matrices <- as.list( rep( NULL, n ) ) for ( j in 1:n ) { matrices[[j]] <- A[1:j,1:j] } return( matrices ) } orthopolynom/R/jacobi.g.weight.R0000644000176000001440000000106212103551444016337 0ustar ripleyusersjacobi.g.weight <- function( x, p, q ) { ### ### This function returns the value of the weight function ### for the Jacobi polynomial, Gk( p, q, x ) ### ### Parameters ### x = the function argument ### p = the first polynomial parameter ### q = the second polynomial parameter ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > 0 ) && ( x[i] < 1 ) ) { t1 <- ( 1 - x[i] ) ^ ( p - q ) t2 <- ( x[i] ) ^ ( q - 1 ) y[i] <- t1 * t2 } } return( y ) } orthopolynom/R/jacobi.g.recurrences.R0000644000176000001440000001375312103551444017402 0ustar ripleyusersjacobi.g.recurrences <- function( n, p, q, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Jacobi polynomial, Gk(p,q,x), ### and for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### p = first polynomial parameter ### q = second polynomial parameter ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( ( p - q ) <= -1 ) stop( "p minus q less than or equal to -1" ) if ( q <= 0 ) stop( "q less than or equal to 0" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) ### ### special case where p = 0 ### if ( abs( p ) < 1e-6 ) { if ( normalized ) { norms <- sqrt( jacobi.g.inner.products( n + 1, p, q ) ) ### ### j = 0 ### c <- 1 d <- - q e <- 1 f <- 0 rho.j <- sqrt( 2 / ( q * ( 1 - q ) ) ) r[1,"c"] <- c r[1,"d"] <- d * rho.j r[1,"e"] <- e * rho.j r[1,"f"] <- 0 ### ### j = 1 ### c <- 1 d <- ( q - 2 ) / 3 e <- 1 f <- - q * ( q - 1 ) / 2 rho.j <- 6 / sqrt( ( 1 + q ) * ( 2 - q ) ) rho.jm1 <- 6 * sqrt( 2 / ( q * ( 2 - q ) * ( 1 - q * q ) ) ) r[2,"c"] <- c r[2,"d"] <- d * rho.j r[2,"e"] <- e * rho.j r[2,"f"] <- f * rho.jm1 ### ### j > 1 ### j <- 2 k <- 3 while ( j <= n ) { c <- pochhammer( 2 * j - 2, 4 ) * ( 2 * j - 1 ) d <- -( 2 * j * ( j ) + q * ( - 1 ) ) * pochhammer(2 * j - 2, 3 ) e <- pochhammer( 2 * j - 2, 4 ) * ( 2 * j - 1 ) f <- j * ( j + q - 1 ) * ( j - 1 ) * ( j - q ) * ( 2 * j + 1 ) rho.j <- norms[k] / norms[k+1] rho.jm1 <- norms[k-1] / norms[k+1] r[k,"c"] <- c r[k,"d"] <- d * rho.j r[k,"e"] <- e * rho.j r[k,"f"] <- f * rho.jm1 j <- j + 1 k <- k + 1 } # end while return( r ) } # end if normalized else { ### ### j = 0 ### c <- 1 d <- - q e <- 1 f <- 0 r[1,"c"] <- c r[1,"d"] <- d r[1,"e"] <- e r[1,"f"] <- 0 ### ### j = 1 ### c <- 1 d <- ( q - 2 ) / 3 e <- 1 f <- - q * ( q - 1 ) / 2 r[2,"c"] <- c r[2,"d"] <- d r[2,"e"] <- e r[2,"f"] <- f ### ### j > 1 ### j <- 2 k <- 3 while ( j <= n ) { c <- pochhammer( 2 * j - 2, 4 ) * ( 2 * j - 1 ) d <- -( 2 * j * ( j ) + q * ( - 1 ) ) * pochhammer(2 * j - 2, 3 ) e <- pochhammer( 2 * j - 2, 4 ) * ( 2 * j - 1 ) f <- j * ( j + q - 1 ) * ( j - 1 ) * ( j - q ) * ( 2 * j + 1 ) r[k,"c"] <- c r[k,"d"] <- d r[k,"e"] <- e r[k,"f"] <- f j <- j + 1 k <- k + 1 } # end while return( r ) } # end else } # end if abs( p ) ### ### general case ### j <- 0 k <- 1 if ( normalized ) { norms <- sqrt( jacobi.g.inner.products( n + 1, p, q ) ) while ( j <= n ) { if ( j == 0 ) { c <- 1 d <- - q / ( p + 1 ) e <- 1 f <- 0 } else { c <- pochhammer( 2 * j + p - 2, 4 ) * ( 2 * j + p - 1 ) d <- -( 2 * j * ( j + p ) + q * ( p - 1 ) ) * pochhammer(2 * j + p - 2, 3 ) e <- pochhammer( 2 * j + p - 2, 4 ) * ( 2 * j + p - 1 ) f <- j * ( j + q - 1 ) * ( j + p - 1 ) * ( j + p - q ) * ( 2 * j + p + 1 ) } rho.j <- norms[k] / norms[k+1] r[k,"c"] <- c r[k,"d"] <- d * rho.j r[k,"e"] <- e * rho.j if ( j == 0 ) r[k,"f"] <- 0 else { if ( k == 1 ) r[k,"f"] <- 0 else { rho.jm1 <- norms[k-1] / norms[k+1] r[k,"f"] <- f * rho.jm1 } } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { if ( j == 0 ) { c <- 1 d <- - q / ( p + 1 ) e <- 1 f <- 0 } else { c <- pochhammer( 2 * j + p - 2, 4 ) * ( 2 * j + p - 1 ) d <- -( 2 * j * ( j + p ) + q * ( p - 1 ) ) * pochhammer(2 * j + p - 2, 3 ) e <- pochhammer( 2 * j + p - 2, 4 ) * ( 2 * j + p - 1 ) f <- j * ( j + q - 1 ) * ( j + p - 1 ) * ( j + p - q ) * ( 2 * j + p + 1 ) } r[k,"c"] <- c r[k,"d"] <- d r[k,"e"] <- e r[k,"f"] <- f j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/jacobi.g.polynomials.R0000644000176000001440000000146512103551444017425 0ustar ripleyusersjacobi.g.polynomials <- function( n, p, q, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Jacobi polynomials Gk(p,q,x) ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### p = first polynomial parameter ### q = second polynomial parameter ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- jacobi.g.recurrences( n, p, q, normalized ) if ( normalized ) { h.0 <- gamma( q ) * gamma( p - q + 1 ) / gamma( p + 1 ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/jacobi.g.inner.products.R0000644000176000001440000000205612103551444020031 0ustar ripleyusersjacobi.g.inner.products <- function( n, p, q ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Jacobi polynomial ### Gk(p,q,x) with itself (i.e. norm squared) for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### p = first parameter ### q = second parameter ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( ( p - q ) <= -1 ) stop( "p minus q less than or equal to -1" ) if ( q <= 0 ) stop( "q less than or equal to 0" ) inner.products <- rep( 1, n + 1 ) pmq <- p - q inner.products[1] <- gamma( q ) * gamma( pmq + 1 ) / gamma( p + 1 ) j <- 2 for ( k in 1:n ) { num <- factorial( k ) * gamma( k + q ) * gamma( k + p ) * gamma( k + pmq + 1 ) den <- ( 2 * k + p ) * ( gamma( 2 * k + p ) ^ 2 ) inner.products[j] <- num / den j <- j + 1 } return( inner.products ) } orthopolynom/R/hermite.he.weight.R0000644000176000001440000000037012103551444016714 0ustar ripleyusershermite.he.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the scaled Hermite polynomial, He-k( x ) ### ### Parameter ### x = function argument ### return( exp( -0.5 * ( x * x ) ) ) } orthopolynom/R/hermite.he.recurrences.R0000644000176000001440000000302212103551444017742 0ustar ripleyusershermite.he.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k scaled Hermite polynomial, He-k(x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not an integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 1 / sqrt( j + 1 ) if ( j == 0 ) { r[k,"f"] <- 0 } else { if ( k == 1 ) { r[k,"f"] <- 0 } else { r[k,"f"] <- sqrt( j / ( j + 1 ) ) } } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 1 r[k,"f"] <- j j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/hermite.he.polynomials.R0000644000176000001440000000127412103551444017777 0ustar ripleyusershermite.he.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k scaled Hermite polynomials, He-k(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = a boolean value. if true, the polynomials are normalized ### recurrences <- hermite.he.recurrences( n, normalized ) if ( normalized ) { h.0 <- sqrt( 2 * pi ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/hermite.he.inner.products.R0000644000176000001440000000126112103551444020402 0ustar ripleyusershermite.he.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Hermite polynomial, Hk(x), ### with itself (i.e. the norm squared) for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( 1, n + 1 ) coef <- sqrt( 2 * pi ) j <- 1 for ( k in 0:n ) { inner.products[j] <- coef * factorial( k ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/hermite.h.weight.R0000644000176000001440000000035112103551444016546 0ustar ripleyusershermite.h.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Hermite polynomial, Hk( x ) ### ### Parameter ### x = function argument ### return( exp( - ( x * x ) ) ) } orthopolynom/R/hermite.h.recurrences.R0000644000176000001440000000302012103551444017573 0ustar ripleyusershermite.h.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Hermite polynomial, Hk(x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not an integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- sqrt( 2 / ( j + 1 ) ) if ( j == 0 ) { r[k,"f"] <- 0 } else { if ( k == 1 ) { r[k,"f"] <- 0 } else { r[k,"f"] <- sqrt( j / ( j + 1 ) ) } } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 2 r[k,"f"] <- 2 * j j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/hermite.h.polynomials.R0000644000176000001440000000130312103551444017623 0ustar ripleyusershermite.h.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Hermite polynomials, Hk(x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### normalized = a boolean value. if true, the polynomials are normalized ### recurrences <- hermite.h.recurrences( n, normalized ) if ( normalized ) { h.0 <- sqrt( pi ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) return( NULL ) } orthopolynom/R/hermite.h.inner.products.R0000644000176000001440000000127012103551444020235 0ustar ripleyusershermite.h.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Hermite polynomial, Hk(x), ### with itself (i.e. the norm squared) for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( 1, n + 1 ) coef <- sqrt( pi ) j <- 1 for ( k in 0:n ) { inner.products[j] <- coef * ( 2 ^ k ) * factorial( k ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/glaguerre.weight.R0000644000176000001440000000061512103551444016643 0ustar ripleyusersglaguerre.weight <- function( x, alpha ) { ### ### This function returns the value of the weight function ### for the generalized Laguerre polynomial, Lk( x, alpha ) ### ### Parameters ### x = function argument ### alpha = polynomial argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( x[i] > 0 ) y[i] <- exp(-x[i]) * (x[i] ^ alpha ) } return( y ) } orthopolynom/R/glaguerre.recurrences.R0000644000176000001440000000317112103551444017674 0ustar ripleyusersglaguerre.recurrences <- function( n, alpha, normalized=FALSE ) { ### ### This function returns a data frame with n+1 and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k generalized Laguerre polynomials, Lk(alpha,x), ### and for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### normalized = a boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( alpha <= -1 ) stop( "alpha less than or equal to -1" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- j + 1 rho.j <- sqrt( ( j + 1 ) / ( alpha + j + 1 ) ) r[k,"d"] <- ( 2 * j + alpha + 1 ) * rho.j r[k,"e"] <- - rho.j if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- sqrt( j * ( j + 1 ) * ( j + alpha ) / (alpha + j + 1 ) ) } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 2 * j + alpha + 1 r[k,"e"] <- -1 r[k,"f"] <- j + alpha j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/glaguerre.polynomials.R0000644000176000001440000000136412103551444017724 0ustar ripleyusersglaguerre.polynomials <- function( n, alpha, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k generalized Laguerre polynomial Lk(alpha,x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- glaguerre.recurrences( n, alpha, normalized ) if ( normalized ) { h.0 <- gamma( alpha + 1 ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/glaguerre.inner.products.R0000644000176000001440000000137412103551444020334 0ustar ripleyusersglaguerre.inner.products <- function( n, alpha ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k generalized Laguerre polynomial, ### Lk(alpha,x ) with itself (i.e. the norm squared) for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### alpha = polynomial parameter ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( alpha <= -1 ) stop( "alpha less than or equal to -1" ) inner.products <- rep( 0, n + 1 ) j = 1; for ( k in 0:n ) { inner.products[j] <- exp( lgamma( alpha + k + 1 ) - lfactorial( k ) ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/ghermite.h.weight.R0000644000176000001440000000134212103551444016716 0ustar ripleyusersghermite.h.weight <- function( x, mu ) { ### ### This function returns the value of the weight function for ### the generalized Hermite polynomial, Hk(mu,x) ### ### Parameters ### x = a numeric vector function argument ### mu = the polynomial parameter ### if ( !is.vector( x ) ) stop( "function argument is not a vector" ) if ( mu <= -0.5 ) stop( "parameter mu is less than or equal to -0.5" ) if ( mu == 0 ) return( hermite.h.weight( x ) ) n <- length( x ) w <- rep( 0, n ) mu.times.2 <- 2 * mu for ( i in 1:n ) { abs.x.i <- abs( x[i] ) x.i.sq <- x[i] * x[i] w[i] <- ( abs.x.i ^ mu.times.2 ) * exp( - x.i.sq ) } return( w ) } orthopolynom/R/ghermite.h.recurrences.R0000644000176000001440000000443612103551444017756 0ustar ripleyusersghermite.h.recurrences <- function( n, mu, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k generalized Hermite polynomial, Hk(mu,x), and orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### mu = polynomial parameter ### normalized = a boolean value. if true, the recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not an integer" ) if ( mu <= -0.5 ) stop( "parameter mu is less than or equal to -0.5" ) if ( mu == 0 ) return( hermite.h.recurrences( n, normalized ) ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 two.mu <- 2 * mu if ( normalized ) { while ( j <= n ) { ### ### if theta.j is zero, then j is even ### theta.j <- j - 2 * floor( j / 2) ### ### j is even ### if ( theta.j == 0 ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- sqrt( 2 / ( j + two.mu + 1 ) ) if ( j == 0 ) { r[k,"f"] <- 0 } else { r[k,"f"] <- sqrt( j / ( j + two.mu + 1 ) ) } } ### ### j is odd ### else { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- sqrt( 2 / ( j + 1 ) ) if ( j == 0 ) { r[k,"f"] <- 0 } else { r[k,"f"] <- sqrt( ( j + two.mu ) / ( j + 1 ) ) } } j <- j + 1 k <- k + 1 } return( r ) } else { while ( j <= n ) { theta.j <- j - 2 * floor( j / 2) r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 2 r[k,"f"] <- 2 * ( j + two.mu * theta.j ) j <- j + 1 k <- k + 1 } return( r ) } return( NULL ) } orthopolynom/R/ghermite.h.polynomials.R0000644000176000001440000000146612103551444020004 0ustar ripleyusersghermite.h.polynomials <- function( n, mu, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k generalized Hermite polynomials, Hk(mu,x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### mu = the polynomial parameter ### normalized = a boolean value. if true, the polynomials are normalized ### recurrences <- ghermite.h.recurrences( n, mu, normalized ) if ( normalized ) { h.0 <- gamma( mu + 0.5 ) p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) return( polynomials ) } else { polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } return( NULL ) } orthopolynom/R/ghermite.h.inner.products.R0000644000176000001440000000213712103551444020407 0ustar ripleyusersghermite.h.inner.products <- function( n, mu ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k generalized Hermite polynomial, Hk(mu,x), ### with itself (i.e. the norm squared) for orders k=0,1,...,n ### ### Parameter ### n = integer highest polynomial order ### mu = first parameter ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( mu <= -0.5 ) stop( "mu less than or equal to -0.5" ) if ( abs( mu ) < 1e-6 ) return( hermite.h.inner.products( n ) ) inner.products <- rep( 1, n + 1 ) sqrt.pi <- sqrt( pi ) log.2 <- log( 2 ) mu.plus <- mu + 0.5 j <- 1 for ( k in 0:n ) { floor.k <- floor( k / 2 ) floor.kp1 <- floor( ( k + 1 ) / 2 ) log.inner.product <- (2 * k ) * log.2 + lgamma( floor.k + 1 ) + lgamma( floor.kp1 + mu.plus ) inner.products[j] <- exp( log.inner.product ) j <- j + 1 } return ( inner.products ) } orthopolynom/R/gegenbauer.weight.R0000644000176000001440000000074212103551444016773 0ustar ripleyusersgegenbauer.weight <- function( x, alpha ) { ### ### This function returns the value of the weight function ### for the Gegenbauer polynomial, Ck( alpha, x ) ### ### Parameters ### x = the function argument ### alpha = the polynomial parameter ### n <- length( x ) y <- rep( 0, n ) pow <- alpha - 0.5 for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < 1 ) ) { y[i] <- ( 1 - x[i] * x[i] ) ^ pow } } return( y ) } orthopolynom/R/gegenbauer.recurrences.R0000644000176000001440000001032012103551444020015 0ustar ripleyusersgegenbauer.recurrences <- function( n, alpha, normalized=FALSE ) { ### ### This function returns a data frame with n+1 and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k generalized Laguerre polynomials, Lk(alpha,x), ### and for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### normalized = a boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) if ( alpha <= -0.5 ) stop( "alpha less than or equal to -0.5" ) ### ### alpha = 1.0 ### special case is the Chebyshev polynomial of ###the second kind U_k(x) ### if ( abs( alpha - 1 ) < 1e-6 ) return( chebyshev.u.recurrences( n, normalized ) ) ### ### alpha = 0.5 ### special case is the Legendre polynomial P_k(x) ### if ( abs( alpha - 0.5 ) < 1e-6 ) return( legendre.recurrences( n, normalized ) ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 ### ### alpha = 0,0 ### special case is related to the Chebyshev polynomial of ### the first kind T_k(x) ### if ( abs( alpha ) < 1e-6 ) { if ( normalized ) { while( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 0 if ( j == 0 ) { r[k,"e"] <- sqrt( 2 ) } else { r[k,"e"] <- 2 * ( j + 1 ) } if ( j == 0 ) { r[k,"f"] <- 0 } else { if ( j == 1 ) { r[k,"f"] <- 2 * sqrt( 2 ) } else { r[k,"f"] <- j + 1 } } j <- j + 1 k <- k + 1 } # end while block } # end if normalized block else { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 0 if ( j == 0 ) { r[k,"e"] <- 2 } else { r[k,"e"] <- 2 * j } if ( j == 0 ) { r[k,"f"] <- 0 } else { if ( j == 1 ) { r[k,"f"] <- 2 } else { r[k,"f"] <- j - 1 } } j <- j + 1 k <- k + 1 } # end while } # end else not normalized block return( r ) } # end if block ### ### general case ### two.alpha <- 2 * alpha if ( normalized ) { while ( j <= n ) { r[k,"c"] <- ( j + 1 ) r[k,"d"] <- 0 rho.j <- sqrt( ( alpha + j + 1 ) * ( j + 1 ) * gamma( two.alpha + j ) / ( ( alpha + j ) * gamma( two.alpha + j + 1 ) ) ) r[k,"e"] <- 2 * ( alpha + j ) * rho.j if ( j == 0 ) { rho.jm1 <- 0 } else { rho.jm1 <- sqrt( j * ( j + 1 ) * ( alpha + j + 1 ) * gamma( two.alpha + j - 1 ) / ( ( alpha + j - 1 ) * gamma( two.alpha + j + 1 ) ) ) } r[k,"f"] <- ( j + 2 * alpha - 1 ) * rho.jm1 j <- j + 1 k <- k + 1 } # end while block } # end if block else { while ( j <= n ) { r[k,"c"] <- j + 1 r[k,"d"] <- 0 r[k,"e"] <- 2 * ( j + alpha ) r[k,"f"] <- j + 2 * alpha - 1 j <- j + 1 k <- k + 1 } # end while block } # end of else block return( r ) } orthopolynom/R/gegenbauer.polynomials.R0000644000176000001440000000301612103551444020047 0ustar ripleyusersgegenbauer.polynomials <- function( n, alpha, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Gegenbauer polynomial Ck(alpha,x), ### for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### normalized = boolean value. if true, the polynomials are normalized ### if ( n < 0 ) stop( "highest polynomial order is less than zero" ) if ( n != round(n) ) stop( "highest polynomial order is not an integer" ) if ( alpha <= -0.5 ) stop( "alpha is less than or equal to -0.5" ) ### ### alpha = 0.5 ### special case is the Legendre polynomial ### if ( abs( alpha - 0.5 ) < 1e-6 ) return( legendre.polynomials( n, normalized ) ) ### ### alpha = 1.0 ### special case is the Chebyshev polynomial of the second kind U ### if ( abs( alpha - 1.0 ) < 1e-6 ) return( chebyshev.u.polynomials( n, normalized ) ) ### ### all other cases including alpha = 0 ### recurrences <- gegenbauer.recurrences( n, alpha, normalized ) if ( normalized ) { if ( abs( alpha ) < 1e-6 ) { h.0 <- pi } else { h.0 <- sqrt( pi ) * gamma( alpha + 0.5 ) / gamma( alpha + 1 ) } p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/gegenbauer.inner.products.R0000644000176000001440000000326612103551444020465 0ustar ripleyusersgegenbauer.inner.products <- function( n, alpha ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Gegenbauer polynomial, Ck(alpha,x), ### with itself (i.e. norm squared) for orders k=0,1,...,n ### ### Parameters ### n = integer highest polynomial order ### alpha = polynomial parameter ### if ( n < 0 ) stop( "highest polynomial order is less than zero" ) if ( n != round(n) ) stop( "highest polynomial order is not an integer" ) if ( alpha <= -0.5 ) stop( "alpha is less than or equal to -0.5" ) ### ### alpha = 0.5 ### special case is the Legendre polynomial ### if ( abs( alpha - 0.5 ) < 1e-6 ) return( legendre.inner.products( n ) ) ### ### alpha = 1.0 ### special case is the Chebyshev polynomial of the second kind U ### if ( abs( alpha - 1.0 ) < 1e-6 ) return( chebyshev.u.inner.products( n ) ) ### ### initialize vector for the inner products ### inner.products <- rep( 1, n + 1 ) ### ### alpha = 0.0 ### special case is related to the Chebyshev polynomial of the first kind T ### if ( abs( alpha ) < 1e-6 ) { inner.products[1] <- pi j <- 2 for ( k in 1:n ) { inner.products[j] <- ( 2 * pi ) / ( k ^ 2 ) j <- j + 1 } return( inner.products ) } ### ### general case ### coef <- pi * ( 2 ^ ( 1 - 2 * alpha ) ) j <- 1 for ( k in 0:n ) { num <- coef * gamma( k + 2 * alpha ) den <- factorial( k ) * ( k + alpha ) * ( gamma( alpha ) ) ^ 2 inner.products[j] <- num / den j <- j + 1 } return( inner.products ) } orthopolynom/R/chebyshev.u.weight.R0000644000176000001440000000063512103551444017113 0ustar ripleyuserschebyshev.u.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Chebyshev polynomial of the second kind, Uk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < 1 ) ) y[i] <- ( sqrt( 1 - x[i] * x[i] ) ) } return( y ) } orthopolynom/R/chebyshev.u.recurrences.R0000644000176000001440000000240212103551444020136 0ustar ripleyuserschebyshev.u.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Chebyshev polynomial of the second kind, Uk(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 2 if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- 1 } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( 0, np1 ) r$e <- rep( 2, np1 ) r$f <- rep( 1, np1 ) return( r ) } return( NULL ) } orthopolynom/R/chebyshev.u.polynomials.R0000644000176000001440000000127712103551444020175 0ustar ripleyuserschebyshev.u.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Chebyshev polynomials of the second kind, Uk(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- chebyshev.u.recurrences( n, normalized ) if ( normalized ) { h.0 <- pi / 2 p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/chebyshev.u.inner.products.R0000644000176000001440000000104512103551444020575 0ustar ripleyuserschebyshev.u.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Chebyshev polynomial ### of the second kind, Uk(x) with itself (i.e. the norm squared) ### for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( pi / 2, n + 1 ) return ( inner.products ) } orthopolynom/R/chebyshev.t.weight.R0000644000176000001440000000064112103551444017107 0ustar ripleyuserschebyshev.t.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Chebyshev polynomial of the first kind, Tk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -1 ) && ( x[i] < +1 ) ) y[i] <- 1 / ( sqrt( 1 - x[i] * x[i] ) ) } return( y ) } orthopolynom/R/chebyshev.t.recurrences.R0000644000176000001440000000307212103551444020141 0ustar ripleyuserschebyshev.t.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Chebyshev polynomial of the first kind, Tk(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 if ( j == 0 ) { r[k,"e"] <- sqrt( 2 ) } else { r[k,"e"] <- 2 } if ( j == 0 ) { r[k,"f"] <- 0 } else { if ( j == 1 ) { r[k,"f"] <- sqrt( 2 ) } else { r[k,"f"] <- 1 } } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( 0, np1 ) r$e <- rep( 2, np1 ) r[1,"e"] <- 1 r$f <- rep( 1, np1 ) return( r ) } return( NULL ) } orthopolynom/R/chebyshev.t.polynomials.R0000644000176000001440000000127212103551444020167 0ustar ripleyuserschebyshev.t.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Chebyshev polynomials of the first kind, Tk(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- chebyshev.t.recurrences( n, normalized ) if ( normalized ) { h.0 <- pi p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/chebyshev.t.inner.products.R0000644000176000001440000000104712103551444020576 0ustar ripleyuserschebyshev.t.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Chebyshev polynomial ### of the first kind, Tk(x) with itself (i.e. the norm squared) ### for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- c( pi, rep( pi/2, n ) ) return ( inner.products ) } orthopolynom/R/chebyshev.s.weight.R0000644000176000001440000000064412103551444017111 0ustar ripleyuserschebyshev.s.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Chebyshev polynomial of the second kind, Sk( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -2 ) && ( x[i] < 2 ) ) y[i] <- ( sqrt( 1 - 0.25 * x[i] * x[i] ) ) } return( y ) } orthopolynom/R/chebyshev.s.recurrences.R0000644000176000001440000000237712103551444020147 0ustar ripleyuserschebyshev.s.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Chebyshev polynomial of the second kind, Sk(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) j <- 0 k <- 1 if ( normalized ) { while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 r[k,"e"] <- 1 if ( j == 0 ) r[k,"f"] <- 0 else { r[k,"f"] <- 1 } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( 0, np1 ) r$e <- rep( 1, np1 ) r$f <- rep( 1, np1 ) return( r ) } return( NULL ) } orthopolynom/R/chebyshev.s.polynomials.R0000644000176000001440000000127712103551444020173 0ustar ripleyuserschebyshev.s.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Chebyshev polynomials of the second kind, Sk(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- chebyshev.s.recurrences( n, normalized ) if (normalized ) { h.0 <- pi p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/chebyshev.s.inner.products.R0000644000176000001440000000104112103551444020567 0ustar ripleyuserschebyshev.s.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Chebyshev polynomial ### of the second kind, Sk(x) with itself (i.e. the norm squared) ### for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- rep( pi, n + 1 ) return ( inner.products ) } orthopolynom/R/chebyshev.c.weight.R0000644000176000001440000000064712103551444017074 0ustar ripleyuserschebyshev.c.weight <- function( x ) { ### ### This function returns the value of the weight function ### for the Chebyshev polynomial of the first kind, Ck( x ) ### ### Parameter ### x = the function argument ### n <- length( x ) y <- rep( 0, n ) for ( i in 1:n ) { if ( ( x[i] > -2 ) && ( x[i] < 2 ) ) y[i] <- 1 / ( sqrt( 1 - 0.25 * x[i] * x[i] ) ) } return( y ) } orthopolynom/R/chebyshev.c.recurrences.R0000644000176000001440000000276312103551444020126 0ustar ripleyuserschebyshev.c.recurrences <- function( n, normalized=FALSE ) { ### ### This function returns a data frame with n+1 rows and four columns ### containing the coefficients c, d, e and f of the recurrence relations ### for the order k Chebyshev polynomial of the first kind, Ck(x), ### and for orders k=0,1,...,n ### ### Parameter ### n = integer highest order ### normalized = boolean value. If true, recurrences are for normalized polynomials ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) np1 <- n + 1 r <- data.frame( matrix( nrow=np1, ncol=4 ) ) names( r ) <- c( "c", "d", "e", "f" ) if ( normalized ) { j <- 0 k <- 1 while ( j <= n ) { r[k,"c"] <- 1 r[k,"d"] <- 0 if ( j == 0 ) { r[k,"e"] <- 0.5 * sqrt( 2 ) r[k,"f"] <- 0 } else { r[k,"e"] <- 1 if ( j == 1 ) { r[k,"f"] <- sqrt( 2 ) } else { r[k,"f"] <- 1 } } j <- j + 1 k <- k + 1 } return( r ) } else { r$c <- rep( 1, np1 ) r$d <- rep( 0, np1 ) r$e <- rep( 1, np1 ) r$f <- rep( 1, np1 ) r[1,"e"] <- 0.5 return( r ) } return( NULL ) } orthopolynom/R/chebyshev.c.polynomials.R0000644000176000001440000000127612103551444020152 0ustar ripleyuserschebyshev.c.polynomials <- function( n, normalized=FALSE ) { ### ### This function returns a list with n+1 elements ### containing the order k Chebyshev polynomials of the first kind, Ck(x), ### for orders k=0,1,...n ### ### Parameters ### n = integer highest polynomial order ### normalized = boolean value. if true, the polynomials are normalized ### recurrences <- chebyshev.c.recurrences( n, normalized ) if ( normalized ) { h.0 <- 8 * pi p.0 <- polynomial( c( 1 / sqrt( h.0 ) ) ) polynomials <- orthonormal.polynomials( recurrences, p.0 ) } else polynomials <- orthogonal.polynomials( recurrences ) return( polynomials ) } orthopolynom/R/chebyshev.c.inner.products.R0000644000176000001440000000110512103551444020550 0ustar ripleyuserschebyshev.c.inner.products <- function( n ) { ### ### This function returns a vector with n+1 elements ### containing the inner product of an order k Chebyshev polynomial ### of the first kind, Ck(x) with itself (i.e. the norm squared) ### for orders k=0,1,...n ### ### Parameter ### n = integer highest polynomial order ### if ( n < 0 ) stop( "negative highest polynomial order" ) if ( n != round( n ) ) stop( "highest polynomial order is not integer" ) inner.products <- c( 8 * pi, rep( 4 * pi, n ) ) return ( inner.products ) } orthopolynom/NAMESPACE0000644000176000001440000000430212103551444014270 0ustar ripleyusersexport( "jacobi.matrices", "chebyshev.c.inner.products", "chebyshev.c.recurrences", "chebyshev.c.polynomials", "chebyshev.c.weight", "chebyshev.s.inner.products", "chebyshev.s.recurrences", "chebyshev.s.polynomials", "chebyshev.s.weight", "chebyshev.t.inner.products", "chebyshev.t.recurrences", "chebyshev.t.polynomials", "chebyshev.t.weight", "chebyshev.u.inner.products", "chebyshev.u.recurrences", "chebyshev.u.polynomials", "chebyshev.u.weight", "schebyshev.t.inner.products", "schebyshev.t.recurrences", "schebyshev.t.polynomials", "schebyshev.t.weight", "schebyshev.u.inner.products", "schebyshev.u.recurrences", "schebyshev.u.polynomials", "schebyshev.u.weight", "jacobi.p.inner.products", "jacobi.p.recurrences", "jacobi.p.polynomials", "jacobi.p.weight", "jacobi.g.inner.products", "jacobi.g.recurrences", "jacobi.g.polynomials", "jacobi.g.weight", "hermite.h.inner.products", "hermite.h.recurrences", "hermite.h.polynomials", "hermite.h.weight", "hermite.he.inner.products", "hermite.he.recurrences", "hermite.he.polynomials", "hermite.he.weight", "glaguerre.inner.products", "glaguerre.recurrences", "glaguerre.polynomials", "glaguerre.weight", "laguerre.inner.products", "laguerre.recurrences", "laguerre.polynomials", "laguerre.weight", "legendre.inner.products", "legendre.recurrences", "legendre.polynomials", "legendre.weight", "slegendre.inner.products", "slegendre.recurrences", "slegendre.polynomials", "slegendre.weight", "spherical.inner.products", "spherical.recurrences", "spherical.polynomials", "spherical.weight", "gegenbauer.inner.products", "gegenbauer.recurrences", "gegenbauer.polynomials", "gegenbauer.weight", "ultraspherical.inner.products", "ultraspherical.recurrences", "ultraspherical.polynomials", "ultraspherical.weight", "ghermite.h.inner.products","ghermite.h.recurrences", "ghermite.h.polynomials", "ghermite.h.weight", "lpochhammer", "pochhammer", "monic.polynomial.recurrences", "monic.polynomials", "orthogonal.polynomials", "orthonormal.polynomials", "polynomial.coefficients", "polynomial.functions", "polynomial.derivatives", "polynomial.integrals", "polynomial.orders", "polynomial.powers", "polynomial.roots", "polynomial.values", "scaleX" ) orthopolynom/man/0000755000176000001440000000000012103551444013625 5ustar ripleyusersorthopolynom/man/ultraspherical.weight.Rd0000644000176000001440000000311212103551444020421 0ustar ripleyusers\name{ultraspherical.weight} \alias{ultraspherical.weight} \title{ Weight function for the ultraspherical polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} ultraspherical polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}. } \usage{ ultraspherical.weight(x,alpha) } \arguments{ \item{x}{ the function argument which can be a vector } \item{alpha}{ polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \left( {1 - x^2 } \right)^{\alpha - 0.5} } } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the ultraspherical weight function for arguments between -2 and 2 ### polynomial parameter is 1.0 ### x <- seq( -2, 2, .01 ) y <- ultraspherical.weight( x, 1 ) plot( x, y ) } \keyword{ math } orthopolynom/man/ultraspherical.recurrences.Rd0000644000176000001440000000366112103551444021463 0ustar ripleyusers\name{ultraspherical.recurrences} \alias{ultraspherical.recurrences} \title{ Recurrence relations for ultraspherical polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} ultraspherical polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ ultraspherical.recurrences(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{ultraspherical.recurrences}} } \examples{ ### ### generate the recurrence relations for ### the normalized ultraspherical polynomials ### of orders 0 to 10 ### polynomial parameter value is 1.0 ### normalized.r <- ultraspherical.recurrences( 10, 1, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the normalized ultraspherical polynomials ### of orders 0 to 10 ### polynomial parameter value is 1.0 ### unnormalized.r <- ultraspherical.recurrences( 10, 1, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/ultraspherical.polynomials.Rd0000644000176000001440000000445312103551444021511 0ustar ripleyusers\name{ultraspherical.polynomials} \alias{ultraspherical.polynomials} \title{ Create list of ultraspherical polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} ultraspherical polynomials, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ ultraspherical.polynomials(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ polynomial parameter } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{ultraspherical.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 ultraspherical polynomial} \item{2 }{order 1 ultraspherical polynomial} ... \item{n+1 }{order \eqn{n} ultraspherical polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{gegenbauer.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized ultra spherical polynomials ### of orders 0 to 10 ### normalized.p.list <- ultraspherical.polynomials( 10, 1, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized ultra spherical polynomials ### of orders 0 to 10 ### unnormalized.p.list <- ultraspherical.polynomials( 10, 1, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/ultraspherical.inner.products.Rd0000644000176000001440000000330312103551444022111 0ustar ripleyusers\name{ultraspherical.inner.products} \alias{ultraspherical.inner.products} \title{ Inner products of ultraspherical polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} ultraspherical polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ ultraspherical.inner.products(n,alpha) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the polynomial parameter } } \details{ This function uses the same formula as the function \code{gegenbauer.inner.products}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., NY. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{gegenbauer.inner.products}} } \examples{ ### ### generate the inner products vector for the ### ultraspherical polynomials of orders 0 to 10. ### the polynomial parameter is 1.0 ### h <- ultraspherical.inner.products( 10, 1 ) print( h ) } \keyword{ math } orthopolynom/man/spherical.weight.Rd0000644000176000001440000000265112103551444017360 0ustar ripleyusers\name{spherical.weight} \alias{spherical.weight} \title{ Weight function for the spherical polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} spherical polynomial, \eqn{P_k \left( x \right)}. } \usage{ spherical.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector or matrix } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = 1} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the spherical weight function for a sequence of values between -2 and 2 ### x <- seq( -2, 2, .01 ) y <- spherical.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/spherical.recurrences.Rd0000644000176000001440000000332212103551444020405 0ustar ripleyusers\name{spherical.recurrences} \alias{spherical.recurrences} \title{ Recurrence relations for spherical polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} spherical polynomial, \eqn{P_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ spherical.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{spherical.inner.products}} } \examples{ ### ### generate the recurrence relations for ### the normalized spherical polynomials ### of orders 0 to 10 ### normalized.r <- spherical.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the unnormalized spherical polynomials ### of orders 0 to 10 ### unnormalized.r <- spherical.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/spherical.polynomials.Rd0000644000176000001440000000421412103551444020434 0ustar ripleyusers\name{spherical.polynomials} \alias{spherical.polynomials} \title{ Create list of spherical polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} spherical polynomials, \eqn{P_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ spherical.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{spherical.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 spherical polynomial} \item{2 }{order 1 spherical polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{spherical.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### generate a list of spherical orthonormal polynomials of orders 0 to 10 ### normalized.p.list <- spherical.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### generate a list of spherical orthogonal polynomials of orders 0 to 10 ### unnormalized.p.list <- spherical.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/spherical.inner.products.Rd0000644000176000001440000000314512103551444021045 0ustar ripleyusers\name{spherical.inner.products} \alias{spherical.inner.products} \title{ Inner products of spherical polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} spherical polynomial, \eqn{P_k \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ spherical.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products of the spherical orthogonal polynomials is the same as that used for the Legendre orthogonal polynomials. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{legendre.inner.products}} } \examples{ ### ### generate the inner products vector for the spherical polynomals ### of orders 0 to 10. ### h <- spherical.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/slegendre.weight.Rd0000644000176000001440000000265112103551444017356 0ustar ripleyusers\name{slegendre.weight} \alias{slegendre.weight} \title{ Weight function for the shifted Legendre polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} shifted Legendre polynomial, \eqn{P_k^* \left( x \right)}. } \usage{ slegendre.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = 1} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the shifted Legendre weight function for argument values ### between 0 and 1 ### x <- seq( 0, 1, .01 ) y <- slegendre.weight( x ) } \keyword{ math } orthopolynom/man/slegendre.recurrences.Rd0000644000176000001440000000356612103551444020415 0ustar ripleyusers\name{slegendre.recurrences} \alias{slegendre.recurrences} \title{ Recurrence relations for shifted Legendre polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} shifted Legendre polynomial, \eqn{P_k^* \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ slegendre.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{slegendre.inner.products}}, } \examples{ ### ### generate the recurrence relations for normalized shifted Legendre polynomials ### of orders 0 to 10 ### normalized.r <- slegendre.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for normalized shifted Legendre polynomials ### of orders 0 to 10 ### unnormalized.r <- slegendre.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/slegendre.polynomials.Rd0000644000176000001440000000427712103551444020443 0ustar ripleyusers\name{slegendre.polynomials} \alias{slegendre.polynomials} \title{ Create list of shifted Legendre polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} shifted Legendre polynomials, \eqn{P_k^* \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ slegendre.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{slegendre.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 shifted Legendre polynomial} \item{2 }{order 1 shifted Legendre polynomial} ... \item{n+1 }{order \eqn{n} shifted Legendre polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{slegendre.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized shifted Legendre polynomials of orders 0 to 10 ### normalized.p.list <- slegendre.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized shifted Legendre polynomials of orders 0 to 10 ### unnormalized.p.list <- slegendre.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/slegendre.inner.products.Rd0000644000176000001440000000307112103551444021041 0ustar ripleyusers\name{slegendre.inner.products} \alias{slegendre.inner.products} \title{ Inner products of shifted Legendre polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} shifted Legendre polynomial, \eqn{P_k^* \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ slegendre.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {P_n^* |P_n^* } \right\rangle = \frac{1}{{2\,n + 1}}}. } \value{ A vector with $n$+1 elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### compute the inner products vector for the ### shifted Legendre polynomials of orders 0 to 10 ### h <- slegendre.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/schebyshev.u.weight.Rd0000644000176000001440000000275512103551444020021 0ustar ripleyusers\name{schebyshev.u.weight} \alias{schebyshev.u.weight} \title{ Weight function for the shifted Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} shifted Chebyshev polynomial of the second kind, \eqn{U_k^* \left( x \right) }. } \usage{ schebyshev.u.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \sqrt {x - x^2 } } } \value{ The value of the weight function. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the shifted U Chebyshev weight function for argument values ### between 0 and 1 ### x <- seq( 0, 1, .01 ) y <- schebyshev.u.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/schebyshev.u.recurrences.Rd0000644000176000001440000000365512103551444021052 0ustar ripleyusers\name{schebyshev.u.recurrences} \alias{schebyshev.u.recurrences} \title{ Recurrence relations for shifted Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} shifted Chebyshev polynomial of the second kind, \eqn{U_k^* \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ schebyshev.u.recurrences(n, normalized) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{schebyshev.u.inner.products}} } \examples{ ### ### generate the recurrence relations for ### the normalized shifted U Chebyshev polynomials ### of orders 0 to 10 ### normalized.r <- schebyshev.u.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the unnormalized shifted T Chebyshev polynomials ### of orders 0 to 10 unnormalized.r <- schebyshev.u.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/schebyshev.u.polynomials.Rd0000644000176000001440000000435112103551444021072 0ustar ripleyusers\name{schebyshev.u.polynomials} \alias{schebyshev.u.polynomials} \title{ Create list of shifted Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} shifted Chebyshev polynomials of the second kind, \eqn{U_k^* \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ schebyshev.u.polynomials(n, normalized) } \arguments{ \item{n}{ integer value for highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{schebyshev.u.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 shifted Chebyshev polynomial} \item{2 }{order 1 shifted Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} shifted Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{schebyshev.u.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized shifted U Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- schebyshev.u.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized shifted U Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- schebyshev.u.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/schebyshev.u.inner.products.Rd0000644000176000001440000000274012103551444021501 0ustar ripleyusers\name{schebyshev.u.inner.products} \alias{schebyshev.u.inner.products} \title{ Inner products of shifted Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} shifted Chebyshev polynomial of the second kind, \eqn{U_k^* \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ schebyshev.u.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {U_n^* |U_n^* } \right\rangle = \frac{\pi }{8}}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ h <- schebyshev.u.inner.products( 10 ) } \keyword{ math } orthopolynom/man/schebyshev.t.weight.Rd0000644000176000001440000000276212103551444020016 0ustar ripleyusers\name{schebyshev.t.weight} \alias{schebyshev.t.weight} \title{ Weight function for the shifted Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} shifted Chebyshev polynomial of the first kind, \eqn{T_k^* \left( x \right) }. } \usage{ schebyshev.t.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \frac{1}{{\sqrt {x - x^2 } }}} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the shifted T Chebyshev weight function for argument values ### between 0 and 1 x <- seq( 0, 1, .01 ) y <- schebyshev.t.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/schebyshev.t.recurrences.Rd0000644000176000001440000000366112103551444021046 0ustar ripleyusers\name{schebyshev.t.recurrences} \alias{schebyshev.t.recurrences} \title{ Recurrence relations for shifted Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} shifted Chebyshev polynomial of the first kind, \eqn{T_k^* \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ schebyshev.t.recurrences(n, normalized) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{schebyshev.t.inner.products}} } \examples{ ### ### generate the recurrence relations for ### the normalized shifted T Chebyshev polynomials ### of orders 0 to 10 ### normalized.r <- schebyshev.t.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the unnormalized shifted T Chebyshev polynomials ### of orders 0 to 10 ### unnormalized.r <- schebyshev.t.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/schebyshev.t.polynomials.Rd0000644000176000001440000000435312103551444021073 0ustar ripleyusers\name{schebyshev.t.polynomials} \alias{schebyshev.t.polynomials} \title{ Create list of shifted Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} shifted Chebyshev polynomials of the first kind, \eqn{T_k^* \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ schebyshev.t.polynomials(n, normalized) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{schebyshev.t.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 shifted Chebyshev polynomial} \item{2 }{order 1 shifted Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} shifted Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{schebyshev.u.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized shifted T Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- schebyshev.t.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized shifted T Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- schebyshev.t.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/schebyshev.t.inner.products.Rd0000644000176000001440000000327512103551444021504 0ustar ripleyusers\name{schebyshev.t.inner.products} \alias{schebyshev.t.inner.products} \title{ Inner products of shifted Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} shifted Chebyshev polynomial of the first kind, \eqn{T_k^* \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ schebyshev.t.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {T_n^* |T_n^* } \right\rangle = \left\{ {\begin{array}{*{20}c} {\frac{\pi } {2}} & {n \ne 0} \\ \pi & {n = 0} \\ \end{array} } \right.} } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., NY. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### shifted T Chebyshev polynomials of orders 0 to 10 ### h <- schebyshev.t.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/scaleX.Rd0000644000176000001440000000326712103551444015343 0ustar ripleyusers\name{scaleX} \alias{scaleX} \title{ Scale values from [a,b] to [u.v] } \description{ This function returns a vector of values that have been mapped from the interval [a,b] to the interval [u.v]. } \usage{ scaleX(x, a = min(x, na.rm = TRUE), b = max(x, na.rm = TRUE), u, v) } \arguments{ \item{x}{ A numerical vector of values to be mapped into a target interval } \item{a}{ A numerical lower bound for the domain interval with min(x) as the default value } \item{b}{ A numerical upper bound for the domain interval with max(x) as the default value } \item{u}{ A numerical lower bound for the target interval } \item{v}{ A numerical upper bound for the target interval } } \details{ Target lower and/or upper bounds can be \eqn{-\infty} and \eqn{\infty}, respectively. This accomodates finite target intervals, semi-infinite target intervals and infinite target intervals. } \value{ A vector of transformed values with four attributes. The first attribute is called "a" and it is the domain interval lower bound. The second attribute is called "b" and it is the domain interval upper bound. The third attribute is called "u" and it is the target interval lower bound. The fourth attribute is called "v" and it is the target interval upper bound. } \references{ Seber, G. A. F. (1997) Linear Regression Analysis, New York. } \author{ Frederick Novomestky \email{fnovomes@poly.edu}, Gregor Gorjanc \email{gregor.gorjanc@bfro-uni-lj.si} } \examples{ x <- rnorm( 1000, 0, 10 ) y0 <- scaleX( x, u=0 , v=1 ) y1 <- scaleX( x, u=-1, v=1 ) y2 <- scaleX( x, u=-Inf, v=0 ) y3 <- scaleX( x, u=0, v=Inf ) y4 <- scaleX( x, u=-Inf, v=Inf ) } \keyword{ math } orthopolynom/man/polynomial.values.Rd0000644000176000001440000000220312103551444017572 0ustar ripleyusers\name{polynomial.values} \alias{polynomial.values} \title{ Create vector of polynomial values } \description{ This function returns a list with \eqn{n + 1} elements containing the values of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n} and for the given argument \eqn{x}. } \usage{ polynomial.values( polynomials, x ) } \arguments{ \item{polynomials}{ list of polynomial objects } \item{x}{ the argument which can be any numeric object } } \value{ A list of \eqn{n + 1} polynomial objects where each element is the value of the polynomial. \item{1 }{Value(s) for the order 0 polynomial} \item{2 }{Value(s) for the order 1 polynomial} ... \item{n+1}{Value(s) for the order \eqn{n} polynomial} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of T Chebyshev polynomials of ### orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=FALSE ) x <- seq( -2, 2, .01 ) ### ### compute the value of the polynomials for the given range of values in x ### y <- polynomial.values( p.list, x ) print( y ) } \keyword{ math } orthopolynom/man/polynomial.roots.Rd0000644000176000001440000000430312103551444017444 0ustar ripleyusers\name{polynomial.roots} \alias{polynomial.roots} \title{ Create a list of polynomial roots } \description{ This function returns a list with \eqn{n} elements containing the roots of the order $k$ monic orthogonal polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n} using a data frame with the monic polynomial recurrence parameter vectors \eqn{\bf{a}} and \eqn{\bf{b}} } \usage{ polynomial.roots(m.r) } \arguments{ \item{m.r}{ monic recurrence data frame with parameters a and b } } \details{ The parameter \code{m.r} is a data frame with $n$+1 rows and two names columns. The columns which are names \code{a} and \code{b} correspond to the above referenced vectors. Function \code{jacobi.matrices} is used to create a list of symmetric, tridiagonal Jacobi matrices from these named columns. The eigenvalues of the \eqn{k \times k} Jacobi matrix are the roots or zeros of the order $k$ monic orthogonal polynomial. } \value{ A list with \eqn{n} elements each of which is a vector of polynomial roots \item{1 }{roots of the order 1 monic polynomial} \item{2 }{roots of the order 2 monic polynomial} ... \item{n }{roots of the order \eqn{n} monic polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{monic.polynomial.recurrences}}, \code{\link{jacobi.matrices}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Chebyshev polynomials of ### orders 0 to 10 ### r <- chebyshev.t.recurrences( 10, normalized=TRUE ) ### ### construct the corresponding monic polynomial ### recurrences ### m.r <- monic.polynomial.recurrences( r ) ### ### obtain the polynomial roots from the monic polynomial ### recurrences p.roots <- polynomial.roots( m.r ) } \keyword{ math } orthopolynom/man/polynomial.powers.Rd0000644000176000001440000000246612103551444017625 0ustar ripleyusers\name{polynomial.powers} \alias{polynomial.powers} \title{ Create a list of polynomial linear combinations } \description{ This function returns a list with \eqn{n + 1} elements containing the vector of linear combinations of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. Each element in the list is a vector. } \usage{ polynomial.powers(polynomials) } \arguments{ \item{polynomials}{ A list of polynomials } } \details{ The \eqn{j}-th component in the list is a vector of linear combinations of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;j - 1} equal to the monomial x raised to the power \eqn{j - 1}. } \value{ A list of \eqn{n + 1} elements where each element is a vector of linear combinations. \item{1 }{Linear combination(s) of polynomials up to order 0} \item{2 }{Linear combination(s) of polynomials up to order 1} ... \item{n+1}{Linear combination(s) of polynomials up to order \eqn{n}} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate Legendre polynomials of orders 0 to 10 ### polynomials <- legendre.polynomials( 10 ) ### ### generate list of linear combinations of these polynomials ### alphas <- polynomial.powers( polynomials ) print( alphas ) } \keyword{ math } orthopolynom/man/polynomial.orders.Rd0000644000176000001440000000147712103551444017605 0ustar ripleyusers\name{polynomial.orders} \alias{polynomial.orders} \title{ Create vector of polynomial orders } \description{ This function returns a vector with \eqn{n} elements containing the orders of the polynomials } \usage{ polynomial.orders(polynomials) } \arguments{ \item{polynomials}{ list of $n$ polynomial objects } } \value{ A vector of \eqn{n} values \item{1 }{Order of polynomials[[1]]} \item{2 }{Order of polynomials[[2]]} ... \item{n}{Order of polynomials[[n]]} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of normalized T Chebyshev polynomials ### of orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=TRUE ) ### ### get the vector of polynomial orders ### p.order <- polynomial.orders( p.list ) } \keyword{ math } orthopolynom/man/polynomial.integrals.Rd0000644000176000001440000000231412103551444020266 0ustar ripleyusers\name{polynomial.integrals} \alias{polynomial.integrals} \title{ Create list of polynomial integrals } \description{ This function returns a list with \eqn{n + 1} elements containing polynomial objects which are the indefinite integrals of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ polynomial.integrals(polynomials) } \arguments{ \item{polynomials}{ list of polynomial objects } } \details{ The polynomial objects in the argument \code{polynomials} are as follows \itemize{ \item{1}{order 0 polynomial} \item{2}{order 1 polynomial} ... \item{n+1}{order n polynomial} } } \value{ List of \eqn{n + 1} polynomial objects \item{1 }{integral of \code{polynomials[[1]]}} \item{2 }{integral of \code{polynomials[[2]]}} ... \item{n+1 }{integral of \code{polynomials[[n+1]]}} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of normalized T Chebyshev polynomials ### of orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=TRUE ) ### ### generate the corresponding list of polynomial integrals ### p.int <- polynomial.integrals( p.list ) } \keyword{ math } orthopolynom/man/polynomial.functions.Rd0000644000176000001440000000233612103551444020312 0ustar ripleyusers\name{polynomial.functions} \alias{polynomial.functions} \title{ Coerce polynomials to functions } \description{ This function returns a list with \eqn{n + 1} elements containing the functions of the order $k$ polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n} and for the given argument \eqn{x}. } \usage{ polynomial.functions(polynomials, ...) } \arguments{ \item{polynomials}{a list of polynomial objects} \item{\dots}{ further arguments to be passed to or from methods } } \details{ The function uses the method as.function.polynomial to coerce each polynomial object to a function object. } \value{ A list of \eqn{n + 1} polynomial objects where each element is the function for the polynomial. \item{1 }{Function for the order 0 polynomial} \item{2 }{Function for the order 1 polynomial} ... \item{n+1}{Function for the order \eqn{n} polynomial} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of T Chebyshev polynomials of ### orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=FALSE ) ### ### create the list of functions for each polynomial ### f.list <- polynomial.functions( p.list ) } \keyword{ math } orthopolynom/man/polynomial.derivatives.Rd0000644000176000001440000000233512103551444020626 0ustar ripleyusers\name{polynomial.derivatives} \alias{polynomial.derivatives} \title{ Create list of polynomial derivatives } \description{ This function returns a list with \eqn{n + 1} elements containing polynomial objects which are the derivatives of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ polynomial.derivatives(polynomials) } \arguments{ \item{polynomials}{ list of polynomial objects } } \details{ The polynomial objects in the argument \code{polynomials} are as follows \itemize{ \item{1}{order 0 polynomial} \item{2}{order 1 polynomial} ... \item{n+1}{order \eqn{n} polynomial} } } \value{ List of \eqn{n + 1} polynomial objects \item{1 }{derivative of \code{polynomials[[1]]}} \item{2 }{derivative of \code{polynomials[[2]]}} ... \item{n+1 }{derivative of \code{polynomials[[n+1]]}} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of normalized T Chebyshev polynomials of ### orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=TRUE ) ### ### generate the corresponding list of polynomial derivatives ### p.deriv <- polynomial.derivatives( p.list ) } \keyword{ math } orthopolynom/man/polynomial.coefficients.Rd0000644000176000001440000000213612103551444020741 0ustar ripleyusers\name{polynomial.coefficients} \alias{polynomial.coefficients} \title{ Create list of polynomial coefficient vectors } \description{ This function returns a list with \eqn{n + 1} elements containing the vector of coefficients of the order \eqn{k} polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. Each element in the list is a vector. } \usage{ polynomial.coefficients(polynomials) } \arguments{ \item{polynomials}{ list of polynomial objects } } \value{ A list of \eqn{n + 1} polynomial objects where each element is a vector of coefficients. \item{1 }{Coefficient(s) of the order 0 polynomial} \item{2 }{Coefficient(s) of the order 1 polynomial} ... \item{n+1}{Coefficient(s) of the order \eqn{n} polynomial} } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a list of normalized T Chebyshev polynomials ### of orders 0 to 10 ### p.list <- chebyshev.t.polynomials( 10, normalized=TRUE ) ### ### obtain the list of coefficients for these polynomials ### p.coef <- polynomial.coefficients( p.list ) } \keyword{ math } orthopolynom/man/pochhammer.Rd0000644000176000001440000000151212103551444016236 0ustar ripleyusers\name{pochhammer} \alias{pochhammer} \title{ Calculate the value of Pochhammer's symbol } \description{ \code{pochhammer} returns the value of Pochhammer's symbol calculated as \deqn{\left( z \right)_n = z\;\left( {z + 1} \right)\; \ldots \;\left( {z + n - 1} \right) = \frac{{\Gamma \left( {z + n} \right)}}{{\Gamma \left( z \right)}}} where \eqn{\Gamma \left( z \right)} is the Gamma function } \usage{ pochhammer(z, n) } \arguments{ \item{z}{ numeric value for the argument of the symbol } \item{n}{ integer value for the number of terms in the symbol } } \value{ The value of Pochhammer's symbol } \author{ Frederick Novomestky \email{fnovomes@poly.edu) } } \examples{ ### ### compute the Pochhamer's symbol fo z equal to 1 and ### n equal to 5 ### pochhammer( 1, 5 ) } \keyword{ math } orthopolynom/man/orthonormal.polynomials.Rd0000644000176000001440000000450412103551444021030 0ustar ripleyusers\name{orthonormal.polynomials} \alias{orthonormal.polynomials} \title{ Create orthonormal polynomials } \description{ Create list of orthonormal polynomials from the following recurrence relations for \eqn{k = 0,\;1,\; \ldots ,\;n }. \deqn{c_k p_{k+1}\left( x \right) = \left( d_k + e_k x \right) p_k \left( x \right) - f_k p_{k-1} \left( x \right)} We require that \eqn{p_{-1} \left( x \right) = 0} and \eqn{p_0 \left( x \right) = 1}. The coefficients are the column vectors \eqn{{\bf{c}}}, \eqn{{\bf{d}}}, \eqn{{\bf{e}}} and \eqn{{\bf{f}}}. } \usage{ orthonormal.polynomials(recurrences, p.0) } \arguments{ \item{recurrences}{ a data frame containing the parameters of the orthonormal polynomial recurrence relations } \item{p.0}{ a polynomial object for the order 0 orthonormal polynomial } } \details{ The argument is a data frame with \eqn{n + 1} rows and four named columns. The column names are \code{c}, \code{d}, \code{e} and \code{f}. These columns correspond to the column vectors described above. } \value{ A list of \eqn{n + 1}polynomial objects \item{1 }{Order 0 orthonormal polynomial} \item{2 }{Order 1 orthonormal polynomial} ... \item{n+1}{Order \eqn{n} orthonormal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate a data frame with the recurrences parameters for normalized T Chebyshev ### polynomials of orders 0 to 10 ### r <- chebyshev.t.recurrences( 10, normalized=TRUE ) print( r ) norm <- sqrt( pi ) ### ### create the order 0 orthonormal polynomial ### p.0 <- polynomial( c( 1 / norm ) ) ### ### generate a list of orthonormal polynomial objects ### p.list <- orthonormal.polynomials( r, p.0 ) print( p.list ) } \keyword{ math } orthopolynom/man/orthogonal.polynomials.Rd0000644000176000001440000000411112103551444020632 0ustar ripleyusers\name{orthogonal.polynomials} \alias{orthogonal.polynomials} \title{ Create orthogonal polynomials } \description{ Create list of orthogonal polynomials from the following recurrence relations for \eqn{k = 0,\;1,\; \ldots ,\;n}. \deqn{c_k p_{k+1}\left( x \right) = \left( d_k + e_k x \right) p_k \left( x \right) - f_k p_{k-1} \left( x \right)} We require that \eqn{p_{-1} \left( x \right) = 0} and \eqn{p_0 \left( x \right) = 1}. The coefficients are the column vectors \eqn{{\bf{c}}}, \eqn{{\bf{d}}}, \eqn{{\bf{e}}} and \eqn{{\bf{f}}}. } \usage{ orthogonal.polynomials(recurrences) } \arguments{ \item{recurrences}{ a data frame containing the parameters of the orthogonal polynomial recurrence relations } } \details{ The argument is a data frame with \eqn{n + 1} rows and four named columns. The column names are \code{c}, \code{d}, \code{e} and \code{f}. These columns correspond to the column vectors described above. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{Order 0 orthogonal polynomial} \item{2 }{Order 1 orthogonal polynomial} ... \item{n+1}{Order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the recurrence relations for T Chebyshev polynomials of orders 0 to 10 ### r <- chebyshev.t.recurrences( 10, normalized=FALSE ) print( r ) ### ### generate the list of orthogonal polynomials ### p.list <- orthogonal.polynomials( r ) print( p.list ) } \keyword{ math } orthopolynom/man/monic.polynomials.Rd0000644000176000001440000000244312103551444017571 0ustar ripleyusers\name{monic.polynomials} \alias{monic.polynomials} \title{ Create list of monic orthogonal polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} monic polynomials for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ monic.polynomials(monic.recurrences) } \arguments{ \item{monic.recurrences}{ a data frame containing the parameters a and b } } \value{ A list with \eqn{n + 1} polynomial objects \item{1 }{order 0 monic orthogonal polynomial} \item{2 }{order 1 monic orthogonal polynomial} ... \item{n+1 }{order \eqn{n} monic orthogonal polynomial} } \references{ Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{monic.polynomial.recurrences}} } \examples{ ### ### generate the recurrences for the T Chebyshev polynomials ### of orders 0 to 10 ### r <- chebyshev.t.recurrences( 10, normalized=TRUE ) ### ### get the corresponding monic polynomial recurrences ### m.r <- monic.polynomial.recurrences( r ) ### ### obtain the list of monic polynomials ### p.list <- monic.polynomials( m.r ) } \keyword{ math } orthopolynom/man/monic.polynomial.recurrences.Rd0000644000176000001440000000471612103551444021732 0ustar ripleyusers\name{monic.polynomial.recurrences} \alias{monic.polynomial.recurrences} \title{ Create data frame of monic recurrences } \description{ This function returns a data frame with parameters required to construct monic orthogonal polynomials based on the standard recurrence relation for the non-monic polynomials. The recurrence relation for monic orthogonal polynomials is as follows. \deqn{q_{k + 1} \left( x \right) = \left( {x - a_k } \right)\;q_k \left( x \right) - b_k \;q_{k - 1} \left( x \right)} We require that \eqn{q_{-1} \left( x \right) = 0} and \eqn{q_0 \left( x \right) = 1}. The recurrence for non-monic orthogonal polynomials is given by \deqn{c_k \;p_{k + 1} \left( x \right) = \left( {d_k + e_k \;x} \right)\;p_k \left( x \right) - f_k \;p_{k - 1} \left( x \right)} We require that \eqn{p_{-1} \left( x \right) = 0} and \eqn{p_0 \left( x \right) = 1}. The monic polynomial recurrence parameters, \bold{a} and \bold{b}, are related to the non-monic polynomial parameter vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} in the following manner. \deqn{a_k = - \frac{{d_k }}{{e_k }}} \deqn{b_k = \frac{{c_{k - 1} \;f_k }}{{e_{k - 1} \;e_k }}} with \eqn{b_0 = 0}. } \usage{ monic.polynomial.recurrences(recurrences) } \arguments{ \item{recurrences}{ the data frame of recurrence parameter vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} } } \value{ A data frame with \eqn{n + 1} rows and two named columns, \bold{a} and \bold{b}. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{orthogonal.polynomials}}, } \examples{ ### ### construct a list of the recurrences for the T Chebyshev polynomials of ### orders 0 to 10 ### r <- chebyshev.t.recurrences( 10, normalized=TRUE ) ### ### construct the monic polynomial recurrences from the above list ### m.r <- monic.polynomial.recurrences( r ) } \keyword{ math } orthopolynom/man/lpochhammer.Rd0000644000176000001440000000146012103551444016414 0ustar ripleyusers\name{lpochhammer} \alias{lpochhammer} \title{ Calculate the logarithm of Pochhammer's symbol } \description{ \code{lpochhammer} returns the value of the natural logarithm of Pochhammer's symbol calculated as \deqn{\ln \left[ {\left( z \right)_n } \right] = \ln \Gamma \left( {z + n} \right) - \ln \Gamma \left( z \right)} where \eqn{ \Gamma \left( z \right) } is the Gamma function } \usage{ lpochhammer(z, n) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{z}{ argument of the symbol } \item{n}{ integer number of terms in the symbol } } \value{ The value of the logarithm of the symbol } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{pochhammer}} } \examples{ lpochhammer( pi, 5 ) } \keyword{ math } orthopolynom/man/legendre.weight.Rd0000644000176000001440000000263412103551444017174 0ustar ripleyusers\name{legendre.weight} \alias{legendre.weight} \title{ Weight function for the Legendre polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Legendre polynomial, \eqn{P_k \left( x \right)}. } \usage{ legendre.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = 1} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Legendre weight function for argument values ### between -1 and 1 ### x <- seq( -1, 1, .01 ) y <- legendre.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/legendre.recurrences.Rd0000644000176000001440000000331412103551444020221 0ustar ripleyusers\name{legendre.recurrences} \alias{legendre.recurrences} \title{ Recurrence relations for Legendre polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Legendre polynomial, \eqn{P_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ legendre.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{legendre.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Legendre polynomials ### of orders 0 to 10. ### normalized.r <- legendre.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Legendre polynomials ### of orders 0 to 10. ### unnormalized.r <- legendre.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/legendre.polynomials.Rd0000644000176000001440000000417712103551444020257 0ustar ripleyusers\name{legendre.polynomials} \alias{legendre.polynomials} \title{ Create list of Legendre polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Legendre polynomials, \eqn{P_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ legendre.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{legendre.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Legendre polynomial} \item{2 }{order 1 Legendre polynomial} ... \item{n+1 }{order \eqn{n} Legendre polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{legendre.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Laguerre polynomials of orders 0 to 10 ### normalized.p.list <- legendre.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Laguerre polynomials of orders 0 to 10 ### unnormalized.p.list <- legendre.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/legendre.inner.products.Rd0000644000176000001440000000311512103551444020655 0ustar ripleyusers\name{legendre.inner.products} \alias{legendre.inner.products} \title{ Inner products of Legendre polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Legendre polynomial, \eqn{P_k \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ legendre.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used compute the inner products is as follows. \eqn{h_n = \left\langle {P_n |P_n } \right\rangle = \frac{2} {{2\,n + 1}}}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{spherical.inner.products}} } \examples{ ### ### compute the inner product for the ### Legendre polynomials of orders 0 to 1 ### h <- legendre.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/laguerre.weight.Rd0000644000176000001440000000264012103551444017212 0ustar ripleyusers\name{laguerre.weight} \alias{laguerre.weight} \title{ Weight function for the Laguerre polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Laguerre polynomial, \eqn{L_n \left( x \right)}. } \usage{ laguerre.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,\infty \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = e^{ - x} } } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Laguerre weight function for argument values ### between 0 and 3 x <- seq( -0, 3, .01 ) y <- laguerre.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/laguerre.recurrences.Rd0000644000176000001440000000331212103551444020240 0ustar ripleyusers\name{laguerre.recurrences} \alias{laguerre.recurrences} \title{ Recurrence relations for Laguerre polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Laguerre polynomial, \eqn{L_n \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ laguerre.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{glaguerre.recurrences}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Laguerre polynomials ### of orders 0 to 10. ### normalized.r <- laguerre.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Laguerre polynomials ### of orders 0 to 10. ### unnormalized.r <- laguerre.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/laguerre.polynomials.Rd0000644000176000001440000000417712103551444020300 0ustar ripleyusers\name{laguerre.polynomials} \alias{laguerre.polynomials} \title{ Create list of Laguerre polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Laguerre polynomials, \eqn{L_n \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ laguerre.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{laguerre.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Laguerre polynomial} \item{2 }{order 1 Laguerre polynomial} ... \item{n+1 }{order \eqn{n} Laguerre polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{laguerre.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Laguerre polynomials of orders 0 to 10 ### normalized.p.list <- laguerre.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Laguerre polynomials of orders 0 to 10 ### unnormalized.p.list <- laguerre.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/laguerre.inner.products.Rd0000644000176000001440000000303112103551444020673 0ustar ripleyusers\name{laguerre.inner.products} \alias{laguerre.inner.products} \title{ Inner products of Laguerre polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Laguerre polynomial, \eqn{L_n \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ laguerre.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {L_n |L_n } \right\rangle = 1}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### Laguerre polynomial inner products of orders 0 to 10 ### h <- laguerre.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/jacobi.p.weight.Rd0000644000176000001440000000313612103551444017072 0ustar ripleyusers\name{jacobi.p.weight} \alias{jacobi.p.weight} \title{ Weight function for the Jacobi polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Jacobi polynomial, \eqn{P_k^{\left( {\alpha ,\beta } \right)} \left( x \right)}. } \usage{ jacobi.p.weight(x,alpha,beta) } \arguments{ \item{x}{ the function argument which can be a vector } \item{alpha}{ the first polynomial parameter } \item{beta}{ the second polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \left( {1 - x} \right)^\alpha \;\left( {1 + x} \right)^\beta } } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Jacobi P weight function for argument values ### between -1 and 1 ### x <- seq( -1, 1, .01 ) y <- jacobi.p.weight( x, 2, 2 ) } \keyword{ math } orthopolynom/man/jacobi.p.recurrences.Rd0000644000176000001440000000377512103551444020134 0ustar ripleyusers\name{jacobi.p.recurrences} \alias{jacobi.p.recurrences} \title{ Recurrence relations for Jacobi polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Jacobi polynomial, \eqn{P_k^{\left( {\alpha ,\beta } \right)} \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ jacobi.p.recurrences(n, alpha, beta, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the first polynomial parameter } \item{beta}{ numeric value for the second polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{jacobi.p.inner.products}}, \code{\link{pochhammer}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Jacobi P polynomials ### of orders 0 to 10. ### parameter a is 2 and parameter b is 2 ### normalized.r <- jacobi.p.recurrences( 10, 2, 2, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the unnormalized Jacobi P polynomials ### of orders 0 to 10. ### parameter a is 2 and parameter b is 2 ### unnormalized.r <- jacobi.p.recurrences( 10, 2, 2, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/jacobi.p.polynomials.Rd0000644000176000001440000000470312103551444020152 0ustar ripleyusers\name{jacobi.p.polynomials} \alias{jacobi.p.polynomials} \title{ Create list of Jacobi polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Jacobi polynomials, \eqn{P_k^{\left( {\alpha ,\beta } \right)} \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ jacobi.p.polynomials(n, alpha, beta, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the first polynomial parameter } \item{beta}{ numeric value for the second polynomial parameter } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{jacobi.p.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Jacobi polynomial} \item{2 }{order 1 Jacobi polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{jacobi.p.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Jacobi P polynomials of orders 0 to 10 ### first parameter value a is 2 and second parameter value b is 2 ### normalized.p.list <- jacobi.p.polynomials( 10, 2, 2, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Jacobi P polynomials of orders 0 to 10 ### first parameter value a is 2 and second parameter value b is 2 ### unnormalized.p.list <- jacobi.p.polynomials( 10, 2, 2, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/jacobi.p.inner.products.Rd0000644000176000001440000000372412103551444020563 0ustar ripleyusers\name{jacobi.p.inner.products} \alias{jacobi.p.inner.products} \title{ Inner products of Jacobi polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Jacobi polynomial, \eqn{P_k^{\left( {\alpha ,\beta } \right)} \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ jacobi.p.inner.products(n,alpha,beta) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the first polynomial parameter } \item{beta}{ numeric value for the first polynomial parameter } } \details{ The formula used to compute the innser products is as follows. \eqn{h_n = \left\langle {P_n^{\left( {\alpha ,\beta } \right)} |P_n^{\left( {\alpha ,\beta } \right)} } \right\rangle = \frac{{2^{\alpha + \beta + 1} }} {{2\,n + \alpha + \beta + 1}}\frac{{\Gamma \left( {n + \alpha + 1} \right)\,\Gamma \left( {n + \beta + 1} \right)}} {{n!\;\Gamma \left( {n + \alpha + \beta + 1} \right)}}}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner product vector for the P Jacobi polynomials of orders 0 to 10 ### h <- jacobi.p.inner.products( 10, 2, 2 ) print( h ) } \keyword{ math } orthopolynom/man/jacobi.matrices.Rd0000644000176000001440000000203712103551444017153 0ustar ripleyusers\name{jacobi.matrices} \alias{jacobi.matrices} \title{ Create list of Jacobi matrices from monic recurrence parameters } \description{ Return a list of $n$ real symmetric, tri-diagonal matrices which are the principal minors of the \eqn{n \times n} Jacobi matrix derived from the monic recurrence parameters, \eqn{a} and \eqn{b}, for orthogonal polynomials. } \usage{ jacobi.matrices(r) } \arguments{ \item{r}{ a data frame containing the parameters \eqn{a} and \eqn{b} } } \value{ A list of symmetric, tri-diagnonal matrices \item{1 }{a \eqn{1 \times 1} matrix} \item{2 }{a \eqn{2 \times 2} matrix} ... \item{n }{an \eqn{n \times n} matrix} } \references{ Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ r <- chebyshev.t.recurrences( 5 ) m.r <- monic.polynomial.recurrences( r ) j.m <- jacobi.matrices( m.r ) } \keyword{ math } orthopolynom/man/jacobi.g.weight.Rd0000644000176000001440000000307412103551444017062 0ustar ripleyusers\name{jacobi.g.weight} \alias{jacobi.g.weight} \title{ Weight function for the Jacobi polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Jacobi polynomial, \eqn{G_k \left( {p,q,x} \right)}. } \usage{ jacobi.g.weight(x,p,q) } \arguments{ \item{x}{ the function argument which can be a vector } \item{p}{ the first polynomial parameter } \item{q}{ the second polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \left( {1 - x} \right)^{p - q} \;x^{q - 1}} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Jacobi G weight function for argument values ### between 0 and 1 ### parameter p is 3 and q is 2 ### x <- seq( 0, 1, .01 ) y <- jacobi.g.weight( x, 3, 2 ) } \keyword{ math } orthopolynom/man/jacobi.g.recurrences.Rd0000644000176000001440000000372212103551444020113 0ustar ripleyusers\name{jacobi.g.recurrences} \alias{jacobi.g.recurrences} \title{ Recurrence relations for Jacobi polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Jacobi polynomial, \eqn{G_k \left( {p,q,x} \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ jacobi.g.recurrences(n, p, q, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{p}{ numeric value for the first polynomial parameter } \item{q}{ numeric value for the second polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{jacobi.g.inner.products}}, \code{\link{pochhammer}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Jacobi G polynomials ### of orders 0 to 10. ### parameter p is 3 and parameter q is 2 ### normalized.r <- jacobi.g.recurrences( 10, 3, 2, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Jacobi G polynomials ### of orders 0 to 10. ### parameter p is 3 and parameter q is 2 ### unnormalized.r <- jacobi.g.recurrences( 10, 3, 2, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/jacobi.g.polynomials.Rd0000644000176000001440000000462312103551444020142 0ustar ripleyusers\name{jacobi.g.polynomials} \alias{jacobi.g.polynomials} \title{ Create list of Jacobi polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Jacobi polynomials, \eqn{G_k \left( {p,q,x} \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ jacobi.g.polynomials(n, p, q, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{p}{ numeic value for the first polynomial parameter } \item{q}{ numeric value for the second polynomial parameter } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{jacobi.g.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Jacobi polynomial} \item{2 }{order 1 Jacobi polynomial} ... \item{n+1 }{order \eqn{n} Jacobi polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{jacobi.g.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Jacobi G polynomials of orders 0 to 10 ### first parameter value p is 3 and second parameter value q is 2 ### normalized.p.list <- jacobi.g.polynomials( 10, 3, 2, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of normalized Jacobi G polynomials of orders 0 to 10 ### first parameter value p is 3 and second parameter value q is 2 ### unnormalized.p.list <- jacobi.g.polynomials( 10, 3, 2, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/jacobi.g.inner.products.Rd0000644000176000001440000000360712103551444020552 0ustar ripleyusers\name{jacobi.g.inner.products} \alias{jacobi.g.inner.products} \title{ Inner products of Jacobi polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Jacobi polynomial, \eqn{G_k \left( {p,q,x} \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ jacobi.g.inner.products(n,p,q) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{p}{ numeric value for the first polynomial parameter } \item{q}{ numeric value for the first polynomial parameter } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {G_n |G_n } \right\rangle = \frac{{n!\;\Gamma \left( {n + q} \right)\,\Gamma \left( {n + p} \right)\,\Gamma \left( {n + p - q + 1} \right)}} {{\left( {2\,n + p} \right)\,\left[ {\Gamma \left( {2\,n + p} \right)} \right]^2 }}}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### G Jacobi polynomials of orders 0 to 10 ### parameter p is 3 and parameter q is 2 ### h <- jacobi.g.inner.products( 10, 3, 2 ) print( h ) } \keyword{ math } orthopolynom/man/hermite.he.weight.Rd0000644000176000001440000000271412103551444017436 0ustar ripleyusers\name{hermite.he.weight} \alias{hermite.he.weight} \title{ Weight function for the Hermite polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Hermite polynomial, \eqn{He_k \left( x \right)}. } \usage{ hermite.he.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -\infty,\infty \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \exp \left( { - \frac{{x^2 }}{2}} \right)} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the scaled Hermite weight function for argument values ### between -3 and 3 ### x <- seq( -3, 3, .01 ) y <- hermite.he.weight( x ) } \keyword{ math } orthopolynom/man/hermite.he.recurrences.Rd0000644000176000001440000000333312103551444020465 0ustar ripleyusers\name{hermite.he.recurrences} \alias{hermite.he.recurrences} \title{ Recurrence relations for Hermite polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Hermite polynomial, \eqn{He_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ hermite.he.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{hermite.he.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Hermite H polynomials ### of orders 0 to 10. ### normalized.r <- hermite.he.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the unnormalized Hermite H polynomials ### of orders 0 to 10. ### unnormalized.r <- hermite.he.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/hermite.he.polynomials.Rd0000644000176000001440000000420612103551444020513 0ustar ripleyusers\name{hermite.he.polynomials} \alias{hermite.he.polynomials} \title{ Create list of Hermite polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Hermite polynomials, \eqn{He_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ hermite.he.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for thehighest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{hermite.he.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Hermite polynomial} \item{2 }{order 1 Hermite polynomial} ... \item{n+1 }{order \eqn{n} Hermite polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{hermite.he.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Hermite polynomials of orders 0 to 10 ### normalized.p.list <- hermite.he.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Hermite polynomials of orders 0 to 10 ### unnormalized.p.list <- hermite.he.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/hermite.he.inner.products.Rd0000644000176000001440000000305512103551444021123 0ustar ripleyusers\name{hermite.he.inner.products} \alias{hermite.he.inner.products} \title{ Inner products of Hermite polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Hermite polynomial, \eqn{He_k \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ hermite.he.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {He_n |He_n } \right\rangle = \sqrt {2\,\pi } \;n!}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### scaled Hermite polynomials of orders 0 to 10 ### h <- hermite.he.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/hermite.h.weight.Rd0000644000176000001440000000266012103551444017271 0ustar ripleyusers\name{hermite.h.weight} \alias{hermite.h.weight} \title{ Weight function for the Hermite polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Hermite polynomial, \eqn{H_k \left( x \right)}. } \usage{ hermite.h.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -\infty,\infty \right) }. The formula used to compute the weight function. \eqn{w\left( x \right) = \exp \left( { - x^2 } \right)} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Hermite weight function for argument values ### between -3 and 3 x <- seq( -3, 3, .01 ) y <- hermite.h.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/hermite.h.recurrences.Rd0000644000176000001440000000332512103551444020321 0ustar ripleyusers\name{hermite.h.recurrences} \alias{hermite.h.recurrences} \title{ Recurrence relations for Hermite polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Hermite polynomial, \eqn{H_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ hermite.h.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{hermite.h.inner.products}}, } \examples{ ### ### generate the recurrences data frame for ### the normalized Hermite H polynomials ### of orders 0 to 10. ### normalized.r <- hermite.h.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the unnormalized Hermite H polynomials ### of orders 0 to 10. ### unnormalized.r <- hermite.h.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/hermite.h.polynomials.Rd0000644000176000001440000000417412103551444020352 0ustar ripleyusers\name{hermite.h.polynomials} \alias{hermite.h.polynomials} \title{ Create list of Hermite polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Hermite polynomials, \eqn{H_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ hermite.h.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{hermite.h.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Hermite polynomial} \item{2 }{order 1 Hermite polynomial} ... \item{n+1 }{order \eqn{n} Hermite polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{hermite.h.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Hermite polynomials of orders 0 to 10 ### normalized.p.list <- hermite.h.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Hermite polynomials of orders 0 to 10 ### unnormalized.p.list <- hermite.h.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/hermite.h.inner.products.Rd0000644000176000001440000000303412103551444020753 0ustar ripleyusers\name{hermite.h.inner.products} \alias{hermite.h.inner.products} \title{ Inner products of Hermite polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Hermite polynomial, \eqn{H_k \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ hermite.h.inner.products(n) } \arguments{ \item{n}{ integer value for highest polynomial order } } \details{ The formula used to compute the innner product is as follows. \eqn{h_n = \left\langle {H_n |H_n } \right\rangle = \sqrt \pi \;2^n \;n!}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### Hermite polynomials of orders 0 to 10 ### h <- hermite.h.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/glaguerre.weight.Rd0000644000176000001440000000307612103551444017365 0ustar ripleyusers\name{glaguerre.weight} \alias{glaguerre.weight} \title{ Weight function for the generalized Laguerre polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} generalized Laguerre polynomial, \eqn{L_n^{\left( \alpha \right)} \left( x \right)}. } \usage{ glaguerre.weight(x,alpha) } \arguments{ \item{x}{ the function argument which can be a vector } \item{alpha}{ polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( 0,\infty \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = e^{ - x} \,x^\alpha } } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the generalized Laguerre weight function for argument values ### between -3 and 3 ### polynomial parameter value is 1.0 ### x <- seq( -3, 3, .01 ) y <- glaguerre.weight( x, 1 ) } \keyword{ math } orthopolynom/man/glaguerre.recurrences.Rd0000644000176000001440000000366612103551444020423 0ustar ripleyusers\name{glaguerre.recurrences} \alias{glaguerre.recurrences} \title{ Recurrence relations for generalized Laguerre polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} generalized Laguerre polynomial, \eqn{L_n^{\left( \alpha \right)} \left( x \right)} and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ glaguerre.recurrences(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{glaguerre.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized generalized Laguerre polynomials ### of orders 0 to 10. the polynomial parameter value is 1.0. ### normalized.r <- glaguerre.recurrences( 10, 1, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the unnormalized generalized Laguerre polynomials ### of orders 0 to 10. the polynomial parameter value is 1.0. ### unnormalized.r <- glaguerre.recurrences( 10, 1, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/glaguerre.polynomials.Rd0000644000176000001440000000454212103551444020443 0ustar ripleyusers\name{glaguerre.polynomials} \alias{glaguerre.polynomials} \title{ Create list of generalized Laguerre polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{n} generalized Laguerre polynomials, \eqn{L_n^{\left( \alpha \right)} \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ glaguerre.polynomials(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the polynomial parameter } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{glaguerre.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 generalized Laguerre polynomial} \item{2 }{order 1 generalized Laguerre polynomial} ... \item{n+1 }{order \eqn{n} generalized Laguerre polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{glaguerre.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized generalized Laguerre polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### normalized.p.list <- glaguerre.polynomials( 10, 1, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized generalized Laguerre polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### unnormalized.p.list <- glaguerre.polynomials( 10, 1, normalized=FALSE ) } \keyword{ math } orthopolynom/man/glaguerre.inner.products.Rd0000644000176000001440000000340512103551444021047 0ustar ripleyusers\name{glaguerre.inner.products} \alias{glaguerre.inner.products} \title{ Inner products of generalized Laguerre polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} generalized Laguerre polynomial, \eqn{L_n^{\left( \alpha \right)} \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ glaguerre.inner.products(n,alpha) } \arguments{ \item{n}{ integer highest polynomial order } \item{alpha}{ polynomial parameter } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {L_n^{\left( \alpha \right)} |L_n^{\left( \alpha \right)} } \right\rangle = \frac{{\Gamma \left( {\alpha + n + 1} \right)}} {{n!}}}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### generalized Laguerre polynomial inner products of orders 0 to 10 ### polynomial parameter is 1. ### h <- glaguerre.inner.products( 10, 1 ) print( h ) } \keyword{ math } orthopolynom/man/ghermite.h.weight.Rd0000644000176000001440000000320612103551444017435 0ustar ripleyusers\name{ghermite.h.weight} \alias{ghermite.h.weight} \title{ Weight function for the generalized Hermite polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} generalized Hermite polynomial, \eqn{H_k^{\left( \mu \right)} \left( x \right) }. } \usage{ ghermite.h.weight(x, mu) } \arguments{ \item{x}{ a numeric vector function argument } \item{mu}{ polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -\infty,\infty \right) }. The parameter \eqn{\mu} must be greater than -0.5. The formula used to compute the generalized Hermite weight function is as follows. \eqn{w\left( {x,\mu } \right) = \left| x \right|^{2\;\mu } \;\exp \left( { - x^2 } \right)} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the generalized Hermite weight function for argument values ### between -3 and 3 ### x <- seq( -3, 3, .01 ) y <- ghermite.h.weight( x, 1 ) } \keyword{ math } orthopolynom/man/ghermite.h.recurrences.Rd0000644000176000001440000000440112103551444020464 0ustar ripleyusers\name{ghermite.h.recurrences} \alias{ghermite.h.recurrences} \title{ Recurrence relations for generalized Hermite polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} generalized Hermite polynomial, \eqn{H_k^{\left( \mu \right)} \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ ghermite.h.recurrences(n, mu, normalized = FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{mu}{ numeric value for the polynomial parameter } \item{normalized}{ \code{normalized} boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \details{ The parameter \eqn{\mu} must be greater than -0.5. } \value{ A data frame with the recurrence relation parameters. } \references{ Alvarez-Nordase, R., M. K. Atakishiyeva and N. M. Atakishiyeva, 2004. A q-extension of the generalized Hermite polynomials with continuous orthogonality property on R, \emph{International Journal of Pure and Applied Mathematics}, 10(3), 335-347. Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{ghermite.h.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized generalized Hermite polynomials ### of orders 0 to 10. ### polynomial parameter value is 1.0 ### normalized.r <- ghermite.h.recurrences( 10, 1, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the unnormalized generalized Hermite polynomials ### of orders 0 to 10. ### polynomial parameter value is 1.0 ### unnormalized.r <- ghermite.h.recurrences( 10, 1, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/ghermite.h.polynomials.Rd0000644000176000001440000000525612103551444020523 0ustar ripleyusers\name{ghermite.h.polynomials} \alias{ghermite.h.polynomials} \title{ Create list of generalized Hermite polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} generalized Hermite polynomials, \eqn{H_k^{\left( \mu \right)} \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ ghermite.h.polynomials(n, mu, normalized = FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{mu}{ numeric value for the polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \details{ The parameter \eqn{\mu} must be greater than -0.5. The function \code{ghermite.h.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 generalized Hermite polynomial} \item{2 }{order 1 generalized Hermite polynomial} ... \item{n+1 }{order \eqn{n} generalized Hermite polynomial} } \references{ Alvarez-Nordase, R., M. K. Atakishiyeva and N. M. Atakishiyeva, 2004. A q-extension of the generalized Hermite polynomials with continuous orthogonality property on R, \emph{International Journal of Pure and Applied Mathematics}, 10(3), 335-347. Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{ghermite.h.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized generalized Hermite polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### normalized.p.list <- ghermite.h.polynomials( 10, 1, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized generalized Hermite polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### unnormalized.p.list <- ghermite.h.polynomials( 10, 1, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/ghermite.h.inner.products.Rd0000644000176000001440000000363412103551444021130 0ustar ripleyusers\name{ghermite.h.inner.products} \alias{ghermite.h.inner.products} \title{ Inner products of generalized Hermite polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} generalized Hermite polynomial, \eqn{H_k^{\left( \mu \right)} \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ ghermite.h.inner.products(n, mu) } \arguments{ \item{n}{ \code{n} integer value for the highest polynomial order } \item{mu}{ \code{mu} polynomial parameter } } \details{ The parameter \eqn{\mu} must be greater than -0.5. The formula used to compute the inner products is as follows. \eqn{h_n \left( \mu \right) = \left\langle {H_m^{\left( \mu \right)} |H_n^{\left( \mu \right)} } \right\rangle = 2^{2\,n} \,\left[ {\frac{n} {2}} \right]!\;\Gamma \left( {\left[ {\frac{{n + 1}} {2}} \right] + \mu + \frac{1} {2}} \right)} } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### generalized Hermite polynomials of orders 0 to 10 ### polynomial parameter is 1 ### h <- ghermite.h.inner.products( 10, 1 ) print( h ) } \keyword{ math } orthopolynom/man/gegenbauer.weight.Rd0000644000176000001440000000303012103551444017502 0ustar ripleyusers\name{gegenbauer.weight} \alias{gegenbauer.weight} \title{ Weight function for the Gegenbauer polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Gegenbauer polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}. } \usage{ gegenbauer.weight(x,alpha) } \arguments{ \item{x}{ the function argument which can be a vector } \item{alpha}{ polynomial parameter } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \left( {1 - x^2 } \right)^{\alpha - 0.5} } } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the Gegenbauer weight function for argument values between -1 and 1 ### x <- seq( -1, 1, .01 ) y <- gegenbauer.weight( x, 1 ) plot( x, y ) } \keyword{ math } orthopolynom/man/gegenbauer.recurrences.Rd0000644000176000001440000000361512103551444020544 0ustar ripleyusers\name{gegenbauer.recurrences} \alias{gegenbauer.recurrences} \title{ Recurrence relations for Gegenbauer polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Gegenbauer polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ gegenbauer.recurrences(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{numeric value for polynomial parameter } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{gegenbauer.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Gegenbauer polynomials ### of orders 0 to 10. ### polynomial parameter value is 1.0 ### normalized.r <- gegenbauer.recurrences( 10, 1, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Gegenbauer polynomials ### of orders 0 to 10. ### polynomial parameter value is 1.0 ### unnormalized.r <- gegenbauer.recurrences( 10, 1, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/gegenbauer.polynomials.Rd0000644000176000001440000000445212103551444020572 0ustar ripleyusers\name{gegenbauer.polynomials} \alias{gegenbauer.polynomials} \title{ Create list of Gegenbauer polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Gegenbauer polynomials, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ gegenbauer.polynomials(n, alpha, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ polynomial parameter } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{gegenbauer.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Gegenbauer polynomial} \item{2 }{order 1 Gegenbauer polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{gegenbauer.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized Gegenbauer polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### normalized.p.list <- gegenbauer.polynomials( 10, 1, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized Gegenbauer polynomials of orders 0 to 10 ### polynomial parameter is 1.0 ### unnormalized.p.list <- gegenbauer.polynomials( 10, 1, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/gegenbauer.inner.products.Rd0000644000176000001440000000407212103551444021177 0ustar ripleyusers\name{gegenbauer.inner.products} \alias{gegenbauer.inner.products} \title{ Inner products of Gegenbauer polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Gegenbauer polynomial, \eqn{C_k^{\left( \alpha \right)} \left( x \right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ gegenbauer.inner.products(n,alpha) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{alpha}{ numeric value for the polynomial parameter } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {C_n^{\left( \alpha \right)} |C_n^{\left( \alpha \right)} } \right\rangle = \left\{ {\begin{array}{*{20}c} {\frac{{\pi \;2^{1 - 2\,\alpha } \,\Gamma \left( {n + 2\,\alpha } \right)}} {{n!\;\left( {n + \alpha } \right)\,\left[ {\Gamma \left( \alpha \right)} \right]^2 }}} & {\alpha \ne 0} \\ {\frac{{2\;\pi }} {{n^2 }}} & {\alpha = 0} \\ \end{array} } \right.}. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{ultraspherical.inner.products}} } \examples{ ### ### generate the inner products vector for the ### Gegenbauer polynomials of orders 0 to 10 ### the polynomial parameter is 1.0 ### h <- gegenbauer.inner.products( 10, 1 ) print( h ) } \keyword{ math } orthopolynom/man/chebyshev.u.weight.Rd0000644000176000001440000000270212103551444017626 0ustar ripleyusers\name{chebyshev.u.weight} \alias{chebyshev.u.weight} \title{ Weight function for the Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Chebyshev polynomial of the second kind, \eqn{U_k \left( x \right) }. } \usage{ chebyshev.u.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \sqrt {1 - x^2 } } } \value{ The value of the weight function. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the U Chebyshev function for argument values between -2 and 2 ### x <- seq( -1, 1, .01 ) y <- chebyshev.u.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/chebyshev.u.recurrences.Rd0000644000176000001440000000336112103551444020661 0ustar ripleyusers\name{chebyshev.u.recurrences} \alias{chebyshev.u.recurrences} \title{ Recurrence relations for Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Chebyshev polynomial of the second kind, \eqn{U_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.u.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.u.inner.products}} } \examples{ ### ### generate the recurrence relations for ### the normalized U Chebyshev polynomials ### of orders 0 to 10 ### normalized.r <- chebyshev.u.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the unnormalized U Chebyshev polynomials ### of orders 0 to 10 ### unnormalized.r <- chebyshev.u.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/chebyshev.u.polynomials.Rd0000644000176000001440000000426112103551444020707 0ustar ripleyusers\name{chebyshev.u.polynomials} \alias{chebyshev.u.polynomials} \title{ Create list of Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Chebyshev polynomials of the second kind, \eqn{U_k \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.u.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{chebyshev.u.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Chebyshev polynomial} \item{2 }{order 1 Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.u.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized U Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- chebyshev.u.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized T Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- chebyshev.u.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/chebyshev.u.inner.products.Rd0000644000176000001440000000307312103551444021316 0ustar ripleyusers\name{chebyshev.u.inner.products} \alias{chebyshev.u.inner.products} \title{ Inner products of Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Chebyshev polynomial of the second kind, \eqn{U_k \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ chebyshev.u.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {U_n |U_n } \right\rangle = \frac{\pi }{2}} } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### U Chebyshev polynomials of orders 0 to 10 ### h <- chebyshev.u.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/chebyshev.t.weight.Rd0000644000176000001440000000271412103551444017630 0ustar ripleyusers\name{chebyshev.t.weight} \alias{chebyshev.t.weight} \title{ Weight function for the Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Chebyshev polynomial of the first kind, \eqn{T_k \left( x \right) }. } \usage{ chebyshev.t.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -1,1 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \frac{1}{{\sqrt {1 - x^2 } }}} } \value{ The value of the weight function. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the T Chebyshev function for argument values between -2 and 2 x <- seq( -1, 1, .01 ) y <- chebyshev.t.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/chebyshev.t.recurrences.Rd0000644000176000001440000000335612103551444020664 0ustar ripleyusers\name{chebyshev.t.recurrences} \alias{chebyshev.t.recurrences} \title{ Recurrence relations for Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Chebyshev polynomial of the first kind, \eqn{T_k \left( x \right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.t.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.t.inner.products}} } \examples{ ### ### generate the recurrence relations for ### the normalized T Chebyshev polynomials ### of orders 0 to 10 ### normalized.r <- chebyshev.t.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrence relations for ### the normalized T Chebyshev polynomials ### of orders 0 to 10 ### unnormalized.r <- chebyshev.t.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/chebyshev.t.polynomials.Rd0000644000176000001440000000426012103551444020705 0ustar ripleyusers\name{chebyshev.t.polynomials} \alias{chebyshev.t.polynomials} \title{ Create list of Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Chebyshev polynomials of the first kind, \eqn{T_k \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.t.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{chebyshev.t.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Chebyshev polynomial} \item{2 }{order 1 Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.u.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized T Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- chebyshev.t.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized T Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- chebyshev.t.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/chebyshev.t.inner.products.Rd0000644000176000001440000000324112103551444021312 0ustar ripleyusers\name{chebyshev.t.inner.products} \alias{chebyshev.t.inner.products} \title{ Inner products of Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Chebyshev polynomial of the first kind, \eqn{T_k \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ chebyshev.t.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {T_n |T_n } \right\rangle = \left\{ {\begin{array}{*{20}c} {\frac{\pi } {2}} & {n \ne 0} \\ \pi & {n = 0} \\ \end{array} } \right.} } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### T Chybyshev polynomials of orders 0 to 10 ### h <- chebyshev.t.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/chebyshev.s.weight.Rd0000644000176000001440000000271612103551444017631 0ustar ripleyusers\name{chebyshev.s.weight} \alias{chebyshev.s.weight} \title{ Weight function for the Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Chebyshev polynomial of the second kind, \eqn{S_k \left( x \right) }. } \usage{ chebyshev.s.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -2,2 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \sqrt {1 - \frac{{x^2 }}{4}}} } \value{ The value of the weight function. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the S Chebyshev weight function for arguments between -2 and 2 ### x <- seq( -2, 2, .01 ) y <- chebyshev.s.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/chebyshev.s.recurrences.Rd0000644000176000001440000000337112103551444020660 0ustar ripleyusers\name{chebyshev.s.recurrences} \alias{chebyshev.s.recurrences} \title{ Recurrence relations for Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Chebyshev polynomial of the second kind, \eqn{S_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.s.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.s.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Chebyshev S polynomials ### of orders 0 to 10. ### normalized.r <- chebyshev.s.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Chebyshev S polynomials ### of orders 0 to 10. ### unnormalized.r <- chebyshev.s.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/chebyshev.s.polynomials.Rd0000644000176000001440000000426112103551444020705 0ustar ripleyusers\name{chebyshev.s.polynomials} \alias{chebyshev.s.polynomials} \title{ Create list of Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Chebyshev polynomials of the second kind, \eqn{S_k \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.s.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{chebyshev.s.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Chebyshev polynomial} \item{2 }{order 1 Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.s.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized S Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- chebyshev.s.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized S Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- chebyshev.s.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/chebyshev.s.inner.products.Rd0000644000176000001440000000306212103551444021312 0ustar ripleyusers\name{chebyshev.s.inner.products} \alias{chebyshev.s.inner.products} \title{ Inner products of Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Chebyshev polynomial of the second kind, \eqn{S_k \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ chebyshev.s.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {S_n |S_n } \right\rangle = \pi }. } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \examples{ ### ### generate the inner products vector for the ### S Chebyshev polynomials of orders 0 to 10 ### h <- chebyshev.s.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/man/chebyshev.c.weight.Rd0000644000176000001440000000274112103551444017607 0ustar ripleyusers\name{chebyshev.c.weight} \alias{chebyshev.c.weight} \title{ Weight function for the Chebyshev polynomial } \description{ This function returns the value of the weight function for the order \eqn{k} Chebyshev polynomial of the first kind, \eqn{C_k \left( x \right) }. } \usage{ chebyshev.c.weight(x) } \arguments{ \item{x}{ the function argument which can be a vector } } \details{ The function takes on non-zero values in the interval \eqn{ \left( -2,2 \right) }. The formula used to compute the weight function is as follows. \eqn{w\left( x \right) = \frac{1} {{\sqrt {1 - \frac{{x^2 }} {4}} }}} } \value{ The value of the weight function } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 1992. \emph{Numerical Recipes in C}, Cambridge University Press, Cambridge, U.K. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{ fnovomes@poly.edu } } \examples{ ### ### compute the C Chebyshev weight function for arguments between -3 and 3 ### x <- seq( -3, 3, .01 ) y <- chebyshev.c.weight( x ) plot( x, y ) } \keyword{ math } orthopolynom/man/chebyshev.c.recurrences.Rd0000644000176000001440000000337012103551444020637 0ustar ripleyusers\name{chebyshev.c.recurrences} \alias{chebyshev.c.recurrences} \title{ Recurrence relations for Chebyshev polynomials } \description{ This function returns a data frame with \eqn{n + 1} rows and four named columns containing the coefficient vectors \bold{c}, \bold{d}, \bold{e} and \bold{f} of the recurrence relations for the order \eqn{k} Chebyshev polynomial of the first kind, \eqn{C_k \left( x \right)}, and for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.c.recurrences(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ boolean value which, if TRUE, returns recurrence relations for normalized polynomials } } \value{ A data frame with the recurrence relation parameters. } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.c.inner.products}} } \examples{ ### ### generate the recurrences data frame for ### the normalized Chebyshev C polynomials ### of orders 0 to 10. ### normalized.r <- chebyshev.c.recurrences( 10, normalized=TRUE ) print( normalized.r ) ### ### generate the recurrences data frame for ### the normalized Chebyshev C polynomials ### of orders 0 to 10. ### unnormalized.r <- chebyshev.c.recurrences( 10, normalized=FALSE ) print( unnormalized.r ) } \keyword{ math } orthopolynom/man/chebyshev.c.polynomials.Rd0000644000176000001440000000426012103551444020664 0ustar ripleyusers\name{chebyshev.c.polynomials} \alias{chebyshev.c.polynomials} \title{ Create list of Chebyshev polynomials } \description{ This function returns a list with \eqn{n + 1} elements containing the order \eqn{k} Chebyshev polynomials of the first kind, \eqn{C_k \left( x\right)}, for orders \eqn{k = 0,\;1,\; \ldots ,\;n}. } \usage{ chebyshev.c.polynomials(n, normalized=FALSE) } \arguments{ \item{n}{ integer value for the highest polynomial order } \item{normalized}{ a boolean value which, if TRUE, returns a list of normalized orthogonal polynomials } } \details{ The function \code{chebyshev.c.recurrences} produces a data frame with the recurrence relation parameters for the polynomials. If the \code{normalized} argument is FALSE, the function \code{orthogonal.polynomials} is used to construct the list of orthogonal polynomial objects. Otherwise, the function \code{orthonormal.polynomials} is used to construct the list of orthonormal polynomial objects. } \value{ A list of \eqn{n + 1} polynomial objects \item{1 }{order 0 Chebyshev polynomial} \item{2 }{order 1 Chebyshev polynomial} ... \item{n+1 }{order \eqn{n} Chebyshev polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{chebyshev.c.recurrences}}, \code{\link{orthogonal.polynomials}}, \code{\link{orthonormal.polynomials}} } \examples{ ### ### gemerate a list of normalized C Chebyshev polynomials of orders 0 to 10 ### normalized.p.list <- chebyshev.c.polynomials( 10, normalized=TRUE ) print( normalized.p.list ) ### ### gemerate a list of unnormalized C Chebyshev polynomials of orders 0 to 10 ### unnormalized.p.list <- chebyshev.c.polynomials( 10, normalized=FALSE ) print( unnormalized.p.list ) } \keyword{ math } orthopolynom/man/chebyshev.c.inner.products.Rd0000644000176000001440000000332612103551444021275 0ustar ripleyusers\name{chebyshev.c.inner.products} \alias{chebyshev.c.inner.products} \title{ Inner products of Chebyshev polynomials } \description{ This function returns a vector with \eqn{n + 1} elements containing the inner product of an order \eqn{k} Chebyshev polynomial of the first kind, \eqn{C_k \left( x\right)}, with itself (i.e. the norm squared) for orders \eqn{k = 0,\;1,\; \ldots ,\;n }. } \usage{ chebyshev.c.inner.products(n) } \arguments{ \item{n}{ integer value for the highest polynomial order } } \details{ The formula used to compute the inner products is as follows. \eqn{h_n = \left\langle {C_n |C_n } \right\rangle = \left\{ {\begin{array}{*{20}c} {4\,\pi } & {n \ne 0} \\ {8\,\pi } & {n = 0} \\ \end{array} } \right.} } \value{ A vector with \eqn{n + 1} elements \item{1 }{inner product of order 0 orthogonal polynomial} \item{2 }{inner product of order 1 orthogonal polynomial} ... \item{n+1 }{inner product of order \eqn{n} orthogonal polynomial} } \references{ Abramowitz, M. and I. A. Stegun, 1968. \emph{Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}, Dover Publications, Inc., New York. Courant, R., and D. Hilbert, 1989. \emph{Methods of Mathematical Physics}, John Wiley, New York, NY. Szego, G., 1939. \emph{Orthogonal Polynomials}, 23, American Mathematical Society Colloquium Publications, Providence, RI. } \author{ Frederick Novomestky \email{fnovomes@poly.edu} } \seealso{ \code{\link{gegenbauer.inner.products}} } \examples{ ### ### generate the inner products vector for the ### C Chebyshev polynomials of orders 0 to 10 ### h <- chebyshev.c.inner.products( 10 ) print( h ) } \keyword{ math } orthopolynom/DESCRIPTION0000644000176000001440000000120412103654120014550 0ustar ripleyusersPackage: orthopolynom Version: 1.0-5 Date: 2013-02-03 Title: Collection of functions for orthogonal and orthonormal polynomials Author: Frederick Novomestky Maintainer: Frederick Novomestky Depends: R (>= 2.0.1), polynom Description: A collection of functions to construct sets of orthogonal polynomials and their recurrence relations. Additional functions are provided to calculate the derivative, integral, value and roots of lists of polynomial objects. License: GPL (>= 2) Packaged: 2013-02-03 21:14:14 UTC; fred Repository: CRAN Date/Publication: 2013-02-04 07:42:24