Skip to:Content
|
Bottom
Cover image for Numerical methods, algorithms and tools in C#
Title:
Numerical methods, algorithms and tools in C#
Personal Author:
Publication Information:
Boca Raton, FL : CRC Press, 2010
Physical Description:
xv, 580 p. : ill. ; 25 cm.
ISBN:
9780849374791

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010222289 QA297 D66 2010 Open Access Book Book
Searching...

On Order

Summary

Summary

Comprehensive Coverage of the New, Easy-to-Learn C#

Although C, C++, Java, and Fortran are well-established programming languages, the relatively new C# is much easier to use for solving complex scientific and engineering problems. Numerical Methods, Algorithms and Tools in C# presents a broad collection of practical, ready-to-use mathematical routines employing the exciting, easy-to-learn C# programming language from Microsoft.

The book focuses on standard numerical methods, novel object-oriented techniques, and the latest Microsoft .NET programming environment. It covers complex number functions, data sorting and searching algorithms, bit manipulation, interpolation methods, numerical manipulation of linear algebraic equations, and numerical methods for calculating approximate solutions of non-linear equations. The author discusses alternative ways to obtain computer-generated pseudo-random numbers and real random numbers generated by naturally occurring physical phenomena. He also describes various methods for approximating integrals and special functions, routines for performing statistical analyses of data, and least squares and numerical curve fitting methods for analyzing experimental data, along with numerical methods for solving ordinary and partial differential equations. The final chapter offers optimization methods for the minimization or maximization of functions.

Exploiting the useful features of C#, this book shows how to write efficient, mathematically intense object-oriented computer programs. The vast array of practical examples presented can be easily customized and implemented to solve complex engineering and scientific problems typically found in real-world computer applications.


Author Notes

Waldemar Dos Passos is a computer programming consultant in the Silicon Valley area of California. After completing his undergraduate education at the University of California, Berkeley, Dr. Dos Passos earned an M.S. in computer science and engineering along with a Ph.D. in physics from the University of Michigan, Ann Arbor. With more than twenty years of computer programming experience, he has published several papers in physics journals.


Table of Contents

l Introductionp. 1
1.1 C# and the.NET Frameworkp. 1
1.2 Installing C# and the.NET Frameworkp. 3
1.3 Overview of Object-Oriented Programming (OOP)p. 3
1.4 Your First C# Programp. 4
1.5 Overview of the IDE Debuggerp. 9
1.6 Overview of the C# Languagep. 11
1.6.1 Data Typesp. 12
1.6.2 Value Typesp. 13
1.6.3 Reference Typesp. 14
1.6.4 Type-Parameter Typesp. 16
1.6.5 Pointer Typesp. 17
1.6.6 Variable Declarationp. 17
1.6.7 Constant Declarationp. 18
1.6.8 Nullable Typesp. 18
1.6.9 Scopep. 18
1.6.10 Charactersp. 18
1.6.11 Stringsp. 19
1.6.12 Formatting of Output Datap. 19
1.6.13 Type Conversionp. 20
1.6.14 Reading Keyboard Input Datap. 23
1.6.15 Basic Expressions and Operatorsp. 24
1.6.16 Program Flow Mechanismsp. 27
1.6.17 Jump Statementsp. 29
1.6.18 Arraysp. 30
1.6.19 Enumerationsp. 32
1.6.20 Structuresp. 32
1.6.21 Exceptionsp. 33
1.6.22 Classesp. 34
Constructors and Destructorsp. 37
Propertiesp. 38
Methodsp. 38
1.6.23 Indexersp. 42
1.6.24 Overloading Methods, Constructors and Operatorsp. 42
1.6.25 Delegatesp. 43
1.6.26 Eventsp. 46
1.6.27 Collectionsp. 57
1.6.28 File Input/Outputp. 60
1.6.29 Output Reliability, Accuracy and Precisionp. 65
2 The.NET Framework Math Class Libraryp. 73
2.1 Introductionp. 73
2.2 The.NET Framework Math Class - Fieldsp. 73
2.2.1 The Math. pi and Math. e Fieldsp. 73
2.3 The.NET Framework Math Class - Methodsp. 74
2.3.1 The Minimum and Maximum Methodsp. 74
2.3.2 The Power, Exponential and Logarithmic Methodsp. 74
2.3.3 Special Multiplication, Division and Remainder Methodsp. 76
2.3.4 The Absolute Value Methodp. 77
2.3.5 The Sign Methodp. 78
2.3.6 Angular Units of Measurementp. 78
2.3.7 The Trigonometric Functionsp. 81
2.3.8 The Inverse Trigonometric Functionsp. 82
2.3.9 The Hyperbolic Functionsp. 86
2.3.10 The Inverse Hyperbolic Functionsp. 88
2.3.11 Rounding Off Numeric Datap. 89
The Ceiling Methodp. 89
The Floor Methodp. 90
The Truncation Methodp. 90
The Round Methodp. 91
3 Vectors and Matricesp. 97
3.1 Introductionp. 97
3.2 A Real Number Vector Library in C#p. 98
3.3 A Real Number Matrix Library in C#p. 106
4 Complex Numbersp. 121
4.1 Introductionp. 121
4.2 Fundamental Conceptsp. 121
4.3 Complex Number Arithmeticp. 123
4.4 Elementary Functions of a Complex Numberp. 125
4.4.1 Exponentialsp. 125
4.4.2 Logarithmsp. 125
4.4.3 Powers and Rootsp. 127
4.4.4 Trigonometric and Hyperbolic Functionsp. 128
4.4.5 Inverse Trigonometric and Hyperbolic Functionsp. 130
4.5 A Complex Number Library in C#p. 132
4.6 A Complex Number Vector Library in C#p. 151
4.7 A Complex Number Matrix Library in C#p. 158
4.8 Generic vs. Non-Generic Codingp. 168
5 Sorting and Searching Algorithmsp. 171
5.1 Introductionp. 171
5.2 Sorting Algorithmsp. 172
5.3 Comparison Sortsp. 175
5.3.1 Bubble Sortp. 175
5.3.2 Cocktail Sortp. 178
5.3.3 Odd-Even Sortp. 178
5.3.4 Comb Sortp. 179
5.3.5 Gnome Sortp. 180
5.3.6 Quicksortp. 181
5.3.7 Insertion Sortp. 182
5.3.8 Shell Sortp. 183
5.3.9 Selection Sortp. 184
5.3.10 Merge Sortp. 185
5.3.11 Bucket Sortp. 186
5.3.12 Heap Sortp. 187
5.4 Count Sortp. 188
5.5 Radix Sortp. 189
5.6 Search Algorithmsp. 191
5.6.1 Linear Searchp. 192
5.6.2 Binary Searchp. 193
5.6.3 Interpolation Searchp. 193
5.6.4 Searching for the Maximum and Minimum Valuesp. 194
5.6.5 Searching for the N-th Largest or M-th Smallest Valuep. 195
5.6.6 Some Useful Utilitiesp. 196
6 Bits and Bytesp. 199
6.1 Introductionp. 199
6.2 Numeric Systemsp. 199
6.3 Bit Manipulation and Bitwise Operatorsp. 202
6.4 Assorted Bits and Bytesp. 223
7 Interpolationp. 229
7.1 Introductionp. 229
7.2 Linear Interpolationp. 230
7.3 Bilinear Interpolationp. 231
7.4 Polynomial Interpolationp. 234
7.4.1 Lagrange Interpolationp. 234
7.4.2 Barycentric Interpolationp. 236
7.4.3 Newton's Divided Differences Interpolationp. 238
7.5 Cubic Spline Interpolationp. 242
7.5.1 Natural Cubic Splinesp. 244
7.5.2 Clamped Cubic Splinesp. 247
8 Linear Equationsp. 251
8.1 Introductionp. 251
8.2 Gaussian Eliminationp. 253
8.3 Gauss-Jordan Eliminationp. 254
8.4 LU Decompositionp. 256
8.5 Iteration Methodsp. 259
8.5.1 Gauss-Jacobi Iterationp. 259
8.5.2 Gauss-Seidel Iterationp. 261
8.6 Eigenvalues and Jacobi's Algorithmp. 264
9 Nonlinear Equationsp. 271
9.1 Introductionp. 271
9.2 Linear Incremental Methodp. 272
9.3 Bisection Methodp. 274
9.4 The Secant Methodp. 276
9.5 False Positioning Methodp. 277
9.6 Fixed Point Iterationp. 279
9.7 Newton-Raphson Methodp. 280
10 Random Numbersp. 283
10.1 Introductionp. 283
10.2 The C# Built-In Random Number Generatorp. 284
10.3 Other Random Number Generatorsp. 290
10.4 True Random Number Generatorsp. 295
10.5 Random Variate Generation Methodsp. 299
10.6 Histogramsp. 309
10.7 Random Variate Generationp. 312
10.7.1 Discrete Distributionsp. 312
Bernoulli Distributionp. 312
Binoulli Distributionp. 315
Geometric Distributionp. 317
Negative Binomial Distributionp. 320
Poisson Distributionp. 322
Uniform Distribution (discrete)p. 326
10.7.2 Continuous Distributionsp. 328
Beta Distributionp. 328
Beta Prime Distributionp. 330
Cauchy Distributionp. 332
Chi Distributionp. 334
Chi-Square Distributionp. 337
Erlang Distributionp. 340
Exponential Distributionp. 343
Extreme Value Distributionp. 345
Gamma Distributionp. 347
Laplace Distributionp. 349
Logistic Distributionp. 352
Lognormal Distributionp. 354
Normal Distributionp. 356
Pareto Distributionp. 359
Rayleigh Distributionp. 361
Student-t Distributionp. 363
Triangular Distributionp. 365
Uniform Distribution (continuous)p. 368
Weibull Distributionp. 370
10.8 Shuffling Algorithmsp. 372
10.9 Adding Random Noise to Datap. 376
10.10 Removing Random Noise from Datap. 379
11 Numerical Differentiationp. 383
11.1 Introductionp. 383
11.2 Finite Difference Formulasp. 383
11.2.1 Forward Difference Methodp. 385
11.2.2 Backward Difference Methodp. 387
11.2.3 Central Difference Methodp. 390
11.2.4 Improved Central Difference Methodp. 392
11.3 Richardson Extrapolationp. 395
11.4 Derivatives by Polynomial Interpolationp. 401
12 Numerical Integrationp. 405
12.1 Introductionp. 405
12.2 Newton-Cotes Formulasp. 406
12.2.1 Rectangle Methodp. 406
12.2.2 Midpoint Methodp. 408
12.2.3 Trapezoidal Methodp. 409
12.2.4 Simpson's Methodp. 411
Simpson's 1/3 Methodp. 411
Simpson's 3/8 Methodp. 412
12.3 Romberg Integrationp. 414
12.4 Gaussian Quadrature Methodsp. 416
12.4.1 Gauss-Legendre Integrationp. 417
12.4.2 Gauss-Hermite Integrationp. 419
12.4.3 Gauss-Leguerre Integrationp. 421
12.4.4 Gauss-Chebyshev Integrationp. 423
12.5 Multiple Integrationp. 424
12.6 Monte Carlo Methodsp. 426
12.6.1 Monte Carlo Integrationp. 427
12.6.2 The Metropolis Algorithmp. 428
12.7 Convolution Integralsp. 431
13 Statistical Functionsp. 435
13.1 Introductionp. 435
13.2 Some Useful Toolsp. 435
13.3 Basic Statistical Functionsp. 438
13.3.1 Mean and Weighted Meanp. 438
13.3.2 Geometric and Weighted Geometric Meanp. 439
13.3.3 Harmonic and Weighted Harmonic Meanp. 440
13.3.4 Truncated Meanp. 441
13.3.5 Root Mean Squarep. 441
13.3.6 Median, Range and Modep. 442
13.3.7 Mean Deviationp. 444
13.3.8 Mean Deviation of the Meanp. 444
13.3.9 Mean Deviation of the Medianp. 445
13.3.10 Variance and Standard Deviationp. 445
13.3.11 Moments About the Meanp. 447
13.3.12 Skewnessp. 448
13.3.13 Kurtosisp. 449
13.3.14 Covariance and Correlationp. 451
13.3.15 Miscellaneous Utilitiesp. 453
13.3.16 Percentiles and Rankp. 456
14 Special Functionsp. 461
14.1 Introductionp. 461
14.2 Factorialsp. 461
14.3 Combinations and Permutationsp. 464
14.3.1 Combinationsp. 464
14.3.2 Permutationsp. 467
14.4 Gamma Functionp. 470
14.5 Beta Functionp. 472
14.6 Error Functionp. 472
14.7 Sine and Cosine Integral Functionsp. 474
14.8 Laguerre Polynomialsp. 475
14.9 Hermite Polynomialsp. 476
14.10 Chebyshev Polynomialsp. 477
14.11 Legendre Polynomialsp. 479
14.12 Bessel Functionsp. 480
15 Curve Fitting Methodsp. 483
15.1 Introductionp. 483
15.2 Least Squares Fitp. 484
15.2.1 Straight-Line Fitp. 485
15.3 Weighted Least Squares Fitp. 488
15.3.1 Weighted Straight-Line Fitp. 488
15.4 Linear Regressionp. 492
15.4.1 Polynomial Fitp. 496
15.4.2 Exponential Fitp. 497
15.5 The X(2) Test for Goodness of Fitp. 499
16 Ordinary Differential Equationsp. 503
16.1 Introductionp. 503
16.2 Euler Methodp. 505
16.3 Runge-Kutta Methodsp. 506
16.3.1 Second-Order Runge-Kutta Methodp. 507
16.3.2 Fourth-Order Runge-Kutta Methodp. 508
16.3.3 Runge-Kutta-Fehlberg Methodp. 510
16.4 Coupled Differential Equationsp. 513
17 Partial Differential Equationsp. 517
17.1 Introductionp. 517
17.2 The Finite Difference Methodp. 520
17.3 Parabolic Partial Differential Equationsp. 521
17.3.1 The Crank-Nicolson Methodp. 525
17.4 Hyperbolic Partial Differential Equationsp. 527
17.5 Elliptic Partial Differential Equationsp. 532
18 Optimization Methodsp. 539
18.1 Introductionp. 539
18.2 Gradient Descent Methodp. 541
18.3 Linear Programmingp. 544
18.3.1 The Revised Simplex Methodp. 546
18.4 Simulated Annealing Methodp. 550
18.5 Genetic Algorithmsp. 555
Referencesp. 571
Indexp. 576
Go to:Top of Page